Skip to content

Commit

Permalink
chore: update nx
Browse files Browse the repository at this point in the history
  • Loading branch information
Chau Tran authored and Chau Tran committed May 22, 2023
1 parent 50fbcbf commit ead778c
Show file tree
Hide file tree
Showing 24 changed files with 1,551 additions and 1,981 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
8 changes: 4 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -23,12 +23,12 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
}
]
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { getJestProjects } = require('@nrwl/jest');
const { getJestProjects } = require('@nx/jest');

export default {
projects: getJestProjects(),
Expand Down
16 changes: 14 additions & 2 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
const nxPreset = require('@nrwl/jest/preset').default;
const nxPreset = require('@nx/jest/preset').default;

module.exports = { ...nxPreset };
module.exports = {
...nxPreset,
/* 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 },
};
249 changes: 162 additions & 87 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -1,138 +1,213 @@
{
"migrations": [
{
"version": "14.8.0-beta.0",
"description": "Migrates from @nrwl/workspace:run-commands to nx:run-commands",
"version": "15.7.0-beta.0",
"description": "Split global configuration files into individual project.json files. This migration has been added automatically to the beginning of your migration set to retroactively make them work with the new version of Nx.",
"cli": "nx",
"implementation": "./src/migrations/update-14-8-0/change-run-commands-executor",
"package": "@nrwl/workspace",
"name": "14-8-0-change-run-commands-executor"
"implementation": "./src/migrations/update-15-7-0/split-configuration-into-project-json-files",
"package": "@nx/workspace",
"name": "15-7-0-split-configuration-into-project-json-files"
},
{
"cli": "nx",
"version": "15.0.0-beta.0",
"description": "Rename @nrwl/angular:webpack-server executor to @nrwl/angular:webpack-dev-server",
"factory": "./src/migrations/update-14-8-0/rename-webpack-server",
"package": "@nrwl/angular",
"name": "rename-webpack-server-executor"
"version": "15.8.2-beta.0",
"description": "Updates the nx wrapper.",
"implementation": "./src/migrations/update-15-8-2/update-nxw",
"package": "nx",
"name": "15.8.2-update-nx-wrapper"
},
{
"cli": "nx",
"version": "16.0.0-beta.0",
"description": "Remove @nrwl/cli.",
"implementation": "./src/migrations/update-16-0-0/remove-nrwl-cli",
"package": "nx",
"name": "16.0.0-remove-nrwl-cli"
},
{
"cli": "nx",
"version": "15.0.0-beta.0",
"description": "Update the usages of @nrwl/angular/testing to import jasmine-marbles symbols from jasmine-marbles itself.",
"factory": "./src/migrations/update-15-0-0/switch-to-jasmine-marbles",
"package": "@nrwl/angular",
"name": "switch-to-jasmine-marbles"
"version": "16.0.0-beta.9",
"description": "Replace `dependsOn.projects` and `inputs` definitions with new configuration format.",
"implementation": "./src/migrations/update-16-0-0/update-depends-on-to-tokens",
"package": "nx",
"name": "16.0.0-tokens-for-depends-on"
},
{
"cli": "nx",
"version": "15.0.0-beta.1",
"description": "Stop hashing karma spec files and config files for build targets and dependent tasks",
"factory": "./src/migrations/update-15-0-0/add-karma-inputs",
"package": "@nrwl/angular",
"name": "add-karma-inputs"
"version": "16.0.0-beta.0",
"description": "Replace @nrwl/nx-cloud with nx-cloud",
"implementation": "./src/migrations/update-16-0-0/update-nx-cloud-runner",
"package": "nx",
"name": "16.0.0-update-nx-cloud-runner"
},
{
"cli": "nx",
"version": "15.2.0-beta.0",
"description": "Update the @angular/cli package version to ~15.0.0.",
"factory": "./src/migrations/update-15-2-0/update-angular-cli",
"package": "@nrwl/angular",
"name": "update-angular-cli-version-15-0-0"
"version": "16.2.0-beta.0",
"description": "Remove outputPath from run commands",
"implementation": "./src/migrations/update-16-2-0/remove-run-commands-output-path",
"package": "nx",
"name": "16.2.0-remove-output-path-from-run-commands"
},
{
"version": "15.7.0-beta.0",
"description": "Split global configuration files (e.g., workspace.json) into individual project.json files.",
"cli": "nx",
"version": "15.2.0-beta.0",
"description": "Remove browserlist config as it's handled by build-angular",
"factory": "./src/migrations/update-15-2-0/remove-browserlist-config",
"package": "@nrwl/angular",
"name": "remove-browserlist-config"
"implementation": "./src/migrations/update-15-7-0/split-configuration-into-project-json-files",
"package": "@nx/workspace",
"name": "15-7-0-split-configuration-into-project-json-files"
},
{
"cli": "nx",
"version": "15.2.0-beta.0",
"description": "Update typescript target to ES2022",
"factory": "./src/migrations/update-15-2-0/update-typescript-target",
"package": "@nrwl/angular",
"name": "update-typescript-target"
"version": "16.0.0-beta.1",
"description": "Replace @nx/workspace with @nx/workspace",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/workspace",
"name": "update-16-0-0-add-nx-packages"
},
{
"version": "16.0.0-beta.4",
"description": "Generates a plugin called 'workspace-plugin' containing your workspace generators.",
"cli": "nx",
"version": "15.2.0-beta.0",
"description": "Remove bundleDependencies from server targets",
"factory": "./src/migrations/update-15-2-0/update-workspace-config",
"package": "@nrwl/angular",
"name": "update-workspace-config"
"implementation": "./src/migrations/update-16-0-0/move-workspace-generators-to-local-plugin",
"package": "@nx/workspace",
"name": "16-0-0-move-workspace-generators-into-local-plugin"
},
{
"cli": "ng",
"version": "15.2.0-beta.0",
"description": "Remove exported `@angular/platform-server` `renderModule` method. The `renderModule` method is now exported by the Angular CLI.",
"factory": "./src/migrations/update-15-2-0/remove-platform-server-exports",
"package": "@nrwl/angular",
"name": "update-platform-server-exports"
"version": "16.0.0-beta.9",
"description": "Fix .babelrc presets if it contains an invalid entry for @nx/web/babel.",
"cli": "nx",
"implementation": "./src/migrations/update-16-0-0/fix-invalid-babelrc",
"package": "@nx/workspace",
"name": "16-0-0-fix-invalid-babelrc"
},
{
"cli": "ng",
"version": "15.2.0-beta.0",
"description": "Remove no longer needed require calls in Karma builder main file.",
"factory": "./src/migrations/update-15-2-0/update-karma-main-file",
"package": "@nrwl/angular",
"name": "update-karma-main-file"
"cli": "nx",
"version": "15.7.1-beta.0",
"description": "Add node_modules to root eslint ignore",
"factory": "./src/migrations/update-15-7-1/add-eslint-ignore",
"package": "@nx/linter",
"name": "add-eslint-ignore"
},
{
"version": "15.0.0",
"description": "Since Angular v15, the `RouterLink` contains the logic of the `RouterLinkWithHref` directive. This migration replaces all `RouterLinkWithHref` references with `RouterLink`.",
"factory": "./migrations/router-link-with-href/index",
"package": "@angular/core",
"name": "migration-v15-router-link-with-href"
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/linter with @nx/linter",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/linter",
"name": "update-16-0-0-add-nx-packages"
},
{
"version": "15.0.0",
"description": "In Angular version 15, the deprecated `relativeLinkResolution` config parameter of the Router is removed. This migration removes all `relativeLinkResolution` fields from the Router config objects.",
"factory": "./migrations/relative-link-resolution/index",
"package": "@angular/core",
"name": "migration-v15-relative-link-resolution"
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/eslint-plugin with @nx/eslint-plugin",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/eslint-plugin",
"name": "update-16-0-0-add-nx-packages"
},
{
"version": "15.0.0-beta.0",
"version": "15.8.0-beta.0",
"cli": "nx",
"description": "Stop hashing jest spec files and config files for build targets and dependent tasks",
"factory": "./src/migrations/update-15-0-0/add-jest-inputs",
"package": "@nrwl/jest",
"name": "add-jest-inputs"
"description": "Update jest configs to support jest 29 changes (https://jestjs.io/docs/upgrading-to-jest29)",
"factory": "./src/migrations/update-15-8-0/update-configs-jest-29",
"package": "@nx/jest",
"name": "update-configs-jest-29"
},
{
"version": "15.8.0-beta.0",
"cli": "nx",
"version": "15.0.0-beta.0",
"description": "Stop hashing eslint config files for build targets and dependent tasks",
"factory": "./src/migrations/update-15-0-0/add-eslint-inputs",
"package": "@nrwl/linter",
"name": "add-eslint-inputs"
"description": "Update jest test files to support jest 29 changes (https://jestjs.io/docs/upgrading-to-jest29)",
"factory": "./src/migrations/update-15-8-0/update-tests-jest-29",
"package": "@nx/jest",
"name": "update-tests-jest-29"
},
{
"cli": "nx",
"version": "15.0.0-beta.1",
"description": "Replace implicitDependencies with namedInputs + target inputs",
"implementation": "./src/migrations/update-15-0-0/migrate-to-inputs",
"package": "nx",
"name": "15.0.0-migrate-to-inputs"
"version": "16.0.0-beta.1",
"description": "Replace @nx/jest with @nx/jest",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/jest",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "15.0.0-beta.1",
"description": "Prefix outputs with {workspaceRoot}/{projectRoot} if needed",
"implementation": "./src/migrations/update-15-0-0/prefix-outputs",
"package": "nx",
"name": "15.0.0-prefix-outputs"
"version": "15.7.0-beta.1",
"description": "Install the required angular-devkit packages as we do not directly depend on them anymore",
"factory": "./src/migrations/update-15-7-0/install-required-packages",
"package": "@nx/angular",
"name": "install-required-packages"
},
{
"cli": "nx",
"version": "15.0.12-beta.1",
"description": "Set project names in project.json files",
"implementation": "./src/migrations/update-15-1-0/set-project-names",
"package": "nx",
"name": "15.1.0-set-project-names"
"version": "15.9.0-beta.3",
"description": "Update the tsconfig.spec.json to use target es2016 for jest-preset-angular v13",
"factory": "./src/migrations/update-15-9-0/update-testing-tsconfig",
"package": "@nx/angular",
"name": "update-tsconfig-spec-jest"
},
{
"cli": "nx",
"version": "15.9.0-beta.9",
"description": "Update the file-server executor to use @nrwl/web:file-server",
"factory": "./src/migrations/update-15-9-0/update-file-server-executor",
"package": "@nx/angular",
"name": "update-file-server-executor"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace the deprecated library generator 'simpleModuleName' option from generator defaults with 'simpleName'",
"factory": "./src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option",
"package": "@nx/angular",
"name": "remove-library-generator-simple-module-name-option"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/angular with @nx/angular",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/angular",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.0.0-beta.6",
"description": "Remove protractor as default e2eTestRunner from nxJson and project configurations",
"implementation": "./src/migrations/update-16-0-0/remove-protractor-defaults",
"package": "@nx/angular",
"name": "remove-protractor-defaults-from-generators"
},
{
"cli": "nx",
"version": "16.0.0-beta.6",
"description": "Remove karma as default unitTestRunner from nxJson and project configurations",
"implementation": "./src/migrations/update-16-0-0/remove-karma-defaults",
"package": "@nx/angular",
"name": "remove-karma-defaults-from-generators"
},
{
"cli": "nx",
"version": "16.1.0-beta.1",
"requires": {
"@angular/core": ">=15.0.0"
},
"description": "Remove exported `@angular/platform-server` `renderModule` method. The `renderModule` method is now exported by the Angular CLI.",
"factory": "./src/migrations/update-16-1-0/remove-render-module-platform-server-exports",
"package": "@nx/angular",
"name": "remove-render-module-platform-server-exports"
},
{
"description": "The road to v15.2",
"version": "15.2.0",
"factory": "./15_2_0/index",
"package": "@ngrx/store",
"name": "ngrx-store-migration-15-2-0"
},
{
"description": "Update the @angular/cli package version to ~16.0.0",
"factory": "./src/migrations/update-16-1-0/update-angular-cli",
"package": "@nx/angular",
"name": "update-angular-cli-version-16-0-0",
"version": "16.1.0-beta.1"
}
]
}
Loading

0 comments on commit ead778c

Please sign in to comment.