Feature/upgrade to nx 16.0 (#1943)

* Upgrade to Nx 16.0

* Update changelog
pull/1945/head
Thomas Kaul 1 year ago committed by GitHub
parent b42c0c8355
commit 32c1e6b390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,12 +1,12 @@
{ {
"root": true, "root": true,
"ignorePatterns": ["**/*"], "ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"], "plugins": ["@nx"],
"overrides": [ "overrides": [
{ {
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": { "rules": {
"@nrwl/nx/enforce-module-boundaries": [ "@nx/enforce-module-boundaries": [
"error", "error",
{ {
"enforceBuildableLibDependency": true, "enforceBuildableLibDependency": true,
@ -23,12 +23,12 @@
}, },
{ {
"files": ["*.ts", "*.tsx"], "files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"], "extends": ["plugin:@nx/typescript"],
"rules": {} "rules": {}
}, },
{ {
"files": ["*.js", "*.jsx"], "files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"], "extends": ["plugin:@nx/javascript"],
"rules": {} "rules": {}
}, },
{ {
@ -113,5 +113,6 @@
"radix": "error" "radix": "error"
} }
} }
] ],
"extends": [null, "plugin:storybook/recommended"]
} }

@ -1,4 +1,11 @@
module.exports = { module.exports = {
docs: {
autodocs: true
},
framework: {
name: '@storybook/angular',
options: {}
}
// uncomment the property below if you want to apply some webpack config globally // uncomment the property below if you want to apply some webpack config globally
// webpackFinal: async (config, { configType }) => { // webpackFinal: async (config, { configType }) => {
// // Make whatever fine-grained changes you need that should apply to all storybook configs // // Make whatever fine-grained changes you need that should apply to all storybook configs

@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved the management of platforms in the admin control panel - Improved the management of platforms in the admin control panel
- Improved the style of the interstitial for the subscription - Improved the style of the interstitial for the subscription
- Improved the language localization for German (`de`) - Improved the language localization for German (`de`)
- Upgraded `Nx` from version `15.9.2` to `16.0.3`
## 1.266.0 - 2023-05-06 ## 1.266.0 - 2023-05-06

@ -33,7 +33,7 @@
"outputs": ["{options.outputPath}"] "outputs": ["{options.outputPath}"]
}, },
"serve": { "serve": {
"executor": "@nrwl/node:node", "executor": "@nx/node:node",
"options": { "options": {
"buildTarget": "api:build" "buildTarget": "api:build"
} }
@ -45,7 +45,7 @@
} }
}, },
"test": { "test": {
"executor": "@nrwl/jest:jest", "executor": "@nx/jest:jest",
"options": { "options": {
"jestConfig": "apps/api/jest.config.ts", "jestConfig": "apps/api/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true

@ -5,7 +5,7 @@
"projectType": "application", "projectType": "application",
"targets": { "targets": {
"e2e": { "e2e": {
"executor": "@nrwl/cypress:cypress", "executor": "@nx/cypress:cypress",
"options": { "options": {
"cypressConfig": "apps/client-e2e/cypress.json", "cypressConfig": "apps/client-e2e/cypress.json",
"tsConfig": "apps/client-e2e/tsconfig.e2e.json", "tsConfig": "apps/client-e2e/tsconfig.e2e.json",

@ -11,7 +11,7 @@
// This function is called when a project is opened or re-opened (e.g. due to // This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing) // the project's config changing)
const { preprocessTypescript } = require('@nrwl/cypress/plugins/preprocessor'); const { preprocessTypescript } = require('@nx/cypress/plugins/preprocessor');
module.exports = (on, config) => { module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits // `on` is used to hook into various events Cypress emits

@ -195,7 +195,7 @@
} }
}, },
"test": { "test": {
"executor": "@nrwl/jest:jest", "executor": "@nx/jest:jest",
"options": { "options": {
"jestConfig": "apps/client/jest.config.ts", "jestConfig": "apps/client/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true

@ -5,7 +5,7 @@
"projectType": "application", "projectType": "application",
"targets": { "targets": {
"e2e": { "e2e": {
"executor": "@nrwl/cypress:cypress", "executor": "@nx/cypress:cypress",
"options": { "options": {
"cypressConfig": "apps/ui-e2e/cypress.json", "cypressConfig": "apps/ui-e2e/cypress.json",
"devServerTarget": "ui:storybook", "devServerTarget": "ui:storybook",

@ -11,7 +11,7 @@
// This function is called when a project is opened or re-opened (e.g. due to // This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing) // the project's config changing)
const { preprocessTypescript } = require('@nrwl/cypress/plugins/preprocessor'); const { preprocessTypescript } = require('@nx/cypress/plugins/preprocessor');
module.exports = (on, config) => { module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits // `on` is used to hook into various events Cypress emits

@ -27,9 +27,11 @@ const cp = require('child_process');
const isWindows = os.platform() === 'win32'; const isWindows = os.platform() === 'win32';
let output; let output;
try { try {
output = require('@nrwl/workspace').output; output = require('@nx/workspace').output;
} catch (e) { } 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); process.exit(0);
} }
@ -46,16 +48,20 @@ function symlinkNgCLItoNxCLI() {
* This is the most reliable way to create symlink-like behavior on Windows. * This is the most reliable way to create symlink-like behavior on Windows.
* Such that it works in all shells and works with npx. * Such that it works in all shells and works with npx.
*/ */
['', '.cmd', '.ps1'].forEach(ext => { ['', '.cmd', '.ps1'].forEach((ext) => {
if (fs.existsSync(nxPath + ext)) fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext)); if (fs.existsSync(nxPath + ext))
fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext));
}); });
} else { } else {
// If unix-based, symlink // If unix-based, symlink
cp.execSync(`ln -sf ./nx ${ngPath}`); cp.execSync(`ln -sf ./nx ${ngPath}`);
} }
} } catch (e) {
catch(e) { output.error({
output.error({ title: 'Unable to create a symlink from the Angular CLI to the Nx CLI:' + e.message }); title:
'Unable to create a symlink from the Angular CLI to the Nx CLI:' +
e.message
});
throw e; throw e;
} }
} }
@ -63,7 +69,11 @@ function symlinkNgCLItoNxCLI() {
try { try {
symlinkNgCLItoNxCLI(); symlinkNgCLItoNxCLI();
require('@nrwl/cli/lib/decorate-cli').decorateCli(); require('@nrwl/cli/lib/decorate-cli').decorateCli();
output.log({ title: 'Angular CLI has been decorated to enable computation caching.' }); output.log({
} catch(e) { title: 'Angular CLI has been decorated to enable computation caching.'
output.error({ title: 'Decoration of the Angular CLI did not complete successfully' }); });
} catch (e) {
output.error({
title: 'Decoration of the Angular CLI did not complete successfully'
});
} }

@ -1,3 +1,3 @@
const { getJestProjects } = require('@nrwl/jest'); const { getJestProjects } = require('@nx/jest');
export default { projects: getJestProjects() }; export default { projects: getJestProjects() };

@ -1,3 +1,3 @@
const nxPreset = require('@nrwl/jest/preset').default; const nxPreset = require('@nx/jest/preset').default;
module.exports = { ...nxPreset }; module.exports = { ...nxPreset };

@ -1,3 +1,3 @@
{ {
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] "presets": []
} }

@ -11,7 +11,7 @@
} }
}, },
"test": { "test": {
"executor": "@nrwl/jest:jest", "executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/libs/common"], "outputs": ["{workspaceRoot}/coverage/libs/common"],
"options": { "options": {
"jestConfig": "libs/common/jest.config.ts", "jestConfig": "libs/common/jest.config.ts",

@ -5,7 +5,7 @@
{ {
"files": ["*.ts"], "files": ["*.ts"],
"extends": [ "extends": [
"plugin:@nrwl/nx/angular", "plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates" "plugin:@angular-eslint/template/process-inline-templates"
], ],
"rules": { "rules": {
@ -29,7 +29,7 @@
}, },
{ {
"files": ["*.html"], "files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"], "extends": ["plugin:@nx/angular-template"],
"rules": {} "rules": {}
} }
] ]

@ -11,7 +11,7 @@
"prefix": "gf", "prefix": "gf",
"targets": { "targets": {
"test": { "test": {
"executor": "@nrwl/jest:jest", "executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/libs/ui"], "outputs": ["{workspaceRoot}/coverage/libs/ui"],
"options": { "options": {
"jestConfig": "libs/ui/jest.config.ts", "jestConfig": "libs/ui/jest.config.ts",

@ -5,7 +5,7 @@
"npmScope": "ghostfolio", "npmScope": "ghostfolio",
"tasksRunnerOptions": { "tasksRunnerOptions": {
"default": { "default": {
"runner": "@nrwl/nx-cloud", "runner": "nx-cloud",
"options": { "options": {
"accessToken": "Mjg0ZGQ2YjAtNGI4NS00NmYwLThhOWEtMWZmNmQzODM4YzU4fHJlYWQ=", "accessToken": "Mjg0ZGQ2YjAtNGI4NS00NmYwLThhOWEtMWZmNmQzODM4YzU4fHJlYWQ=",
"cacheableOperations": [ "cacheableOperations": [
@ -21,17 +21,17 @@
}, },
"defaultProject": "api", "defaultProject": "api",
"generators": { "generators": {
"@nrwl/angular:application": { "@nx/angular:application": {
"linter": "eslint", "linter": "eslint",
"unitTestRunner": "jest", "unitTestRunner": "jest",
"e2eTestRunner": "cypress" "e2eTestRunner": "cypress"
}, },
"@nrwl/angular:library": { "@nx/angular:library": {
"linter": "eslint", "linter": "eslint",
"unitTestRunner": "jest" "unitTestRunner": "jest"
}, },
"@nrwl/nest": {}, "@nx/angular:component": {},
"@nrwl/angular:component": {} "@nx/nest": {}
}, },
"$schema": "./node_modules/nx/schemas/nx-schema.json", "$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": { "targetDefaults": {

@ -79,7 +79,6 @@
"@nestjs/platform-express": "9.1.4", "@nestjs/platform-express": "9.1.4",
"@nestjs/schedule": "2.1.0", "@nestjs/schedule": "2.1.0",
"@nestjs/serve-static": "3.0.0", "@nestjs/serve-static": "3.0.0",
"@nrwl/angular": "15.9.2",
"@prisma/client": "4.13.0", "@prisma/client": "4.13.0",
"@simplewebauthn/browser": "5.2.1", "@simplewebauthn/browser": "5.2.1",
"@simplewebauthn/server": "5.2.1", "@simplewebauthn/server": "5.2.1",
@ -144,22 +143,19 @@
"@angular/pwa": "15.2.5", "@angular/pwa": "15.2.5",
"@nestjs/schematics": "9.1.0", "@nestjs/schematics": "9.1.0",
"@nestjs/testing": "9.4.0", "@nestjs/testing": "9.4.0",
"@nrwl/cli": "15.9.2", "@nx/angular": "16.0.3",
"@nrwl/cypress": "15.9.2", "@nx/cypress": "16.0.3",
"@nrwl/eslint-plugin-nx": "15.9.2", "@nx/eslint-plugin": "16.0.3",
"@nrwl/jest": "15.9.2", "@nx/jest": "16.0.3",
"@nrwl/nest": "15.9.2", "@nx/nest": "16.0.3",
"@nrwl/node": "15.9.2", "@nx/node": "16.0.3",
"@nrwl/nx-cloud": "15.3.5", "@nx/storybook": "16.1.1",
"@nrwl/storybook": "15.9.2", "@nx/workspace": "16.0.3",
"@nrwl/workspace": "15.9.2",
"@schematics/angular": "15.2.5", "@schematics/angular": "15.2.5",
"@simplewebauthn/typescript-types": "5.2.1", "@simplewebauthn/typescript-types": "5.2.1",
"@storybook/addon-essentials": "6.5.16", "@storybook/addon-essentials": "7.0.9",
"@storybook/angular": "6.5.16", "@storybook/angular": "7.0.9",
"@storybook/builder-webpack5": "6.5.16", "@storybook/core-server": "7.0.9",
"@storybook/core-server": "6.5.16",
"@storybook/manager-webpack5": "6.5.16",
"@types/big.js": "6.1.6", "@types/big.js": "6.1.6",
"@types/body-parser": "1.19.2", "@types/body-parser": "1.19.2",
"@types/cache-manager": "3.4.2", "@types/cache-manager": "3.4.2",
@ -179,17 +175,20 @@
"eslint-config-prettier": "8.6.0", "eslint-config-prettier": "8.6.0",
"eslint-plugin-cypress": "2.12.1", "eslint-plugin-cypress": "2.12.1",
"eslint-plugin-import": "2.27.5", "eslint-plugin-import": "2.27.5",
"eslint-plugin-storybook": "0.6.12",
"import-sort-cli": "6.0.0", "import-sort-cli": "6.0.0",
"import-sort-parser-typescript": "6.0.0", "import-sort-parser-typescript": "6.0.0",
"import-sort-style-module": "6.0.0", "import-sort-style-module": "6.0.0",
"jest": "29.4.3", "jest": "29.4.3",
"jest-environment-jsdom": "29.4.3", "jest-environment-jsdom": "29.4.3",
"jest-preset-angular": "13.0.0", "jest-preset-angular": "13.0.0",
"nx": "15.9.2", "nx": "16.0.3",
"nx-cloud": "16.0.5",
"prettier": "2.8.4", "prettier": "2.8.4",
"prettier-plugin-organize-attributes": "0.0.5", "prettier-plugin-organize-attributes": "0.0.5",
"replace-in-file": "6.3.5", "replace-in-file": "6.3.5",
"ts-jest": "29.0.5", "storybook": "7.0.9",
"ts-jest": "29.1.0",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tslib": "2.0.0", "tslib": "2.0.0",
"typescript": "4.9.5" "typescript": "4.9.5"

13747
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save