Skip to content

Commit

Permalink
Merge branch 'main' into feature/consistent-component-styles
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry committed Mar 15, 2024
2 parents ce0adf8 + 83e9964 commit 9a6176a
Show file tree
Hide file tree
Showing 17 changed files with 1,705 additions and 1,406 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -36,7 +36,7 @@ jobs:
echo "NX_CI_EXECUTION_ENV=Node $(node --version) -" >> $GITHUB_ENV
- name: Start Nx Cloud CI Run
run: npx nx-cloud start-ci-run --distributes-on="6 custom-linux-medium-plus-js" --stop-agents-after="e2e-suite"
run: npx nx-cloud start-ci-run --distributes-on="6 custom-linux-medium-plus-js"

- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
cmd5: yarn nx run-many -t e2e-suite --parallel 1

- name: Publish code coverage report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: coverage/packages/**/lcov.info
flags: unittest
Expand Down
Expand Up @@ -11,9 +11,9 @@ exports[`new-workspace-create-application-false-ng-add-then-project it should pa
"@angular/cli": "^17.X.X",
"@angular/compiler-cli": "^17.X.X",
"@types/jasmine": "~5.1.0",
"@typescript-eslint/eslint-plugin": "6.19.0",
"@typescript-eslint/parser": "6.19.0",
"eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"eslint": "^8.57.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
Expand Down
Expand Up @@ -11,9 +11,9 @@ exports[`new-workspace-create-application-false-project-then-ng-add it should pa
"@angular/cli": "^17.X.X",
"@angular/compiler-cli": "^17.X.X",
"@types/jasmine": "~5.1.0",
"@typescript-eslint/eslint-plugin": "6.19.0",
"@typescript-eslint/parser": "6.19.0",
"eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"eslint": "^8.57.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
Expand Down
6 changes: 3 additions & 3 deletions e2e/src/__snapshots__/new-workspace.test.ts.snap
Expand Up @@ -11,9 +11,9 @@ exports[`new-workspace it should pass linting after creating a new workspace fro
"@angular/cli": "^17.X.X",
"@angular/compiler-cli": "^17.X.X",
"@types/jasmine": "~5.1.0",
"@typescript-eslint/eslint-plugin": "6.19.0",
"@typescript-eslint/parser": "6.19.0",
"eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"eslint": "^8.57.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
Expand Down
1 change: 1 addition & 0 deletions e2e/utils/start-and-publish-to-local-registry.ts
Expand Up @@ -30,6 +30,7 @@ export default async () => {
env: process.env,
stdio: 'inherit',
maxBuffer: 1024 * 1024 * 10,
cwd: workspaceRoot,
});

execNx(['release', 'version', E2E_VERSION]);
Expand Down
1 change: 1 addition & 0 deletions jest.preset.js
Expand Up @@ -18,4 +18,5 @@ module.exports = {
* https://github.com/jestjs/jest/issues/14305
*/
prettierPath: require.resolve('prettier-v2-for-jest-inline-snapshots'),
maxWorkers: 1,
};
50 changes: 25 additions & 25 deletions package.json
Expand Up @@ -2,8 +2,8 @@
"name": "@angular-eslint/angular-eslint",
"private": true,
"volta": {
"node": "20.11.0",
"yarn": "1.22.21"
"node": "20.11.1",
"yarn": "1.22.22"
},
"workspaces": [
"packages/*"
Expand Down Expand Up @@ -52,56 +52,56 @@
"devDependencies": {
"@actions/core": "1.10.1",
"@actions/github": "6.0.0",
"@angular/cli": "17.1.0",
"@angular/compiler": "17.1.0",
"@commitlint/cli": "18.4.4",
"@commitlint/config-conventional": "18.4.4",
"@nx/devkit": "17.2.8",
"@nx/eslint-plugin": "17.2.8",
"@nx/jest": "17.2.8",
"@nx/js": "17.2.8",
"@nx/plugin": "17.2.8",
"@nx/workspace": "17.2.8",
"@angular/cli": "17.3.0",
"@angular/compiler": "17.3.0",
"@commitlint/cli": "19.2.0",
"@commitlint/config-conventional": "19.1.0",
"@nx/devkit": "18.0.8",
"@nx/eslint-plugin": "18.0.8",
"@nx/jest": "18.0.8",
"@nx/js": "18.0.8",
"@nx/plugin": "18.0.8",
"@nx/workspace": "18.0.8",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-typescript": "^11.1.0",
"@schematics/angular": "17.1.0",
"@swc-node/register": "1.6.8",
"@swc/cli": "0.1.63",
"@schematics/angular": "17.3.0",
"@swc-node/register": "1.8.0",
"@swc/cli": "0.3.10",
"@swc/core": "1.3.104",
"@swc/helpers": "0.5.3",
"@types/eslint": "8.56.2",
"@types/eslint": "8.56.5",
"@types/eslint-scope": "3.7.7",
"@types/jest": "29.4.4",
"@types/node": "20.11.5",
"@types/node": "20.11.28",
"@types/prettier": "2.7.3",
"@typescript-eslint/eslint-plugin": "6.19.0",
"@typescript-eslint/parser": "6.19.0",
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"commitizen": "4.3.0",
"cz-conventional-changelog": "3.3.0",
"env-cmd": "10.1.0",
"eslint": "8.56.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"execa": "5.1.1",
"husky": "8.0.3",
"husky": "9.0.11",
"jest": "29.4.3",
"json-schema-to-typescript": "13.1.2",
"json-schema-traverse": "1.0.0",
"jsonc-eslint-parser": "^2.1.0",
"lint-staged": "15.2.0",
"lint-staged": "15.2.2",
"ncp": "2.0.0",
"nx": "17.2.8",
"nx": "18.0.8",
"prettier": "3.1.1",
"prettier-v2-for-jest-inline-snapshots": "npm:prettier@^2",
"rimraf": "5.0.5",
"rollup": "^4.0.0",
"strip-ansi": "6.0.1",
"terser": "5.27.0",
"terser": "5.29.2",
"tree-kill": "1.2.2",
"ts-jest": "29.1.0",
"ts-node": "10.9.2",
"tslib": "^2.4.1",
"typescript": "5.3.3",
"verdaccio": "5.29.0"
"verdaccio": "5.29.2"
}
}
4 changes: 2 additions & 2 deletions packages/builder/package.json
Expand Up @@ -18,8 +18,8 @@
"builders.json"
],
"dependencies": {
"@nx/devkit": "17.2.8",
"nx": "17.2.8"
"@nx/devkit": "^17.2.8 || ^18.0.0",
"nx": "^17.2.8 || ^18.0.0"
},
"builders": "./builders.json",
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin-template/package.json
Expand Up @@ -19,8 +19,8 @@
"dependencies": {
"@angular-eslint/bundled-angular-compiler": "17.2.1",
"@angular-eslint/utils": "17.2.1",
"@typescript-eslint/type-utils": "6.19.0",
"@typescript-eslint/utils": "6.19.0",
"@typescript-eslint/type-utils": "7.2.0",
"@typescript-eslint/utils": "7.2.0",
"aria-query": "5.3.0",
"axobject-query": "4.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/package.json
Expand Up @@ -18,7 +18,7 @@
],
"dependencies": {
"@angular-eslint/utils": "17.2.1",
"@typescript-eslint/utils": "6.19.0"
"@typescript-eslint/utils": "7.2.0"
},
"peerDependencies": {
"eslint": "^7.20.0 || ^8.0.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/schematics/package.json
Expand Up @@ -35,16 +35,16 @@
"dependencies": {
"@angular-eslint/eslint-plugin": "17.2.1",
"@angular-eslint/eslint-plugin-template": "17.2.1",
"@nx/devkit": "17.2.8",
"ignore": "5.3.0",
"nx": "17.2.8",
"@nx/devkit": "^17.2.8 || ^18.0.0",
"ignore": "5.3.1",
"nx": "^17.2.8 || ^18.0.0",
"strip-json-comments": "3.1.1",
"tmp": "0.2.1"
"tmp": "0.2.3"
},
"devDependencies": {
"@types/tmp": "0.2.6",
"@typescript-eslint/utils": "6.19.0",
"eslint": "8.56.0"
"@typescript-eslint/utils": "7.2.0",
"eslint": "8.57.0"
},
"peerDependencies": {
"@angular/cli": ">= 17.0.0 < 18.0.0"
Expand Down
5 changes: 5 additions & 0 deletions packages/schematics/src/migrations.json
Expand Up @@ -45,6 +45,11 @@
"version": "17.0.0-alpha.0",
"description": "Updates @angular-eslint to v17",
"factory": "./migrations/update-17-0-0/update-17-0-0"
},
"update-17-3-0": {
"version": "17.2.2-alpha.0",
"description": "Updates @angular-eslint to v1.3",
"factory": "./migrations/update-17-3-0/update-17-3-0"
}
}
}
29 changes: 29 additions & 0 deletions packages/schematics/src/migrations/update-17-3-0/update-17-3-0.ts
@@ -0,0 +1,29 @@
import type { Rule } from '@angular-devkit/schematics';
import { chain } from '@angular-devkit/schematics';
import { updateDependencies } from '../utils/dependencies';

const updatedTypeScriptESLintVersion = '7.2.0';
const updatedESLintVersion = '8.57.0';

export default function migration(): Rule {
return chain([
updateDependencies([
{
packageName: '@typescript-eslint/eslint-plugin',
version: `^${updatedTypeScriptESLintVersion}`,
},
{
packageName: '@typescript-eslint/utils',
version: `^${updatedTypeScriptESLintVersion}`,
},
{
packageName: '@typescript-eslint/parser',
version: `^${updatedTypeScriptESLintVersion}`,
},
{
packageName: 'eslint',
version: `^${updatedESLintVersion}`,
},
]),
]);
}
@@ -0,0 +1,64 @@
import { Tree } from '@angular-devkit/schematics';
import {
SchematicTestRunner,
UnitTestTree,
} from '@angular-devkit/schematics/testing';
import * as path from 'path';

const migrationSchematicRunner = new SchematicTestRunner(
'@angular-eslint/schematics',
path.join(__dirname, '../../../src/migrations.json'),
);

describe('update-17-3-0', () => {
let appTree: UnitTestTree;
beforeEach(() => {
appTree = new UnitTestTree(Tree.empty());
appTree.create(
'package.json',
JSON.stringify({
devDependencies: {
'@typescript-eslint/eslint-plugin': '^5.43.0',
'@typescript-eslint/utils': '5.3.0',
'@typescript-eslint/parser': '^5.43.0',
eslint: '^8.28.0',
},
}),
);
appTree.create(
'angular.json',
JSON.stringify({
$schema: './node_modules/@angular/cli/lib/config/schema.json',
version: 1,
newProjectRoot: 'projects',
projects: {
foo: {
root: 'projects/foo',
},
bar: {
root: 'projects/bar',
},
},
}),
);
});

it('should update relevant @typescript-eslint and eslint dependencies', async () => {
const tree = await migrationSchematicRunner.runSchematic(
'update-17-3-0',
{},
appTree,
);
const packageJSON = JSON.parse(tree.readContent('/package.json'));
expect(packageJSON).toMatchInlineSnapshot(`
Object {
"devDependencies": Object {
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@typescript-eslint/utils": "^7.2.0",
"eslint": "^8.57.0",
},
}
`);
});
});
8 changes: 4 additions & 4 deletions packages/template-parser/tests/index.test.ts
Expand Up @@ -11726,7 +11726,7 @@ describe('parseForESLint()', () => {
"keySpan": ParseSourceSpan {
"details": null,
"end": ParseLocation {
"col": 29,
"col": 20,
"file": ParseSourceFile {
"content": "
@for (item of items; track item.id) {
Expand All @@ -11738,7 +11738,7 @@ describe('parseForESLint()', () => {
"url": "./foo.html",
},
"line": 1,
"offset": 30,
"offset": 21,
},
"fullStart": ParseLocation {
"col": 16,
Expand Down Expand Up @@ -11775,7 +11775,7 @@ describe('parseForESLint()', () => {
"sourceSpan": ParseSourceSpan {
"details": null,
"end": ParseLocation {
"col": 29,
"col": 20,
"file": ParseSourceFile {
"content": "
@for (item of items; track item.id) {
Expand All @@ -11787,7 +11787,7 @@ describe('parseForESLint()', () => {
"url": "./foo.html",
},
"line": 1,
"offset": 30,
"offset": 21,
},
"fullStart": ParseLocation {
"col": 16,
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"@angular-eslint/bundled-angular-compiler": "17.2.1",
"@typescript-eslint/utils": "6.19.0"
"@typescript-eslint/utils": "7.2.0"
},
"gitHead": "e2006e5e9c99e5a943d1a999e0efa5247d29ec24"
}

0 comments on commit 9a6176a

Please sign in to comment.