Skip to content

Commit

Permalink
chore: updates for angular 16
Browse files Browse the repository at this point in the history
  • Loading branch information
SvetlanaMuravlova committed Jul 17, 2023
1 parent 8be7cf9 commit 00e0951
Show file tree
Hide file tree
Showing 20 changed files with 11,564 additions and 8,734 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
16 changes: 9 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"rules": {
},
"plugins": ["@nx"],
"rules": {},
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] }
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"extends": ["plugin:@nx/typescript"],
"rules": {
"semi": "off",
"@typescript-eslint/semi": ["error"],
Expand All @@ -31,7 +33,7 @@
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
}
]
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/on-push-or-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.0
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -32,8 +32,8 @@ jobs:
runs-on: ubuntu-latest
needs: one_run
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
Expand All @@ -46,12 +46,12 @@ jobs:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
Expand All @@ -63,12 +63,12 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
Expand All @@ -80,8 +80,8 @@ jobs:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -94,8 +94,8 @@ jobs:
outputs:
output_url: ${{ steps.firebase_hosting_preview.outputs.details_url }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.0
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
50 changes: 1 addition & 49 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,64 +18,16 @@
* Angular 10 Compatibility ([#1008](https://github.com/valor-software/ng2-dragula/issues/1008)) ([ad945e0](https://github.com/valor-software/ng2-dragula/commit/ad945e0d5e709216e2bb551927a1dd3713589bf3))
* **chore:** added set-version.ts file ([22fd062](https://github.com/valor-software/ng2-dragula/commit/22fd06202a09790d3763e58d378bf676caa772d5))
* **chore:** updated angular ([3fbefdd](https://github.com/valor-software/ng2-dragula/commit/3fbefdd72245f9ac41843af5fd7b0896d5b2bbe3))
* **dragula:** updated angular 14 ([#1065](https://github.com/valor-software/ng2-dragula/issues/1065)) ([2d2388d](https://github.com/valor-software/ng2-dragula/commit/2d2388dc6138e2ee0ca2093a58c8227c420104cc))


### Reverts

* Revert "3.0.0" ([e2cb7fa](https://github.com/valor-software/ng2-dragula/commit/e2cb7fa08ae16a810ee51745ea4ee14eab185fe2))

* **dragula:** updated angular 15 ([#1083](https://github.com/valor-software/ng2-dragula/issues/1081)) ([3fbefdd](https://github.com/valor-software/ng2-dragula/commit/3fbefdd72245f9ac41843af5fd7b0896d5b2bbe3))


# [3.1.0](https://github.com/valor-software/ng2-dragula/compare/v2.1.1...v3.1.0) (2022-12-07)


### Bug Fixes

* **chore:** added publish config to package.json file ([1afbdbc](https://github.com/valor-software/ng2-dragula/commit/1afbdbcc240797c406b87e51806cbf9dfd6c1db3))
* **chore:** fix release flow ([d0279ef](https://github.com/valor-software/ng2-dragula/commit/d0279efcfa74642128211d4c75b533eea4820cbb))
* **chore:** fixed angularCompilerOptions ([b963d52](https://github.com/valor-software/ng2-dragula/commit/b963d5217207eb51c40a659a2f9a39d0c03a2706))
* **chore:** fixed release files ([f6798c9](https://github.com/valor-software/ng2-dragula/commit/f6798c90d34db1c2e7c13b35f5dd69e800651b23))
* **chore:** fixed yaml file ([2204e0b](https://github.com/valor-software/ng2-dragula/commit/2204e0b039895f03168a56c3d114beea40685e36))


### Features

* Angular 10 Compatibility ([#1008](https://github.com/valor-software/ng2-dragula/issues/1008)) ([ad945e0](https://github.com/valor-software/ng2-dragula/commit/ad945e0d5e709216e2bb551927a1dd3713589bf3))
* **chore:** added set-version.ts file ([22fd062](https://github.com/valor-software/ng2-dragula/commit/22fd06202a09790d3763e58d378bf676caa772d5))
* **dragula:** updated angular 14 ([#1065](https://github.com/valor-software/ng2-dragula/issues/1065)) ([2d2388d](https://github.com/valor-software/ng2-dragula/commit/2d2388dc6138e2ee0ca2093a58c8227c420104cc))


### Reverts

* Revert "3.0.0" ([e2cb7fa](https://github.com/valor-software/ng2-dragula/commit/e2cb7fa08ae16a810ee51745ea4ee14eab185fe2))



# [3.0.0](https://github.com/valor-software/ng2-dragula/compare/v2.1.1...v3.0.0) (2022-12-07)


### Bug Fixes

* **chore:** added publish config to package.json file ([1afbdbc](https://github.com/valor-software/ng2-dragula/commit/1afbdbcc240797c406b87e51806cbf9dfd6c1db3))
* **chore:** fix release flow ([d0279ef](https://github.com/valor-software/ng2-dragula/commit/d0279efcfa74642128211d4c75b533eea4820cbb))
* **chore:** fixed angularCompilerOptions ([b963d52](https://github.com/valor-software/ng2-dragula/commit/b963d5217207eb51c40a659a2f9a39d0c03a2706))
* **chore:** fixed release files ([f6798c9](https://github.com/valor-software/ng2-dragula/commit/f6798c90d34db1c2e7c13b35f5dd69e800651b23))


### Features

* Angular 10 Compatibility ([#1008](https://github.com/valor-software/ng2-dragula/issues/1008)) ([ad945e0](https://github.com/valor-software/ng2-dragula/commit/ad945e0d5e709216e2bb551927a1dd3713589bf3))
* **chore:** added set-version.ts file ([22fd062](https://github.com/valor-software/ng2-dragula/commit/22fd06202a09790d3763e58d378bf676caa772d5))
* **dragula:** updated angular 14 ([#1065](https://github.com/valor-software/ng2-dragula/issues/1065)) ([2d2388d](https://github.com/valor-software/ng2-dragula/commit/2d2388dc6138e2ee0ca2093a58c8227c420104cc))


### Reverts

* Revert "3.0.0" ([e2cb7fa](https://github.com/valor-software/ng2-dragula/commit/e2cb7fa08ae16a810ee51745ea4ee14eab185fe2))



# Change Log

All notable changes to this project will be documented in this file.
Expand Down
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
The MIT License (MIT)

Copyright (c) 2015-2016 Dmitriy Shekhovtsov <valorkin@gmail.com>
Copyright (c) 2015-2016 Valor Software
Copyright (c) 2023 Valor Labs
Copyright (c) 2015 Valor Software
Copyright (c) 2015-2016 Nathan Walker <NathanWalker>
Copyright (c) 2015 Dmitriy Shekhovtsov <valorkin@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 0 additions & 9 deletions angular.json

This file was deleted.

23 changes: 6 additions & 17 deletions apps/demo/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
{
"extends": [
"../../.eslintrc.json"
],
"ignorePatterns": [
"!**/*"
],
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": [
"*.ts"
],
"files": ["*.ts"],
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@nrwl/nx/angular-template"
],
"files": ["*.html"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
}

5 changes: 3 additions & 2 deletions apps/demo/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "demo",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "./apps/demo/src",
"projectType": "application",
"prefix": "ex",
Expand Down Expand Up @@ -49,7 +50,7 @@
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -71,7 +72,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": ["apps/demo/src/**/*.ts", "apps/demo/src/**/*.html"]
}
Expand Down
30 changes: 20 additions & 10 deletions decorate-angular-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ const cp = require('child_process');
const isWindows = os.platform() === 'win32';
let output;
try {
output = require('@nrwl/workspace').output;
output = require('@nx/workspace').output;
} catch (e) {
console.warn('Angular CLI could not be decorated to enable computation caching. Please ensure @nrwl/workspace is installed.');
console.warn(
'Angular CLI could not be decorated to enable computation caching. Please ensure @nx/workspace is installed.'
);
process.exit(0);
}

Expand All @@ -46,24 +48,32 @@ function symlinkNgCLItoNxCLI() {
* This is the most reliable way to create symlink-like behavior on Windows.
* Such that it works in all shells and works with npx.
*/
['', '.cmd', '.ps1'].forEach(ext => {
if (fs.existsSync(nxPath + ext)) fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext));
['', '.cmd', '.ps1'].forEach((ext) => {
if (fs.existsSync(nxPath + ext))
fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext));
});
} else {
// If unix-based, symlink
cp.execSync(`ln -sf ./nx ${ngPath}`);
}
}
catch(e) {
output.error({ title: 'Unable to create a symlink from the Angular CLI to the Nx CLI:' + e.message });
} catch (e) {
output.error({
title:
'Unable to create a symlink from the Angular CLI to the Nx CLI:' +
e.message,
});
throw e;
}
}

try {
symlinkNgCLItoNxCLI();
require('@nrwl/cli/lib/decorate-cli').decorateCli();
output.log({ title: 'Angular CLI has been decorated to enable computation caching.' });
} catch(e) {
output.error({ title: 'Decoration of the Angular CLI did not complete successfully' });
output.log({
title: 'Angular CLI has been decorated to enable computation caching.',
});
} catch (e) {
output.error({
title: 'Decoration of the Angular CLI did not complete successfully',
});
}
4 changes: 2 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const { getJestProjects } = require('@nrwl/jest');
const { getJestProjects } = require('@nx/jest');

export default {"projects": getJestProjects()};
export default { projects: getJestProjects() };
18 changes: 14 additions & 4 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
const nxPreset = require('@nrwl/jest/preset').default;
const nxPreset = require('@nx/jest/preset').default;
module.exports = {
...nxPreset,
...{
coverageReporters: ['text-summary', 'json', 'lcov']
}
}
coverageReporters: ['text-summary', 'json', 'lcov'],
},
/* TODO: Update to latest Jest snapshotFormat
* By default Nx has kept the older style of Jest Snapshot formats
* to prevent breaking of any existing tests with snapshots.
* It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag.
* Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/
snapshotFormat: { escapeString: true, printBasicPrototype: true },
};
11 changes: 6 additions & 5 deletions libs/ng2-dragula/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
{
"files": ["*.ts"],
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"parserOptions": { "project": ["libs/ng2-dragula/tsconfig.*?.json"] },
"rules": {
}
"parserOptions": {
"project": ["libs/ng2-dragula/tsconfig.*?.json"]
},
"rules": {}
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
Expand Down
Loading

0 comments on commit 00e0951

Please sign in to comment.