chore(misc): update snapshots to latest format (#16276)

This commit is contained in:
Caleb Ukle 2023-04-14 10:29:06 -05:00 committed by GitHub
parent a42cc57354
commit 85b3315b34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
113 changed files with 4374 additions and 4404 deletions

View File

@ -16,14 +16,4 @@ export default {
modulePathIgnorePatterns: [ modulePathIgnorePatterns: [
'/graph/client/src/app/machines/match-media-mock.spec.ts', '/graph/client/src/app/machines/match-media-mock.spec.ts',
], ],
/* 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: From within the project directory, run "nx test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/
snapshotFormat: { escapeString: true, printBasicPrototype: true },
}; };

View File

@ -14,14 +14,4 @@ module.exports = {
moduleFileExtensions: ['ts', 'js', 'html'], moduleFileExtensions: ['ts', 'js', 'html'],
coverageReporters: ['html'], coverageReporters: ['html'],
maxWorkers: 1, maxWorkers: 1,
/* 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,run-e2e-tests,xtest --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/
snapshotFormat: { escapeString: true, printBasicPrototype: true },
}; };

View File

@ -11,14 +11,4 @@ module.exports = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/nx-dev/nx-dev', coverageDirectory: '../../coverage/nx-dev/nx-dev',
setupFilesAfterEnv: ['<rootDir>/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/test-setup.ts'],
/* 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: From within the project directory, run "nx test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/
snapshotFormat: { escapeString: true, printBasicPrototype: true },
}; };

View File

@ -1,34 +1,34 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`addLinting generator should correctly generate the .eslintrc.json file 1`] = ` exports[`addLinting generator should correctly generate the .eslintrc.json file 1`] = `
Object { {
"extends": Array [ "extends": [
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/angular", "plugin:@nrwl/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates", "plugin:@angular-eslint/template/process-inline-templates",
], ],
"files": Array [ "files": [
"*.ts", "*.ts",
], ],
"rules": Object { "rules": {
"@angular-eslint/component-selector": Array [ "@angular-eslint/component-selector": [
"error", "error",
Object { {
"prefix": "my-org", "prefix": "my-org",
"style": "kebab-case", "style": "kebab-case",
"type": "element", "type": "element",
}, },
], ],
"@angular-eslint/directive-selector": Array [ "@angular-eslint/directive-selector": [
"error", "error",
Object { {
"prefix": "myOrg", "prefix": "myOrg",
"style": "camelCase", "style": "camelCase",
"type": "attribute", "type": "attribute",
@ -36,48 +36,48 @@ Object {
], ],
}, },
}, },
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/angular-template", "plugin:@nrwl/nx/angular-template",
], ],
"files": Array [ "files": [
"*.html", "*.html",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }
`; `;
exports[`addLinting generator support angular v14 should correctly generate the .eslintrc.json file 1`] = ` exports[`addLinting generator support angular v14 should correctly generate the .eslintrc.json file 1`] = `
Object { {
"extends": Array [ "extends": [
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/angular", "plugin:@nrwl/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates", "plugin:@angular-eslint/template/process-inline-templates",
], ],
"files": Array [ "files": [
"*.ts", "*.ts",
], ],
"rules": Object { "rules": {
"@angular-eslint/component-selector": Array [ "@angular-eslint/component-selector": [
"error", "error",
Object { {
"prefix": "my-org", "prefix": "my-org",
"style": "kebab-case", "style": "kebab-case",
"type": "element", "type": "element",
}, },
], ],
"@angular-eslint/directive-selector": Array [ "@angular-eslint/directive-selector": [
"error", "error",
Object { {
"prefix": "myOrg", "prefix": "myOrg",
"style": "camelCase", "style": "camelCase",
"type": "attribute", "type": "attribute",
@ -85,14 +85,14 @@ Object {
], ],
}, },
}, },
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/angular-template", "plugin:@nrwl/nx/angular-template",
], ],
"files": Array [ "files": [
"*.html", "*.html",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }

View File

@ -335,14 +335,14 @@ describe('AppComponent', () => {
`; `;
exports[`app --strict should enable strict type checking: app tsconfig.json 1`] = ` exports[`app --strict should enable strict type checking: app tsconfig.json 1`] = `
Object { {
"angularCompilerOptions": Object { "angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false, "enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true, "strictInjectionParameters": true,
"strictInputAccessModifiers": true, "strictInputAccessModifiers": true,
"strictTemplates": true, "strictTemplates": true,
}, },
"compilerOptions": Object { "compilerOptions": {
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"noImplicitOverride": true, "noImplicitOverride": true,
@ -353,16 +353,16 @@ Object {
"useDefineForClassFields": false, "useDefineForClassFields": false,
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"files": Array [], "files": [],
"include": Array [], "include": [],
"references": Array [ "references": [
Object { {
"path": "./tsconfig.app.json", "path": "./tsconfig.app.json",
}, },
Object { {
"path": "./tsconfig.spec.json", "path": "./tsconfig.spec.json",
}, },
Object { {
"path": "./tsconfig.editor.json", "path": "./tsconfig.editor.json",
}, },
], ],
@ -370,8 +370,8 @@ Object {
`; `;
exports[`app --strict should enable strict type checking: e2e tsconfig.json 1`] = ` exports[`app --strict should enable strict type checking: e2e tsconfig.json 1`] = `
Object { {
"compilerOptions": Object { "compilerOptions": {
"allowJs": true, "allowJs": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
@ -381,13 +381,13 @@ Object {
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"sourceMap": false, "sourceMap": false,
"strict": true, "strict": true,
"types": Array [ "types": [
"cypress", "cypress",
"node", "node",
], ],
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"include": Array [ "include": [
"src/**/*.ts", "src/**/*.ts",
"src/**/*.js", "src/**/*.js",
"cypress.config.ts", "cypress.config.ts",
@ -398,18 +398,18 @@ Object {
exports[`app at the root should accept numbers in the path 1`] = `"src/9-websites/my-app"`; exports[`app at the root should accept numbers in the path 1`] = `"src/9-websites/my-app"`;
exports[`app nested should create project configs 1`] = ` exports[`app nested should create project configs 1`] = `
Object { {
"$schema": "../../../node_modules/nx/schemas/project-schema.json", "$schema": "../../../node_modules/nx/schemas/project-schema.json",
"name": "my-dir-my-app", "name": "my-dir-my-app",
"prefix": "proj", "prefix": "proj",
"projectType": "application", "projectType": "application",
"root": "apps/my-dir/my-app", "root": "apps/my-dir/my-app",
"sourceRoot": "apps/my-dir/my-app/src", "sourceRoot": "apps/my-dir/my-app/src",
"tags": Array [], "tags": [],
"targets": Object { "targets": {
"build": Object { "build": {
"configurations": Object { "configurations": {
"development": Object { "development": {
"buildOptimizer": false, "buildOptimizer": false,
"extractLicenses": false, "extractLicenses": false,
"namedChunks": true, "namedChunks": true,
@ -417,14 +417,14 @@ Object {
"sourceMap": true, "sourceMap": true,
"vendorChunk": true, "vendorChunk": true,
}, },
"production": Object { "production": {
"budgets": Array [ "budgets": [
Object { {
"maximumError": "1mb", "maximumError": "1mb",
"maximumWarning": "500kb", "maximumWarning": "500kb",
"type": "initial", "type": "initial",
}, },
Object { {
"maximumError": "4kb", "maximumError": "4kb",
"maximumWarning": "2kb", "maximumWarning": "2kb",
"type": "anyComponentStyle", "type": "anyComponentStyle",
@ -435,76 +435,76 @@ Object {
}, },
"defaultConfiguration": "production", "defaultConfiguration": "production",
"executor": "@angular-devkit/build-angular:browser", "executor": "@angular-devkit/build-angular:browser",
"options": Object { "options": {
"assets": Array [ "assets": [
"apps/my-dir/my-app/src/favicon.ico", "apps/my-dir/my-app/src/favicon.ico",
"apps/my-dir/my-app/src/assets", "apps/my-dir/my-app/src/assets",
], ],
"index": "apps/my-dir/my-app/src/index.html", "index": "apps/my-dir/my-app/src/index.html",
"main": "apps/my-dir/my-app/src/main.ts", "main": "apps/my-dir/my-app/src/main.ts",
"outputPath": "dist/apps/my-dir/my-app", "outputPath": "dist/apps/my-dir/my-app",
"polyfills": Array [ "polyfills": [
"zone.js", "zone.js",
], ],
"scripts": Array [], "scripts": [],
"styles": Array [ "styles": [
"apps/my-dir/my-app/src/styles.css", "apps/my-dir/my-app/src/styles.css",
], ],
"tsConfig": "apps/my-dir/my-app/tsconfig.app.json", "tsConfig": "apps/my-dir/my-app/tsconfig.app.json",
}, },
"outputs": Array [ "outputs": [
"{options.outputPath}", "{options.outputPath}",
], ],
}, },
"extract-i18n": Object { "extract-i18n": {
"executor": "@angular-devkit/build-angular:extract-i18n", "executor": "@angular-devkit/build-angular:extract-i18n",
"options": Object { "options": {
"browserTarget": "my-dir-my-app:build", "browserTarget": "my-dir-my-app:build",
}, },
}, },
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-dir/my-app/**/*.ts", "apps/my-dir/my-app/**/*.ts",
"apps/my-dir/my-app/**/*.html", "apps/my-dir/my-app/**/*.html",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
"serve": Object { "serve": {
"configurations": Object { "configurations": {
"development": Object { "development": {
"browserTarget": "my-dir-my-app:build:development", "browserTarget": "my-dir-my-app:build:development",
}, },
"production": Object { "production": {
"browserTarget": "my-dir-my-app:build:production", "browserTarget": "my-dir-my-app:build:production",
}, },
}, },
"defaultConfiguration": "development", "defaultConfiguration": "development",
"executor": "@angular-devkit/build-angular:dev-server", "executor": "@angular-devkit/build-angular:dev-server",
}, },
"serve-static": Object { "serve-static": {
"executor": "@nrwl/web:file-server", "executor": "@nrwl/web:file-server",
"options": Object { "options": {
"buildTarget": "my-dir-my-app:build", "buildTarget": "my-dir-my-app:build",
}, },
}, },
"test": Object { "test": {
"configurations": Object { "configurations": {
"ci": Object { "ci": {
"ci": true, "ci": true,
"codeCoverage": true, "codeCoverage": true,
}, },
}, },
"executor": "@nrwl/jest:jest", "executor": "@nrwl/jest:jest",
"options": Object { "options": {
"jestConfig": "apps/my-dir/my-app/jest.config.ts", "jestConfig": "apps/my-dir/my-app/jest.config.ts",
"passWithNoTests": true, "passWithNoTests": true,
}, },
"outputs": Array [ "outputs": [
"{workspaceRoot}/coverage/{projectRoot}", "{workspaceRoot}/coverage/{projectRoot}",
], ],
}, },
@ -513,41 +513,41 @@ Object {
`; `;
exports[`app nested should create project configs 2`] = ` exports[`app nested should create project configs 2`] = `
Object { {
"$schema": "../../../node_modules/nx/schemas/project-schema.json", "$schema": "../../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": Array [ "implicitDependencies": [
"my-dir-my-app", "my-dir-my-app",
], ],
"name": "my-dir-my-app-e2e", "name": "my-dir-my-app-e2e",
"projectType": "application", "projectType": "application",
"root": "apps/my-dir/my-app-e2e", "root": "apps/my-dir/my-app-e2e",
"sourceRoot": "apps/my-dir/my-app-e2e/src", "sourceRoot": "apps/my-dir/my-app-e2e/src",
"tags": Array [], "tags": [],
"targets": Object { "targets": {
"e2e": Object { "e2e": {
"configurations": Object { "configurations": {
"ci": Object { "ci": {
"devServerTarget": "my-dir-my-app:serve-static", "devServerTarget": "my-dir-my-app:serve-static",
}, },
"production": Object { "production": {
"devServerTarget": "my-dir-my-app:serve:production", "devServerTarget": "my-dir-my-app:serve:production",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/my-dir/my-app-e2e/cypress.config.ts", "cypressConfig": "apps/my-dir/my-app-e2e/cypress.config.ts",
"devServerTarget": "my-dir-my-app:serve:development", "devServerTarget": "my-dir-my-app:serve:development",
"testingType": "e2e", "testingType": "e2e",
}, },
}, },
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-dir/my-app-e2e/**/*.{js,ts}", "apps/my-dir/my-app-e2e/**/*.{js,ts}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
@ -556,18 +556,18 @@ Object {
`; `;
exports[`app not nested should create project configs 1`] = ` exports[`app not nested should create project configs 1`] = `
Object { {
"$schema": "../../node_modules/nx/schemas/project-schema.json", "$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "my-app", "name": "my-app",
"prefix": "proj", "prefix": "proj",
"projectType": "application", "projectType": "application",
"root": "apps/my-app", "root": "apps/my-app",
"sourceRoot": "apps/my-app/src", "sourceRoot": "apps/my-app/src",
"tags": Array [], "tags": [],
"targets": Object { "targets": {
"build": Object { "build": {
"configurations": Object { "configurations": {
"development": Object { "development": {
"buildOptimizer": false, "buildOptimizer": false,
"extractLicenses": false, "extractLicenses": false,
"namedChunks": true, "namedChunks": true,
@ -575,14 +575,14 @@ Object {
"sourceMap": true, "sourceMap": true,
"vendorChunk": true, "vendorChunk": true,
}, },
"production": Object { "production": {
"budgets": Array [ "budgets": [
Object { {
"maximumError": "1mb", "maximumError": "1mb",
"maximumWarning": "500kb", "maximumWarning": "500kb",
"type": "initial", "type": "initial",
}, },
Object { {
"maximumError": "4kb", "maximumError": "4kb",
"maximumWarning": "2kb", "maximumWarning": "2kb",
"type": "anyComponentStyle", "type": "anyComponentStyle",
@ -593,76 +593,76 @@ Object {
}, },
"defaultConfiguration": "production", "defaultConfiguration": "production",
"executor": "@angular-devkit/build-angular:browser", "executor": "@angular-devkit/build-angular:browser",
"options": Object { "options": {
"assets": Array [ "assets": [
"apps/my-app/src/favicon.ico", "apps/my-app/src/favicon.ico",
"apps/my-app/src/assets", "apps/my-app/src/assets",
], ],
"index": "apps/my-app/src/index.html", "index": "apps/my-app/src/index.html",
"main": "apps/my-app/src/main.ts", "main": "apps/my-app/src/main.ts",
"outputPath": "dist/apps/my-app", "outputPath": "dist/apps/my-app",
"polyfills": Array [ "polyfills": [
"zone.js", "zone.js",
], ],
"scripts": Array [], "scripts": [],
"styles": Array [ "styles": [
"apps/my-app/src/styles.css", "apps/my-app/src/styles.css",
], ],
"tsConfig": "apps/my-app/tsconfig.app.json", "tsConfig": "apps/my-app/tsconfig.app.json",
}, },
"outputs": Array [ "outputs": [
"{options.outputPath}", "{options.outputPath}",
], ],
}, },
"extract-i18n": Object { "extract-i18n": {
"executor": "@angular-devkit/build-angular:extract-i18n", "executor": "@angular-devkit/build-angular:extract-i18n",
"options": Object { "options": {
"browserTarget": "my-app:build", "browserTarget": "my-app:build",
}, },
}, },
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-app/**/*.ts", "apps/my-app/**/*.ts",
"apps/my-app/**/*.html", "apps/my-app/**/*.html",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
"serve": Object { "serve": {
"configurations": Object { "configurations": {
"development": Object { "development": {
"browserTarget": "my-app:build:development", "browserTarget": "my-app:build:development",
}, },
"production": Object { "production": {
"browserTarget": "my-app:build:production", "browserTarget": "my-app:build:production",
}, },
}, },
"defaultConfiguration": "development", "defaultConfiguration": "development",
"executor": "@angular-devkit/build-angular:dev-server", "executor": "@angular-devkit/build-angular:dev-server",
}, },
"serve-static": Object { "serve-static": {
"executor": "@nrwl/web:file-server", "executor": "@nrwl/web:file-server",
"options": Object { "options": {
"buildTarget": "my-app:build", "buildTarget": "my-app:build",
}, },
}, },
"test": Object { "test": {
"configurations": Object { "configurations": {
"ci": Object { "ci": {
"ci": true, "ci": true,
"codeCoverage": true, "codeCoverage": true,
}, },
}, },
"executor": "@nrwl/jest:jest", "executor": "@nrwl/jest:jest",
"options": Object { "options": {
"jestConfig": "apps/my-app/jest.config.ts", "jestConfig": "apps/my-app/jest.config.ts",
"passWithNoTests": true, "passWithNoTests": true,
}, },
"outputs": Array [ "outputs": [
"{workspaceRoot}/coverage/{projectRoot}", "{workspaceRoot}/coverage/{projectRoot}",
], ],
}, },
@ -671,41 +671,41 @@ Object {
`; `;
exports[`app not nested should create project configs 2`] = ` exports[`app not nested should create project configs 2`] = `
Object { {
"$schema": "../../node_modules/nx/schemas/project-schema.json", "$schema": "../../node_modules/nx/schemas/project-schema.json",
"implicitDependencies": Array [ "implicitDependencies": [
"my-app", "my-app",
], ],
"name": "my-app-e2e", "name": "my-app-e2e",
"projectType": "application", "projectType": "application",
"root": "apps/my-app-e2e", "root": "apps/my-app-e2e",
"sourceRoot": "apps/my-app-e2e/src", "sourceRoot": "apps/my-app-e2e/src",
"tags": Array [], "tags": [],
"targets": Object { "targets": {
"e2e": Object { "e2e": {
"configurations": Object { "configurations": {
"ci": Object { "ci": {
"devServerTarget": "my-app:serve-static", "devServerTarget": "my-app:serve-static",
}, },
"production": Object { "production": {
"devServerTarget": "my-app:serve:production", "devServerTarget": "my-app:serve:production",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/my-app-e2e/cypress.config.ts", "cypressConfig": "apps/my-app-e2e/cypress.config.ts",
"devServerTarget": "my-app:serve:development", "devServerTarget": "my-app:serve:development",
"testingType": "e2e", "testingType": "e2e",
}, },
}, },
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-app-e2e/**/*.{js,ts}", "apps/my-app-e2e/**/*.{js,ts}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
@ -714,8 +714,8 @@ Object {
`; `;
exports[`app not nested should generate files: e2e tsconfig.json 1`] = ` exports[`app not nested should generate files: e2e tsconfig.json 1`] = `
Object { {
"compilerOptions": Object { "compilerOptions": {
"allowJs": true, "allowJs": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
@ -725,13 +725,13 @@ Object {
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"sourceMap": false, "sourceMap": false,
"strict": true, "strict": true,
"types": Array [ "types": [
"cypress", "cypress",
"node", "node",
], ],
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"include": Array [ "include": [
"src/**/*.ts", "src/**/*.ts",
"src/**/*.js", "src/**/*.js",
"cypress.config.ts", "cypress.config.ts",
@ -740,35 +740,35 @@ Object {
`; `;
exports[`app not nested should generate files: tsconfig.app.json 1`] = ` exports[`app not nested should generate files: tsconfig.app.json 1`] = `
Object { {
"compilerOptions": Object { "compilerOptions": {
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"types": Array [], "types": [],
}, },
"exclude": Array [ "exclude": [
"jest.config.ts", "jest.config.ts",
"src/**/*.test.ts", "src/**/*.test.ts",
"src/**/*.spec.ts", "src/**/*.spec.ts",
], ],
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"files": Array [ "files": [
"src/main.ts", "src/main.ts",
], ],
"include": Array [ "include": [
"src/**/*.d.ts", "src/**/*.d.ts",
], ],
} }
`; `;
exports[`app not nested should generate files: tsconfig.json 1`] = ` exports[`app not nested should generate files: tsconfig.json 1`] = `
Object { {
"angularCompilerOptions": Object { "angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false, "enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true, "strictInjectionParameters": true,
"strictInputAccessModifiers": true, "strictInputAccessModifiers": true,
"strictTemplates": true, "strictTemplates": true,
}, },
"compilerOptions": Object { "compilerOptions": {
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"noImplicitOverride": true, "noImplicitOverride": true,
@ -779,16 +779,16 @@ Object {
"useDefineForClassFields": false, "useDefineForClassFields": false,
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"files": Array [], "files": [],
"include": Array [], "include": [],
"references": Array [ "references": [
Object { {
"path": "./tsconfig.app.json", "path": "./tsconfig.app.json",
}, },
Object { {
"path": "./tsconfig.spec.json", "path": "./tsconfig.spec.json",
}, },
Object { {
"path": "./tsconfig.editor.json", "path": "./tsconfig.editor.json",
}, },
], ],

View File

@ -462,29 +462,29 @@ describe('app', () => {
await generateApp(appTree, 'myApp', { linter: Linter.EsLint }); await generateApp(appTree, 'myApp', { linter: Linter.EsLint });
expect(readProjectConfiguration(appTree, 'my-app').targets.lint) expect(readProjectConfiguration(appTree, 'my-app').targets.lint)
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-app/**/*.ts", "apps/my-app/**/*.ts",
"apps/my-app/**/*.html", "apps/my-app/**/*.html",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
} }
`); `);
expect(readProjectConfiguration(appTree, 'my-app-e2e').targets.lint) expect(readProjectConfiguration(appTree, 'my-app-e2e').targets.lint)
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-app-e2e/**/*.{js,ts}", "apps/my-app-e2e/**/*.{js,ts}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
} }
@ -496,34 +496,34 @@ describe('app', () => {
const eslintConfig = readJson(appTree, 'apps/my-app/.eslintrc.json'); const eslintConfig = readJson(appTree, 'apps/my-app/.eslintrc.json');
expect(eslintConfig).toMatchInlineSnapshot(` expect(eslintConfig).toMatchInlineSnapshot(`
Object { {
"extends": Array [ "extends": [
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/angular", "plugin:@nrwl/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates", "plugin:@angular-eslint/template/process-inline-templates",
], ],
"files": Array [ "files": [
"*.ts", "*.ts",
], ],
"rules": Object { "rules": {
"@angular-eslint/component-selector": Array [ "@angular-eslint/component-selector": [
"error", "error",
Object { {
"prefix": "proj", "prefix": "proj",
"style": "kebab-case", "style": "kebab-case",
"type": "element", "type": "element",
}, },
], ],
"@angular-eslint/directive-selector": Array [ "@angular-eslint/directive-selector": [
"error", "error",
Object { {
"prefix": "proj", "prefix": "proj",
"style": "camelCase", "style": "camelCase",
"type": "attribute", "type": "attribute",
@ -531,14 +531,14 @@ describe('app', () => {
], ],
}, },
}, },
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/angular-template", "plugin:@nrwl/nx/angular-template",
], ],
"files": Array [ "files": [
"*.html", "*.html",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`writeNewWebpackConfig should convert config that is both remote and host correctly 1`] = ` exports[`writeNewWebpackConfig should convert config that is both remote and host correctly 1`] = `
Array [ [
"const { withModuleFederation } = require('@nrwl/angular/module-federation'); "const { withModuleFederation } = require('@nrwl/angular/module-federation');
const config = require('./module-federation.config'); const config = require('./module-federation.config');
module.exports = withModuleFederation(config);", module.exports = withModuleFederation(config);",
@ -17,7 +17,7 @@ Array [
`; `;
exports[`writeNewWebpackConfig should convert config that is neither remote and host correctly 1`] = ` exports[`writeNewWebpackConfig should convert config that is neither remote and host correctly 1`] = `
Array [ [
"const { withModuleFederation } = require('@nrwl/angular/module-federation'); "const { withModuleFederation } = require('@nrwl/angular/module-federation');
const config = require('./module-federation.config'); const config = require('./module-federation.config');
module.exports = withModuleFederation(config);", module.exports = withModuleFederation(config);",
@ -29,7 +29,7 @@ Array [
`; `;
exports[`writeNewWebpackConfig should convert host config correctly 1`] = ` exports[`writeNewWebpackConfig should convert host config correctly 1`] = `
Array [ [
"const { withModuleFederation } = require('@nrwl/angular/module-federation'); "const { withModuleFederation } = require('@nrwl/angular/module-federation');
const config = require('./module-federation.config'); const config = require('./module-federation.config');
module.exports = withModuleFederation(config);", module.exports = withModuleFederation(config);",
@ -42,7 +42,7 @@ Array [
`; `;
exports[`writeNewWebpackConfig should convert remote config correctly 1`] = ` exports[`writeNewWebpackConfig should convert remote config correctly 1`] = `
Array [ [
"const { withModuleFederation } = require('@nrwl/angular/module-federation'); "const { withModuleFederation } = require('@nrwl/angular/module-federation');
const config = require('./module-federation.config'); const config = require('./module-federation.config');
module.exports = withModuleFederation(config);", module.exports = withModuleFederation(config);",

View File

@ -161,24 +161,24 @@ export const appRoutes: Route[] = [
`; `;
exports[`Host App Generator --ssr should generate the correct files 9`] = ` exports[`Host App Generator --ssr should generate the correct files 9`] = `
Object { {
"configurations": Object { "configurations": {
"development": Object { "development": {
"extractLicenses": false, "extractLicenses": false,
"optimization": false, "optimization": false,
"sourceMap": true, "sourceMap": true,
}, },
"production": Object { "production": {
"outputHashing": "media", "outputHashing": "media",
}, },
}, },
"defaultConfiguration": "production", "defaultConfiguration": "production",
"dependsOn": Array [ "dependsOn": [
"build", "build",
], ],
"executor": "@nrwl/angular:webpack-server", "executor": "@nrwl/angular:webpack-server",
"options": Object { "options": {
"customWebpackConfig": Object { "customWebpackConfig": {
"path": "apps/test/webpack.server.config.js", "path": "apps/test/webpack.server.config.js",
}, },
"main": "apps/test/server.ts", "main": "apps/test/server.ts",
@ -189,13 +189,13 @@ Object {
`; `;
exports[`Host App Generator --ssr should generate the correct files 10`] = ` exports[`Host App Generator --ssr should generate the correct files 10`] = `
Object { {
"configurations": Object { "configurations": {
"development": Object { "development": {
"browserTarget": "test:build:development", "browserTarget": "test:build:development",
"serverTarget": "test:server:development", "serverTarget": "test:server:development",
}, },
"production": Object { "production": {
"browserTarget": "test:build:production", "browserTarget": "test:build:production",
"serverTarget": "test:server:production", "serverTarget": "test:server:production",
}, },

View File

@ -64,10 +64,10 @@ describe('Host App Generator', () => {
).toContain(`'remote1', 'remote2'`); ).toContain(`'remote1', 'remote2'`);
expect(tree.read('apps/host-app/src/app/app.component.html', 'utf-8')) expect(tree.read('apps/host-app/src/app/app.component.html', 'utf-8'))
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
"<ul class=\\"remote-menu\\"> "<ul class="remote-menu">
<li><a routerLink=\\"/\\">Home</a></li> <li><a routerLink="/">Home</a></li>
<li><a routerLink=\\"remote1\\">Remote1</a></li> <li><a routerLink="remote1">Remote1</a></li>
<li><a routerLink=\\"remote2\\">Remote2</a></li> <li><a routerLink="remote2">Remote2</a></li>
</ul> </ul>
<router-outlet></router-outlet> <router-outlet></router-outlet>
" "

View File

@ -1107,15 +1107,15 @@ describe('lib', () => {
expect(tree.exists('libs/my-lib/tslint.json')).toBe(false); expect(tree.exists('libs/my-lib/tslint.json')).toBe(false);
expect(readProjectConfiguration(tree, 'my-lib').targets['lint']) expect(readProjectConfiguration(tree, 'my-lib').targets['lint'])
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"libs/my-lib/**/*.ts", "libs/my-lib/**/*.ts",
"libs/my-lib/**/*.html", "libs/my-lib/**/*.html",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
} }
@ -1130,34 +1130,34 @@ describe('lib', () => {
const eslintConfig = readJson(tree, 'libs/my-lib/.eslintrc.json'); const eslintConfig = readJson(tree, 'libs/my-lib/.eslintrc.json');
expect(eslintConfig).toMatchInlineSnapshot(` expect(eslintConfig).toMatchInlineSnapshot(`
Object { {
"extends": Array [ "extends": [
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/angular", "plugin:@nrwl/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates", "plugin:@angular-eslint/template/process-inline-templates",
], ],
"files": Array [ "files": [
"*.ts", "*.ts",
], ],
"rules": Object { "rules": {
"@angular-eslint/component-selector": Array [ "@angular-eslint/component-selector": [
"error", "error",
Object { {
"prefix": "proj", "prefix": "proj",
"style": "kebab-case", "style": "kebab-case",
"type": "element", "type": "element",
}, },
], ],
"@angular-eslint/directive-selector": Array [ "@angular-eslint/directive-selector": [
"error", "error",
Object { {
"prefix": "proj", "prefix": "proj",
"style": "camelCase", "style": "camelCase",
"type": "attribute", "type": "attribute",
@ -1165,14 +1165,14 @@ describe('lib', () => {
], ],
}, },
}, },
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/angular-template", "plugin:@nrwl/nx/angular-template",
], ],
"files": Array [ "files": [
"*.html", "*.html",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }
@ -1369,7 +1369,7 @@ describe('lib', () => {
tree.read('libs/my-lib/src/lib/lib.routes.ts', 'utf-8') tree.read('libs/my-lib/src/lib/lib.routes.ts', 'utf-8')
).toMatchSnapshot(); ).toMatchSnapshot();
expect(tree.children('libs/my-lib/src/lib')).toMatchInlineSnapshot(` expect(tree.children('libs/my-lib/src/lib')).toMatchInlineSnapshot(`
Array [ [
"lib.routes.ts", "lib.routes.ts",
"my-lib.component.css", "my-lib.component.css",
"my-lib.component.html", "my-lib.component.html",
@ -1378,7 +1378,7 @@ describe('lib', () => {
] ]
`); `);
expect(tree.children('libs/my-lib/src')).toMatchInlineSnapshot(` expect(tree.children('libs/my-lib/src')).toMatchInlineSnapshot(`
Array [ [
"index.ts", "index.ts",
"lib", "lib",
"test-setup.ts", "test-setup.ts",

View File

@ -1,34 +1,34 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`workspace move to nx layout should create a root eslint config 1`] = ` exports[`workspace move to nx layout should create a root eslint config 1`] = `
Object { {
"ignorePatterns": Array [ "ignorePatterns": [
"**/*", "**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"extends": Array [ "extends": [
"plugin:@angular-eslint/recommended", "plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates", "plugin:@angular-eslint/template/process-inline-templates",
], ],
"files": Array [ "files": [
"*.ts", "*.ts",
], ],
"parserOptions": Object { "parserOptions": {
"createDefaultProgram": true, "createDefaultProgram": true,
}, },
"rules": Object { "rules": {
"@angular-eslint/component-selector": Array [ "@angular-eslint/component-selector": [
"error", "error",
Object { {
"prefix": "app", "prefix": "app",
"style": "kebab-case", "style": "kebab-case",
"type": "element", "type": "element",
}, },
], ],
"@angular-eslint/directive-selector": Array [ "@angular-eslint/directive-selector": [
"error", "error",
Object { {
"prefix": "app", "prefix": "app",
"style": "camelCase", "style": "camelCase",
"type": "attribute", "type": "attribute",
@ -36,30 +36,30 @@ Object {
], ],
}, },
}, },
Object { {
"extends": Array [ "extends": [
"plugin:@angular-eslint/template/recommended", "plugin:@angular-eslint/template/recommended",
], ],
"files": Array [ "files": [
"*.html", "*.html",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object { "rules": {
"@nrwl/nx/enforce-module-boundaries": Array [ "@nrwl/nx/enforce-module-boundaries": [
"error", "error",
Object { {
"allow": Array [], "allow": [],
"depConstraints": Array [ "depConstraints": [
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"*", "*",
], ],
"sourceTag": "*", "sourceTag": "*",
@ -71,7 +71,7 @@ Object {
}, },
}, },
], ],
"plugins": Array [ "plugins": [
"@nrwl/nx", "@nrwl/nx",
], ],
"root": true, "root": true,
@ -79,60 +79,60 @@ Object {
`; `;
exports[`workspace move to nx layout should create nx.json 1`] = ` exports[`workspace move to nx layout should create nx.json 1`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"defaultProject": "myApp", "defaultProject": "myApp",
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
"!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/**/*.spec.[jt]s", "!{projectRoot}/**/*.spec.[jt]s",
"!{projectRoot}/karma.conf.js", "!{projectRoot}/karma.conf.js",
"!{projectRoot}/.eslintrc.json", "!{projectRoot}/.eslintrc.json",
], ],
"sharedGlobals": Array [], "sharedGlobals": [],
}, },
"npmScope": "my-org", "npmScope": "my-org",
"targetDefaults": Object { "targetDefaults": {
"build": Object { "build": {
"dependsOn": Array [ "dependsOn": [
"^build", "^build",
], ],
"inputs": Array [ "inputs": [
"production", "production",
"^production", "^production",
], ],
}, },
"e2e": Object { "e2e": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
], ],
}, },
"lint": Object { "lint": {
"inputs": Array [ "inputs": [
"default", "default",
"{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/.eslintrc.json",
], ],
}, },
"test": Object { "test": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
"{workspaceRoot}/karma.conf.js", "{workspaceRoot}/karma.conf.js",
], ],
}, },
}, },
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"test", "test",
"lint", "lint",
@ -146,13 +146,13 @@ Object {
`; `;
exports[`workspace move to nx layout should update tsconfig.base.json if present 1`] = ` exports[`workspace move to nx layout should update tsconfig.base.json if present 1`] = `
Object { {
"compilerOptions": Object { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"paths": Object {}, "paths": {},
"rootDir": ".", "rootDir": ".",
}, },
"exclude": Array [ "exclude": [
"node_modules", "node_modules",
"tmp", "tmp",
], ],
@ -160,13 +160,13 @@ Object {
`; `;
exports[`workspace move to nx layout should work if angular-cli workspace had tsconfig.base.json 1`] = ` exports[`workspace move to nx layout should work if angular-cli workspace had tsconfig.base.json 1`] = `
Object { {
"compilerOptions": Object { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"paths": Object {}, "paths": {},
"rootDir": ".", "rootDir": ".",
}, },
"exclude": Array [ "exclude": [
"node_modules", "node_modules",
"tmp", "tmp",
], ],

View File

@ -125,7 +125,7 @@ describe('app migrator', () => {
`The "build" target is using a builder "@not/supported:builder" that's not currently supported by the automated migration. The target will be skipped.`, `The "build" target is using a builder "@not/supported:builder" that's not currently supported by the automated migration. The target will be skipped.`,
]); ]);
expect(result[0].hint).toMatchInlineSnapshot( expect(result[0].hint).toMatchInlineSnapshot(
`"Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could revert the migration, change the builder to one of the builders supported by the automated migration (\\"@angular-devkit/build-angular:browser\\", \\"@angular-devkit/build-angular:protractor\\", \\"@cypress/schematic:cypress\\", \\"@angular-devkit/build-angular:extract-i18n\\", \\"@nguniversal/builders:prerender\\", \\"@angular-devkit/build-angular:dev-server\\", \\"@angular-devkit/build-angular:server\\", \\"@nguniversal/builders:ssr-dev-server\\", \\"@angular-devkit/build-angular:karma\\" and \\"@angular-eslint/builder:lint\\"), and run the migration again."` `"Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could revert the migration, change the builder to one of the builders supported by the automated migration ("@angular-devkit/build-angular:browser", "@angular-devkit/build-angular:protractor", "@cypress/schematic:cypress", "@angular-devkit/build-angular:extract-i18n", "@nguniversal/builders:prerender", "@angular-devkit/build-angular:dev-server", "@angular-devkit/build-angular:server", "@nguniversal/builders:ssr-dev-server", "@angular-devkit/build-angular:karma" and "@angular-eslint/builder:lint"), and run the migration again."`
); );
}); });
@ -148,7 +148,7 @@ describe('app migrator', () => {
`The "test" target is using a builder "@other/not-supported:builder" that's not currently supported by the automated migration. The target will be skipped.`, `The "test" target is using a builder "@other/not-supported:builder" that's not currently supported by the automated migration. The target will be skipped.`,
]); ]);
expect(result[0].hint).toMatchInlineSnapshot( expect(result[0].hint).toMatchInlineSnapshot(
`"Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could revert the migration, change the builder to one of the builders supported by the automated migration (\\"@angular-devkit/build-angular:browser\\", \\"@angular-devkit/build-angular:protractor\\", \\"@cypress/schematic:cypress\\", \\"@angular-devkit/build-angular:extract-i18n\\", \\"@nguniversal/builders:prerender\\", \\"@angular-devkit/build-angular:dev-server\\", \\"@angular-devkit/build-angular:server\\", \\"@nguniversal/builders:ssr-dev-server\\", \\"@angular-devkit/build-angular:karma\\" and \\"@angular-eslint/builder:lint\\"), and run the migration again."` `"Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could revert the migration, change the builder to one of the builders supported by the automated migration ("@angular-devkit/build-angular:browser", "@angular-devkit/build-angular:protractor", "@cypress/schematic:cypress", "@angular-devkit/build-angular:extract-i18n", "@nguniversal/builders:prerender", "@angular-devkit/build-angular:dev-server", "@angular-devkit/build-angular:server", "@nguniversal/builders:ssr-dev-server", "@angular-devkit/build-angular:karma" and "@angular-eslint/builder:lint"), and run the migration again."`
); );
}); });
@ -167,7 +167,7 @@ describe('app migrator', () => {
`The "my-build" target is using a builder "@not/supported:builder" that's not currently supported by the automated migration. The target will be skipped.`, `The "my-build" target is using a builder "@not/supported:builder" that's not currently supported by the automated migration. The target will be skipped.`,
]); ]);
expect(result[0].hint).toMatchInlineSnapshot( expect(result[0].hint).toMatchInlineSnapshot(
`"Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could revert the migration, change the builder to one of the builders supported by the automated migration (\\"@angular-devkit/build-angular:browser\\", \\"@angular-devkit/build-angular:protractor\\", \\"@cypress/schematic:cypress\\", \\"@angular-devkit/build-angular:extract-i18n\\", \\"@nguniversal/builders:prerender\\", \\"@angular-devkit/build-angular:dev-server\\", \\"@angular-devkit/build-angular:server\\", \\"@nguniversal/builders:ssr-dev-server\\", \\"@angular-devkit/build-angular:karma\\" and \\"@angular-eslint/builder:lint\\"), and run the migration again."` `"Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could revert the migration, change the builder to one of the builders supported by the automated migration ("@angular-devkit/build-angular:browser", "@angular-devkit/build-angular:protractor", "@cypress/schematic:cypress", "@angular-devkit/build-angular:extract-i18n", "@nguniversal/builders:prerender", "@angular-devkit/build-angular:dev-server", "@angular-devkit/build-angular:server", "@nguniversal/builders:ssr-dev-server", "@angular-devkit/build-angular:karma" and "@angular-eslint/builder:lint"), and run the migration again."`
); );
}); });

View File

@ -128,7 +128,7 @@ describe('lib migrator', () => {
`The "build" target is using a builder "@not/supported:builder" that's not currently supported by the automated migration. The target will be skipped.`, `The "build" target is using a builder "@not/supported:builder" that's not currently supported by the automated migration. The target will be skipped.`,
]); ]);
expect(result[0].hint).toMatchInlineSnapshot( expect(result[0].hint).toMatchInlineSnapshot(
`"Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could revert the migration, change the builder to one of the builders supported by the automated migration (\\"@angular-devkit/build-angular:ng-packagr\\", \\"@angular-devkit/build-angular:karma\\" and \\"@angular-eslint/builder:lint\\"), and run the migration again."` `"Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could revert the migration, change the builder to one of the builders supported by the automated migration ("@angular-devkit/build-angular:ng-packagr", "@angular-devkit/build-angular:karma" and "@angular-eslint/builder:lint"), and run the migration again."`
); );
}); });
@ -151,7 +151,7 @@ describe('lib migrator', () => {
`The "test" target is using a builder "@other/not-supported:builder" that's not currently supported by the automated migration. The target will be skipped.`, `The "test" target is using a builder "@other/not-supported:builder" that's not currently supported by the automated migration. The target will be skipped.`,
]); ]);
expect(result[0].hint).toMatchInlineSnapshot( expect(result[0].hint).toMatchInlineSnapshot(
`"Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could revert the migration, change the builder to one of the builders supported by the automated migration (\\"@angular-devkit/build-angular:ng-packagr\\", \\"@angular-devkit/build-angular:karma\\" and \\"@angular-eslint/builder:lint\\"), and run the migration again."` `"Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could revert the migration, change the builder to one of the builders supported by the automated migration ("@angular-devkit/build-angular:ng-packagr", "@angular-devkit/build-angular:karma" and "@angular-eslint/builder:lint"), and run the migration again."`
); );
}); });
@ -170,7 +170,7 @@ describe('lib migrator', () => {
`The "my-build" target is using a builder "@not/supported:builder" that's not currently supported by the automated migration. The target will be skipped.`, `The "my-build" target is using a builder "@not/supported:builder" that's not currently supported by the automated migration. The target will be skipped.`,
]); ]);
expect(result[0].hint).toMatchInlineSnapshot( expect(result[0].hint).toMatchInlineSnapshot(
`"Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could revert the migration, change the builder to one of the builders supported by the automated migration (\\"@angular-devkit/build-angular:ng-packagr\\", \\"@angular-devkit/build-angular:karma\\" and \\"@angular-eslint/builder:lint\\"), and run the migration again."` `"Make sure to manually migrate the target configuration and any possible associated files. Alternatively, you could revert the migration, change the builder to one of the builders supported by the automated migration ("@angular-devkit/build-angular:ng-packagr", "@angular-devkit/build-angular:karma" and "@angular-eslint/builder:lint"), and run the migration again."`
); );
}); });

View File

@ -252,13 +252,13 @@ describe('SuperUsers Selectors', () => {
expect(selId).toBe('PRODUCT-BBB'); expect(selId).toBe('PRODUCT-BBB');
}); });
it('selectSuperUsersLoaded() should return the current \\"loaded\\" status', () => { it('selectSuperUsersLoaded() should return the current "loaded" status', () => {
const result = SuperUsersSelectors.selectSuperUsersLoaded(state); const result = SuperUsersSelectors.selectSuperUsersLoaded(state);
expect(result).toBe(true); expect(result).toBe(true);
}); });
it('selectSuperUsersError() should return the current \\"error\\" state', () => { it('selectSuperUsersError() should return the current "error" state', () => {
const result = SuperUsersSelectors.selectSuperUsersError(state); const result = SuperUsersSelectors.selectSuperUsersError(state);
expect(result).toBe(ERROR_MSG); expect(result).toBe(ERROR_MSG);

View File

@ -190,24 +190,24 @@ export const remoteRoutes: Route[] = [
`; `;
exports[`MF Remote App Generator --ssr should generate the correct files 11`] = ` exports[`MF Remote App Generator --ssr should generate the correct files 11`] = `
Object { {
"configurations": Object { "configurations": {
"development": Object { "development": {
"extractLicenses": false, "extractLicenses": false,
"optimization": false, "optimization": false,
"sourceMap": true, "sourceMap": true,
}, },
"production": Object { "production": {
"outputHashing": "media", "outputHashing": "media",
}, },
}, },
"defaultConfiguration": "production", "defaultConfiguration": "production",
"dependsOn": Array [ "dependsOn": [
"build", "build",
], ],
"executor": "@nrwl/angular:webpack-server", "executor": "@nrwl/angular:webpack-server",
"options": Object { "options": {
"customWebpackConfig": Object { "customWebpackConfig": {
"path": "apps/test/webpack.server.config.js", "path": "apps/test/webpack.server.config.js",
}, },
"main": "apps/test/server.ts", "main": "apps/test/server.ts",
@ -228,13 +228,13 @@ export const remoteRoutes: Route[] = [
`; `;
exports[`MF Remote App Generator --ssr should generate the correct files 13`] = ` exports[`MF Remote App Generator --ssr should generate the correct files 13`] = `
Object { {
"dependsOn": Array [ "dependsOn": [
"build", "build",
"server", "server",
], ],
"executor": "nx:run-commands", "executor": "nx:run-commands",
"options": Object { "options": {
"command": "PORT=4201 node dist/apps/test/server/main.js", "command": "PORT=4201 node dist/apps/test/server/main.js",
}, },
} }

View File

@ -1,23 +1,23 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`setupSSR should create the files correctly for ssr 1`] = ` exports[`setupSSR should create the files correctly for ssr 1`] = `
Object { {
"configurations": Object { "configurations": {
"development": Object { "development": {
"extractLicenses": false, "extractLicenses": false,
"optimization": false, "optimization": false,
"sourceMap": true, "sourceMap": true,
}, },
"production": Object { "production": {
"outputHashing": "media", "outputHashing": "media",
}, },
}, },
"defaultConfiguration": "production", "defaultConfiguration": "production",
"dependsOn": Array [ "dependsOn": [
"build", "build",
], ],
"executor": "@angular-devkit/build-angular:server", "executor": "@angular-devkit/build-angular:server",
"options": Object { "options": {
"main": "apps/app1/server.ts", "main": "apps/app1/server.ts",
"outputPath": "dist/apps/app1/server", "outputPath": "dist/apps/app1/server",
"tsConfig": "apps/app1/tsconfig.server.json", "tsConfig": "apps/app1/tsconfig.server.json",
@ -101,16 +101,16 @@ export * from './src/main.server';
`; `;
exports[`setupSSR should use fileReplacements if they already exist 1`] = ` exports[`setupSSR should use fileReplacements if they already exist 1`] = `
Object { {
"configurations": Object { "configurations": {
"development": Object { "development": {
"extractLicenses": false, "extractLicenses": false,
"optimization": false, "optimization": false,
"sourceMap": true, "sourceMap": true,
}, },
"production": Object { "production": {
"fileReplacements": Array [ "fileReplacements": [
Object { {
"replace": "apps/app1/src/environments/environment.ts", "replace": "apps/app1/src/environments/environment.ts",
"with": "apps/app1/src/environments/environment.prod.ts", "with": "apps/app1/src/environments/environment.prod.ts",
}, },
@ -119,11 +119,11 @@ Object {
}, },
}, },
"defaultConfiguration": "production", "defaultConfiguration": "production",
"dependsOn": Array [ "dependsOn": [
"build", "build",
], ],
"executor": "@angular-devkit/build-angular:server", "executor": "@angular-devkit/build-angular:server",
"options": Object { "options": {
"main": "apps/app1/server.ts", "main": "apps/app1/server.ts",
"outputPath": "dist/apps/app1/server", "outputPath": "dist/apps/app1/server",
"tsConfig": "apps/app1/tsconfig.server.json", "tsConfig": "apps/app1/tsconfig.server.json",

View File

@ -65,13 +65,13 @@ describe('setupSSR', () => {
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
"/* To learn more about this file see: https://angular.io/config/tsconfig. */ "/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
\\"extends\\": \\"./tsconfig.app.json\\", "extends": "./tsconfig.app.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"outDir\\": \\"../../out-tsc/server\\", "outDir": "../../out-tsc/server",
\\"target\\": \\"es2019\\", "target": "es2019",
\\"types\\": [\\"node\\"] "types": ["node"]
}, },
\\"files\\": [\\"src/main.server.ts\\", \\"server.ts\\"] "files": ["src/main.server.ts", "server.ts"]
} }
" "
`); `);
@ -122,10 +122,10 @@ describe('setupSSR', () => {
} }
const nxJson = readJson<NxJsonConfiguration>(tree, 'nx.json'); const nxJson = readJson<NxJsonConfiguration>(tree, 'nx.json');
expect(nxJson.tasksRunnerOptions).toMatchInlineSnapshot(` expect(nxJson.tasksRunnerOptions).toMatchInlineSnapshot(`
Object { {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",

View File

@ -14,7 +14,7 @@ exports[`StorybookConfiguration generator should configure storybook to use webp
`; `;
exports[`StorybookConfiguration generator should generate in the correct folder 1`] = ` exports[`StorybookConfiguration generator should generate in the correct folder 1`] = `
Array [ [
".eslintignore", ".eslintignore",
".eslintrc.json", ".eslintrc.json",
".gitignore", ".gitignore",
@ -146,7 +146,7 @@ Array [
`; `;
exports[`StorybookConfiguration generator should generate the right files 1`] = ` exports[`StorybookConfiguration generator should generate the right files 1`] = `
Array [ [
".eslintignore", ".eslintignore",
".eslintrc.json", ".eslintrc.json",
".gitignore", ".gitignore",

View File

@ -48,7 +48,7 @@ describe('exportScam', () => {
// ASSERT // ASSERT
const entryPointSource = tree.read(`libs/lib1/src/index.ts`, 'utf-8'); const entryPointSource = tree.read(`libs/lib1/src/index.ts`, 'utf-8');
expect(entryPointSource).toMatchInlineSnapshot( expect(entryPointSource).toMatchInlineSnapshot(
`"export * from \\"./lib/example/example.component\\";"` `"export * from "./lib/example/example.component";"`
); );
}); });
@ -75,8 +75,8 @@ describe('exportScam', () => {
// ASSERT // ASSERT
const entryPointSource = tree.read(`libs/lib1/src/index.ts`, 'utf-8'); const entryPointSource = tree.read(`libs/lib1/src/index.ts`, 'utf-8');
expect(entryPointSource).toMatchInlineSnapshot(` expect(entryPointSource).toMatchInlineSnapshot(`
"export * from \\"./lib/example/example.component\\"; "export * from "./lib/example/example.component";
export * from \\"./lib/example/example.module\\";" export * from "./lib/example/example.module";"
`); `);
}); });
@ -110,7 +110,7 @@ describe('exportScam', () => {
'utf-8' 'utf-8'
); );
expect(entryPointSource).toMatchInlineSnapshot( expect(entryPointSource).toMatchInlineSnapshot(
`"export * from \\"./lib/example/example.component\\";"` `"export * from "./lib/example/example.component";"`
); );
}); });
}); });

View File

@ -88,7 +88,7 @@ describe('webWorker generator', () => {
`); `);
expect(tree.read(`apps/${appName}/src/app/test-worker.worker.ts`, 'utf-8')) expect(tree.read(`apps/${appName}/src/app/test-worker.worker.ts`, 'utf-8'))
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
"/// <reference lib=\\"webworker\\" /> "/// <reference lib="webworker" />
addEventListener('message', ({ data }) => { addEventListener('message', ({ data }) => {
const response = \`worker response to \${data}\`; const response = \`worker response to \${data}\`;

View File

@ -21,18 +21,18 @@ describe('renameWebpackServer', () => {
const serveTarget = readJson(tree, 'apps/remote/project.json').targets const serveTarget = readJson(tree, 'apps/remote/project.json').targets
.serve; .serve;
expect(serveTarget).toMatchInlineSnapshot(` expect(serveTarget).toMatchInlineSnapshot(`
Object { {
"configurations": Object { "configurations": {
"development": Object { "development": {
"browserTarget": "remote:build:development", "browserTarget": "remote:build:development",
}, },
"production": Object { "production": {
"browserTarget": "remote:build:production", "browserTarget": "remote:build:production",
}, },
}, },
"defaultConfiguration": "development", "defaultConfiguration": "development",
"executor": "@nrwl/angular:webpack-dev-server", "executor": "@nrwl/angular:webpack-dev-server",
"options": Object { "options": {
"port": 4201, "port": 4201,
"publicHost": "http://localhost:4201", "publicHost": "http://localhost:4201",
}, },

View File

@ -44,30 +44,30 @@ describe('15.0.0 migration (add-karma-inputs)', () => {
const updated = readNxJson(tree); const updated = readNxJson(tree);
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
"!{projectRoot}/**/*.spec.[jt]s", "!{projectRoot}/**/*.spec.[jt]s",
"!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/karma.conf.js", "!{projectRoot}/karma.conf.js",
], ],
"sharedGlobals": Array [], "sharedGlobals": [],
}, },
"targetDefaults": Object { "targetDefaults": {
"test": Object { "test": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
"{workspaceRoot}/karma.conf.js", "{workspaceRoot}/karma.conf.js",
], ],
}, },
"test2": Object { "test2": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
"{workspaceRoot}/karma.conf.js", "{workspaceRoot}/karma.conf.js",

View File

@ -55,7 +55,7 @@ describe('Migration to update target and add useDefineForClassFields', () => {
'tsconfig.base.json' 'tsconfig.base.json'
).compilerOptions; ).compilerOptions;
expect(compilerOptions).toMatchInlineSnapshot(` expect(compilerOptions).toMatchInlineSnapshot(`
Object { {
"module": "es2020", "module": "es2020",
"target": "es2015", "target": "es2015",
} }
@ -85,7 +85,7 @@ describe('Migration to update target and add useDefineForClassFields', () => {
'apps/karma/tsconfig.spec.json' 'apps/karma/tsconfig.spec.json'
).compilerOptions; ).compilerOptions;
expect(compilerOptions).toMatchInlineSnapshot(` expect(compilerOptions).toMatchInlineSnapshot(`
Object { {
"module": "es2020", "module": "es2020",
"target": "ES2022", "target": "ES2022",
"useDefineForClassFields": false, "useDefineForClassFields": false,

View File

@ -30,12 +30,12 @@ describe('installed-required-packages', () => {
// ASSERT // ASSERT
const pkgJson = readJson(tree, 'package.json'); const pkgJson = readJson(tree, 'package.json');
expect(pkgJson.dependencies).toMatchInlineSnapshot(` expect(pkgJson.dependencies).toMatchInlineSnapshot(`
Object { {
"@angular/core": "~15.0.0", "@angular/core": "~15.0.0",
} }
`); `);
expect(pkgJson.devDependencies).toMatchInlineSnapshot(` expect(pkgJson.devDependencies).toMatchInlineSnapshot(`
Object { {
"@angular-devkit/build-angular": "~15.0.0", "@angular-devkit/build-angular": "~15.0.0",
"@angular-devkit/core": "~15.0.0", "@angular-devkit/core": "~15.0.0",
"@angular-devkit/schematics": "~15.0.0", "@angular-devkit/schematics": "~15.0.0",
@ -63,12 +63,12 @@ describe('installed-required-packages', () => {
// ASSERT // ASSERT
const pkgJson = readJson(tree, 'package.json'); const pkgJson = readJson(tree, 'package.json');
expect(pkgJson.dependencies).toMatchInlineSnapshot(` expect(pkgJson.dependencies).toMatchInlineSnapshot(`
Object { {
"@angular/core": "~14.0.0", "@angular/core": "~14.0.0",
} }
`); `);
expect(pkgJson.devDependencies).toMatchInlineSnapshot(` expect(pkgJson.devDependencies).toMatchInlineSnapshot(`
Object { {
"@angular-devkit/build-angular": "~14.0.0", "@angular-devkit/build-angular": "~14.0.0",
"@angular-devkit/core": "~14.0.0", "@angular-devkit/core": "~14.0.0",
"@angular-devkit/schematics": "~14.0.0", "@angular-devkit/schematics": "~14.0.0",
@ -99,12 +99,12 @@ describe('installed-required-packages', () => {
// ASSERT // ASSERT
const pkgJson = readJson(tree, 'package.json'); const pkgJson = readJson(tree, 'package.json');
expect(pkgJson.dependencies).toMatchInlineSnapshot(` expect(pkgJson.dependencies).toMatchInlineSnapshot(`
Object { {
"@angular/core": "~15.0.0", "@angular/core": "~15.0.0",
} }
`); `);
expect(pkgJson.devDependencies).toMatchInlineSnapshot(` expect(pkgJson.devDependencies).toMatchInlineSnapshot(`
Object { {
"@angular-devkit/build-angular": "~15.0.0", "@angular-devkit/build-angular": "~15.0.0",
"@angular-devkit/core": "~15.0.0", "@angular-devkit/core": "~15.0.0",
"@angular-devkit/schematics": "~15.0.0", "@angular-devkit/schematics": "~15.0.0",
@ -135,12 +135,12 @@ describe('installed-required-packages', () => {
// ASSERT // ASSERT
const pkgJson = readJson(tree, 'package.json'); const pkgJson = readJson(tree, 'package.json');
expect(pkgJson.dependencies).toMatchInlineSnapshot(` expect(pkgJson.dependencies).toMatchInlineSnapshot(`
Object { {
"@angular/core": "~14.0.0", "@angular/core": "~14.0.0",
} }
`); `);
expect(pkgJson.devDependencies).toMatchInlineSnapshot(` expect(pkgJson.devDependencies).toMatchInlineSnapshot(`
Object { {
"@angular-devkit/build-angular": "~14.0.0", "@angular-devkit/build-angular": "~14.0.0",
"@angular-devkit/core": "~14.0.0", "@angular-devkit/core": "~14.0.0",
"@angular-devkit/schematics": "~14.0.0", "@angular-devkit/schematics": "~14.0.0",
@ -170,12 +170,12 @@ describe('installed-required-packages', () => {
// ASSERT // ASSERT
const pkgJson = readJson(tree, 'package.json'); const pkgJson = readJson(tree, 'package.json');
expect(pkgJson.dependencies).toMatchInlineSnapshot(` expect(pkgJson.dependencies).toMatchInlineSnapshot(`
Object { {
"@angular/core": "~15.0.0", "@angular/core": "~15.0.0",
} }
`); `);
expect(pkgJson.devDependencies).toMatchInlineSnapshot(` expect(pkgJson.devDependencies).toMatchInlineSnapshot(`
Object { {
"@angular-devkit/build-angular": "~15.0.0", "@angular-devkit/build-angular": "~15.0.0",
"@angular-devkit/core": "~15.0.0", "@angular-devkit/core": "~15.0.0",
"@angular-devkit/schematics": "~15.0.0", "@angular-devkit/schematics": "~15.0.0",
@ -205,12 +205,12 @@ describe('installed-required-packages', () => {
// ASSERT // ASSERT
const pkgJson = readJson(tree, 'package.json'); const pkgJson = readJson(tree, 'package.json');
expect(pkgJson.dependencies).toMatchInlineSnapshot(` expect(pkgJson.dependencies).toMatchInlineSnapshot(`
Object { {
"@angular/core": "~14.0.0", "@angular/core": "~14.0.0",
} }
`); `);
expect(pkgJson.devDependencies).toMatchInlineSnapshot(` expect(pkgJson.devDependencies).toMatchInlineSnapshot(`
Object { {
"@angular-devkit/build-angular": "~14.0.0", "@angular-devkit/build-angular": "~14.0.0",
"@angular-devkit/core": "~14.0.0", "@angular-devkit/core": "~14.0.0",
"@angular-devkit/schematics": "~14.0.0", "@angular-devkit/schematics": "~14.0.0",

View File

@ -1,9 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`convert-tslint-to-eslint should work for Cypress applications 1`] = ` exports[`convert-tslint-to-eslint should work for Cypress applications 1`] = `
Object { {
"dependencies": Object {}, "dependencies": {},
"devDependencies": Object { "devDependencies": {
"@nrwl/eslint-plugin-nx": "0.0.1", "@nrwl/eslint-plugin-nx": "0.0.1",
"@nrwl/linter": "0.0.1", "@nrwl/linter": "0.0.1",
"@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/eslint-plugin": "^5.58.0",
@ -18,20 +18,20 @@ Object {
`; `;
exports[`convert-tslint-to-eslint should work for Cypress applications 2`] = ` exports[`convert-tslint-to-eslint should work for Cypress applications 2`] = `
Object { {
"$schema": "../../node_modules/nx/schemas/project-schema.json", "$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "e2e-app-1", "name": "e2e-app-1",
"projectType": "application", "projectType": "application",
"root": "apps/e2e-app-1", "root": "apps/e2e-app-1",
"targets": Object { "targets": {
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/e2e-app-1/**/*.{js,ts}", "apps/e2e-app-1/**/*.{js,ts}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
@ -40,35 +40,35 @@ Object {
`; `;
exports[`convert-tslint-to-eslint should work for Cypress applications 3`] = ` exports[`convert-tslint-to-eslint should work for Cypress applications 3`] = `
Object { {
"ignorePatterns": Array [ "ignorePatterns": [
"**/*", "**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object { "rules": {
"@nrwl/nx/enforce-module-boundaries": Array [ "@nrwl/nx/enforce-module-boundaries": [
"error", "error",
Object { {
"allow": Array [ "allow": [
"@nx-example/shared/product/data/testing", "@nx-example/shared/product/data/testing",
], ],
"depConstraints": Array [ "depConstraints": [
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:feature", "type:feature",
"type:ui", "type:ui",
], ],
"sourceTag": "type:app", "sourceTag": "type:app",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:ui", "type:ui",
"type:data", "type:data",
"type:types", "type:types",
@ -76,48 +76,48 @@ Object {
], ],
"sourceTag": "type:feature", "sourceTag": "type:feature",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:types", "type:types",
], ],
"sourceTag": "type:types", "sourceTag": "type:types",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:state", "type:state",
"type:types", "type:types",
"type:data", "type:data",
], ],
"sourceTag": "type:state", "sourceTag": "type:state",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:types", "type:types",
], ],
"sourceTag": "type:data", "sourceTag": "type:data",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:e2e-utils", "type:e2e-utils",
], ],
"sourceTag": "type:e2e", "sourceTag": "type:e2e",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:types", "type:types",
"type:ui", "type:ui",
], ],
"sourceTag": "type:ui", "sourceTag": "type:ui",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"scope:products", "scope:products",
"scope:shared", "scope:shared",
], ],
"sourceTag": "scope:products", "sourceTag": "scope:products",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"scope:cart", "scope:cart",
"scope:shared", "scope:shared",
], ],
@ -129,49 +129,49 @@ Object {
], ],
}, },
}, },
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/typescript", "plugin:@nrwl/nx/typescript",
], ],
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/javascript", "plugin:@nrwl/nx/javascript",
], ],
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
], ],
"plugins": Array [ "plugins": [
"eslint-plugin-import", "eslint-plugin-import",
"@typescript-eslint", "@typescript-eslint",
], ],
"root": true, "root": true,
"rules": Object { "rules": {
"@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off", "@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": Array [ "@typescript-eslint/explicit-member-accessibility": [
"off", "off",
Object { {
"accessibility": "explicit", "accessibility": "explicit",
}, },
], ],
"@typescript-eslint/member-ordering": "error", "@typescript-eslint/member-ordering": "error",
"@typescript-eslint/naming-convention": Array [ "@typescript-eslint/naming-convention": [
"error", "error",
Object { {
"format": Array [ "format": [
"camelCase", "camelCase",
"UPPER_CASE", "UPPER_CASE",
], ],
@ -182,17 +182,17 @@ Object {
], ],
"@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-inferrable-types": Array [ "@typescript-eslint/no-inferrable-types": [
"error", "error",
Object { {
"ignoreParameters": true, "ignoreParameters": true,
}, },
], ],
"@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-non-null-assertion": "error", "@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-shadow": Array [ "@typescript-eslint/no-shadow": [
"error", "error",
Object { {
"hoist": "all", "hoist": "all",
}, },
], ],
@ -202,7 +202,7 @@ Object {
"arrow-body-style": "error", "arrow-body-style": "error",
"constructor-super": "error", "constructor-super": "error",
"dot-notation": "off", "dot-notation": "off",
"eqeqeq": Array [ "eqeqeq": [
"error", "error",
"smart", "smart",
], ],
@ -212,9 +212,9 @@ Object {
"import/no-deprecated": "warn", "import/no-deprecated": "warn",
"no-bitwise": "error", "no-bitwise": "error",
"no-caller": "error", "no-caller": "error",
"no-console": Array [ "no-console": [
"error", "error",
Object {}, {},
], ],
"no-debugger": "error", "no-debugger": "error",
"no-empty": "off", "no-empty": "off",
@ -222,7 +222,7 @@ Object {
"no-eval": "error", "no-eval": "error",
"no-fallthrough": "error", "no-fallthrough": "error",
"no-new-wrappers": "error", "no-new-wrappers": "error",
"no-restricted-imports": Array [ "no-restricted-imports": [
"error", "error",
"rxjs/Rx", "rxjs/Rx",
], ],
@ -237,7 +237,7 @@ Object {
}, },
}, },
], ],
"plugins": Array [ "plugins": [
"@nrwl/nx", "@nrwl/nx",
], ],
"root": true, "root": true,
@ -245,29 +245,29 @@ Object {
`; `;
exports[`convert-tslint-to-eslint should work for Cypress applications 4`] = ` exports[`convert-tslint-to-eslint should work for Cypress applications 4`] = `
Object { {
"extends": Array [ "extends": [
"plugin:cypress/recommended", "plugin:cypress/recommended",
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
"plugins": Array [ "plugins": [
"@typescript-eslint", "@typescript-eslint",
], ],
"rules": Object { "rules": {
"@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-empty-interface": "error",
}, },
} }

View File

@ -1,9 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Cypress Component Project should add base cypress component testing config 1`] = ` exports[`Cypress Component Project should add base cypress component testing config 1`] = `
Object { {
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "libs/cool-lib/cypress.config.ts", "cypressConfig": "libs/cool-lib/cypress.config.ts",
"testingType": "component", "testingType": "component",
}, },
@ -11,9 +11,9 @@ Object {
`; `;
exports[`Cypress Component Project should not error when rerunning on an existing project 1`] = ` exports[`Cypress Component Project should not error when rerunning on an existing project 1`] = `
Object { {
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "libs/cool-lib/cypress.config.ts", "cypressConfig": "libs/cool-lib/cypress.config.ts",
"testingType": "component", "testingType": "component",
}, },

View File

@ -1,35 +1,35 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Cypress e2e configuration v10+ should not override eslint settings if preset 1`] = ` exports[`Cypress e2e configuration v10+ should not override eslint settings if preset 1`] = `
Object { {
"extends": Array [ "extends": [
"plugin:cypress/recommended", "plugin:cypress/recommended",
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/angular", "plugin:@nrwl/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates", "plugin:@angular-eslint/template/process-inline-templates",
], ],
"files": Array [ "files": [
"*.ts", "*.ts",
], ],
"rules": Object { "rules": {
"@angular-eslint/component-selector": Array [ "@angular-eslint/component-selector": [
"error", "error",
Object { {
"prefix": "cy-port-test", "prefix": "cy-port-test",
"style": "kebab-case", "style": "kebab-case",
"type": "element", "type": "element",
}, },
], ],
"@angular-eslint/directive-selector": Array [ "@angular-eslint/directive-selector": [
"error", "error",
Object { {
"prefix": "cyPortTest", "prefix": "cyPortTest",
"style": "camelCase", "style": "camelCase",
"type": "attribute", "type": "attribute",
@ -37,21 +37,21 @@ Object {
], ],
}, },
}, },
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/angular-template", "plugin:@nrwl/nx/angular-template",
], ],
"files": Array [ "files": [
"*.html", "*.html",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.cy.{ts,js,tsx,jsx}", "*.cy.{ts,js,tsx,jsx}",
"cypress/**/*.{ts,js,tsx,jsx}", "cypress/**/*.{ts,js,tsx,jsx}",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }

View File

@ -51,14 +51,14 @@ describe('Cypress e2e configuration', () => {
`); `);
expect(readProjectConfiguration(tree, 'my-app').targets.e2e) expect(readProjectConfiguration(tree, 'my-app').targets.e2e)
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"configurations": Object { "configurations": {
"production": Object { "production": {
"devServerTarget": "my-app:serve:production", "devServerTarget": "my-app:serve:production",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/my-app/cypress.config.ts", "cypressConfig": "apps/my-app/cypress.config.ts",
"devServerTarget": "my-app:serve", "devServerTarget": "my-app:serve",
"testingType": "e2e", "testingType": "e2e",
@ -68,18 +68,18 @@ describe('Cypress e2e configuration', () => {
expect(readJson(tree, 'apps/my-app/tsconfig.json')) expect(readJson(tree, 'apps/my-app/tsconfig.json'))
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"compilerOptions": Object { "compilerOptions": {
"allowJs": true, "allowJs": true,
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"sourceMap": false, "sourceMap": false,
"types": Array [ "types": [
"cypress", "cypress",
"node", "node",
], ],
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"include": Array [ "include": [
"src/**/*.ts", "src/**/*.ts",
"src/**/*.js", "src/**/*.js",
"cypress.config.ts", "cypress.config.ts",
@ -187,18 +187,18 @@ describe('Cypress e2e configuration', () => {
assertCypressFiles(tree, 'apps/my-app/e2e/something'); assertCypressFiles(tree, 'apps/my-app/e2e/something');
expect(readJson(tree, 'apps/my-app/tsconfig.cy.json')) expect(readJson(tree, 'apps/my-app/tsconfig.cy.json'))
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"compilerOptions": Object { "compilerOptions": {
"allowJs": true, "allowJs": true,
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"sourceMap": false, "sourceMap": false,
"types": Array [ "types": [
"cypress", "cypress",
"node", "node",
], ],
}, },
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"include": Array [ "include": [
"e2e/something/**/*.ts", "e2e/something/**/*.ts",
"e2e/something/**/*.js", "e2e/something/**/*.js",
"cypress.config.ts", "cypress.config.ts",
@ -291,7 +291,7 @@ describe('Cypress e2e configuration', () => {
readProjectConfiguration(tree, 'my-lib').targets['e2e'].configurations readProjectConfiguration(tree, 'my-lib').targets['e2e'].configurations
.ci .ci
).toMatchInlineSnapshot(` ).toMatchInlineSnapshot(`
Object { {
"devServerTarget": "my-app:serve-static", "devServerTarget": "my-app:serve-static",
} }
`); `);
@ -306,7 +306,7 @@ describe('Cypress e2e configuration', () => {
expect(readProjectConfiguration(tree, 'my-app').targets['e2e'].options) expect(readProjectConfiguration(tree, 'my-app').targets['e2e'].options)
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"cypressConfig": "apps/my-app/cypress.config.ts", "cypressConfig": "apps/my-app/cypress.config.ts",
"devServerTarget": "my-app:serve", "devServerTarget": "my-app:serve",
"port": 0, "port": 0,

View File

@ -1,29 +1,29 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Cypress Project < v7 --linter eslint should add eslint-plugin-cypress 1`] = ` exports[`Cypress Project < v7 --linter eslint should add eslint-plugin-cypress 1`] = `
Object { {
"extends": Array [ "extends": [
"plugin:cypress/recommended", "plugin:cypress/recommended",
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"src/plugins/index.js", "src/plugins/index.js",
], ],
"rules": Object { "rules": {
"@typescript-eslint/no-var-requires": "off", "@typescript-eslint/no-var-requires": "off",
"no-undef": "off", "no-undef": "off",
}, },
@ -33,29 +33,29 @@ Object {
`; `;
exports[`Cypress Project < v7 nested should update configuration 1`] = ` exports[`Cypress Project < v7 nested should update configuration 1`] = `
Object { {
"e2e": Object { "e2e": {
"configurations": Object { "configurations": {
"production": Object { "production": {
"devServerTarget": "my-dir-my-app:serve:production", "devServerTarget": "my-dir-my-app:serve:production",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/my-dir/my-app-e2e/cypress.json", "cypressConfig": "apps/my-dir/my-app-e2e/cypress.json",
"devServerTarget": "my-dir-my-app:serve", "devServerTarget": "my-dir-my-app:serve",
"testingType": "e2e", "testingType": "e2e",
"tsConfig": "apps/my-dir/my-app-e2e/tsconfig.json", "tsConfig": "apps/my-dir/my-app-e2e/tsconfig.json",
}, },
}, },
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-dir/my-app-e2e/**/*.{js,ts}", "apps/my-dir/my-app-e2e/**/*.{js,ts}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
@ -64,44 +64,44 @@ Object {
exports[`Cypress Project < v7 project with directory in its name should set right path names in \`cypress.json\` 1`] = ` exports[`Cypress Project < v7 project with directory in its name should set right path names in \`cypress.json\` 1`] = `
"{ "{
\\"fileServerFolder\\": \\".\\", "fileServerFolder": ".",
\\"fixturesFolder\\": \\"./src/fixtures\\", "fixturesFolder": "./src/fixtures",
\\"integrationFolder\\": \\"./src/integration\\", "integrationFolder": "./src/integration",
\\"modifyObstructiveCode\\": false, "modifyObstructiveCode": false,
\\"supportFile\\": \\"./src/support/index.ts\\", "supportFile": "./src/support/index.ts",
\\"pluginsFile\\": \\"./src/plugins/index\\", "pluginsFile": "./src/plugins/index",
\\"video\\": true, "video": true,
\\"videosFolder\\": \\"../../../dist/cypress/apps/my-dir/my-app-e2e/videos\\", "videosFolder": "../../../dist/cypress/apps/my-dir/my-app-e2e/videos",
\\"screenshotsFolder\\": \\"../../../dist/cypress/apps/my-dir/my-app-e2e/screenshots\\", "screenshotsFolder": "../../../dist/cypress/apps/my-dir/my-app-e2e/screenshots",
\\"chromeWebSecurity\\": false "chromeWebSecurity": false
} }
" "
`; `;
exports[`Cypress Project < v7 project with directory in its name should update configuration 1`] = ` exports[`Cypress Project < v7 project with directory in its name should update configuration 1`] = `
Object { {
"e2e": Object { "e2e": {
"configurations": Object { "configurations": {
"production": Object { "production": {
"devServerTarget": "my-dir-my-app:serve:production", "devServerTarget": "my-dir-my-app:serve:production",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/my-dir/my-app-e2e/cypress.json", "cypressConfig": "apps/my-dir/my-app-e2e/cypress.json",
"devServerTarget": "my-dir-my-app:serve", "devServerTarget": "my-dir-my-app:serve",
"testingType": "e2e", "testingType": "e2e",
"tsConfig": "apps/my-dir/my-app-e2e/tsconfig.json", "tsConfig": "apps/my-dir/my-app-e2e/tsconfig.json",
}, },
}, },
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-dir/my-app-e2e/**/*.{js,ts}", "apps/my-dir/my-app-e2e/**/*.{js,ts}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
@ -109,24 +109,24 @@ Object {
`; `;
exports[`Cypress Project < v7 should update configuration (baseUrl) 1`] = ` exports[`Cypress Project < v7 should update configuration (baseUrl) 1`] = `
Object { {
"e2e": Object { "e2e": {
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"baseUrl": "http://localhost:3000", "baseUrl": "http://localhost:3000",
"cypressConfig": "apps/my-app-e2e/cypress.json", "cypressConfig": "apps/my-app-e2e/cypress.json",
"testingType": "e2e", "testingType": "e2e",
"tsConfig": "apps/my-app-e2e/tsconfig.json", "tsConfig": "apps/my-app-e2e/tsconfig.json",
}, },
}, },
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-app-e2e/**/*.{js,ts}", "apps/my-app-e2e/**/*.{js,ts}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
@ -134,29 +134,29 @@ Object {
`; `;
exports[`Cypress Project < v7 should update configuration 1`] = ` exports[`Cypress Project < v7 should update configuration 1`] = `
Object { {
"e2e": Object { "e2e": {
"configurations": Object { "configurations": {
"production": Object { "production": {
"devServerTarget": "my-app:serve:production", "devServerTarget": "my-app:serve:production",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/my-app-e2e/cypress.json", "cypressConfig": "apps/my-app-e2e/cypress.json",
"devServerTarget": "my-app:serve", "devServerTarget": "my-app:serve",
"testingType": "e2e", "testingType": "e2e",
"tsConfig": "apps/my-app-e2e/tsconfig.json", "tsConfig": "apps/my-app-e2e/tsconfig.json",
}, },
}, },
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-app-e2e/**/*.{js,ts}", "apps/my-app-e2e/**/*.{js,ts}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
@ -164,29 +164,29 @@ Object {
`; `;
exports[`Cypress Project < v7 should update configuration 2`] = ` exports[`Cypress Project < v7 should update configuration 2`] = `
Object { {
"e2e": Object { "e2e": {
"configurations": Object { "configurations": {
"production": Object { "production": {
"devServerTarget": "my-app:serve:production", "devServerTarget": "my-app:serve:production",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/my-app-e2e/cypress.json", "cypressConfig": "apps/my-app-e2e/cypress.json",
"devServerTarget": "my-app:serve:development", "devServerTarget": "my-app:serve:development",
"testingType": "e2e", "testingType": "e2e",
"tsConfig": "apps/my-app-e2e/tsconfig.json", "tsConfig": "apps/my-app-e2e/tsconfig.json",
}, },
}, },
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-app-e2e/**/*.{js,ts}", "apps/my-app-e2e/**/*.{js,ts}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
@ -216,18 +216,18 @@ export default defineConfig({
`; `;
exports[`Cypress Project > v10 nested should set right path names in \`tsconfig.e2e.json\` 1`] = ` exports[`Cypress Project > v10 nested should set right path names in \`tsconfig.e2e.json\` 1`] = `
Object { {
"compilerOptions": Object { "compilerOptions": {
"allowJs": true, "allowJs": true,
"outDir": "../../../dist/out-tsc", "outDir": "../../../dist/out-tsc",
"sourceMap": false, "sourceMap": false,
"types": Array [ "types": [
"cypress", "cypress",
"node", "node",
], ],
}, },
"extends": "../../../tsconfig.base.json", "extends": "../../../tsconfig.base.json",
"include": Array [ "include": [
"src/**/*.ts", "src/**/*.ts",
"src/**/*.js", "src/**/*.js",
"cypress.config.ts", "cypress.config.ts",
@ -246,18 +246,18 @@ export default defineConfig({
`; `;
exports[`Cypress Project > v10 should set right path names in \`tsconfig.e2e.json\` 1`] = ` exports[`Cypress Project > v10 should set right path names in \`tsconfig.e2e.json\` 1`] = `
Object { {
"compilerOptions": Object { "compilerOptions": {
"allowJs": true, "allowJs": true,
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"sourceMap": false, "sourceMap": false,
"types": Array [ "types": [
"cypress", "cypress",
"node", "node",
], ],
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"include": Array [ "include": [
"src/**/*.ts", "src/**/*.ts",
"src/**/*.js", "src/**/*.js",
"cypress.config.ts", "cypress.config.ts",
@ -266,14 +266,14 @@ Object {
`; `;
exports[`Cypress Project > v10 should update configuration when eslint is passed 1`] = ` exports[`Cypress Project > v10 should update configuration when eslint is passed 1`] = `
Object { {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-app-e2e/**/*.{js,ts}", "apps/my-app-e2e/**/*.{js,ts}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
} }

View File

@ -47,17 +47,17 @@ export default defineConfig({
`; `;
exports[`convertToCypressTen convertCypressProject should handle multiple configurations 2`] = ` exports[`convertToCypressTen convertCypressProject should handle multiple configurations 2`] = `
Object { {
"configurations": Object { "configurations": {
"production": Object { "production": {
"devServerTarget": "target:serve:production", "devServerTarget": "target:serve:production",
}, },
"static": Object { "static": {
"baseUrl": "http://localhost:3000", "baseUrl": "http://localhost:3000",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/app-e2e/cypress.config.ts", "cypressConfig": "apps/app-e2e/cypress.config.ts",
"devServerTarget": "app:serve", "devServerTarget": "app:serve",
"testingType": "e2e", "testingType": "e2e",
@ -89,19 +89,19 @@ export default defineConfig({
`; `;
exports[`convertToCypressTen convertCypressProject should handle multiple configurations with no default cypressConfig option 2`] = ` exports[`convertToCypressTen convertCypressProject should handle multiple configurations with no default cypressConfig option 2`] = `
Object { {
"configurations": Object { "configurations": {
"production": Object { "production": {
"cypressConfig": "apps/app-e2e/cypress.production.config.ts", "cypressConfig": "apps/app-e2e/cypress.production.config.ts",
"devServerTarget": "target:serve:production", "devServerTarget": "target:serve:production",
}, },
"static": Object { "static": {
"baseUrl": "http://localhost:3000", "baseUrl": "http://localhost:3000",
"cypressConfig": "apps/app-e2e/cypress.config.ts", "cypressConfig": "apps/app-e2e/cypress.config.ts",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"baseUrl": "http://localhost:4200", "baseUrl": "http://localhost:4200",
"testingType": "e2e", "testingType": "e2e",
}, },
@ -153,41 +153,41 @@ export default defineConfig({
`; `;
exports[`convertToCypressTen convertCypressProject should infer targets with --all flag 2`] = ` exports[`convertToCypressTen convertCypressProject should infer targets with --all flag 2`] = `
Object { {
"e2e": Object { "e2e": {
"configurations": Object { "configurations": {
"production": Object { "production": {
"devServerTarget": "app:serve:production", "devServerTarget": "app:serve:production",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/app-e2e/cypress.config.ts", "cypressConfig": "apps/app-e2e/cypress.config.ts",
"devServerTarget": "app:serve", "devServerTarget": "app:serve",
"testingType": "e2e", "testingType": "e2e",
}, },
}, },
"e2e-custom": Object { "e2e-custom": {
"configurations": Object { "configurations": {
"production": Object { "production": {
"devServerTarget": "app:serve:production", "devServerTarget": "app:serve:production",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/app-e2e/cypress.config.ts", "cypressConfig": "apps/app-e2e/cypress.config.ts",
"devServerTarget": "app:serve", "devServerTarget": "app:serve",
"testingType": "e2e", "testingType": "e2e",
}, },
}, },
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/app-e2e/**/*.{js,ts}", "apps/app-e2e/**/*.{js,ts}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
@ -218,41 +218,41 @@ export default defineConfig({
`; `;
exports[`convertToCypressTen convertCypressProject should not break when an invalid target is passed in 2`] = ` exports[`convertToCypressTen convertCypressProject should not break when an invalid target is passed in 2`] = `
Object { {
"e2e": Object { "e2e": {
"configurations": Object { "configurations": {
"production": Object { "production": {
"devServerTarget": "app:serve:production", "devServerTarget": "app:serve:production",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/app-e2e/cypress.config.ts", "cypressConfig": "apps/app-e2e/cypress.config.ts",
"devServerTarget": "app:serve", "devServerTarget": "app:serve",
"testingType": "e2e", "testingType": "e2e",
}, },
}, },
"e2e-custom": Object { "e2e-custom": {
"configurations": Object { "configurations": {
"production": Object { "production": {
"devServerTarget": "app:serve:production", "devServerTarget": "app:serve:production",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/app-e2e/cypress.config.ts", "cypressConfig": "apps/app-e2e/cypress.config.ts",
"devServerTarget": "app:serve", "devServerTarget": "app:serve",
"testingType": "e2e", "testingType": "e2e",
}, },
}, },
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/app-e2e/**/*.{js,ts}", "apps/app-e2e/**/*.{js,ts}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
@ -326,10 +326,10 @@ describe('a', () => {
}); });
it('should display welcome message', () => { it('should display welcome message', () => {
// Custom command example, see \\\\\`../support/commands.ts\\\\\` file // Custom command example, see \\\`../support/commands.ts\\\` file
cy.login('my-email@something.com', 'myPassword'); cy.login('my-email@something.com', 'myPassword');
// Function helper example, see \\\\\`../support/app.po.ts\\\\\` file // Function helper example, see \\\`../support/app.po.ts\\\` file
getGreeting().contains('Welcome a'); getGreeting().contains('Welcome a');
}); });
}); });

View File

@ -2,7 +2,7 @@
exports[`update cy.mount usage should add the mount command 1`] = ` exports[`update cy.mount usage should add the mount command 1`] = `
"import { mount } from 'cypress/angular' "import { mount } from 'cypress/angular'
/// <reference types=\\"cypress\\" /> /// <reference types="cypress" />
// *********************************************** // ***********************************************
// This example commands.ts shows you how to // This example commands.ts shows you how to
@ -32,15 +32,15 @@ Cypress.Commands.add('login', (email, password) => {
}); });
// //
// -- This is a child command -- // -- This is a child command --
// Cypress.Commands.add(\\"drag\\", { prevSubject: 'element'}, (subject, options) => { ... }) // Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
// //
// //
// -- This is a dual command -- // -- This is a dual command --
// Cypress.Commands.add(\\"dismiss\\", { prevSubject: 'optional'}, (subject, options) => { ... }) // Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
// //
// //
// -- This will overwrite an existing command -- // -- This will overwrite an existing command --
// Cypress.Commands.overwrite(\\"visit\\", (originalFn, url, options) => { ... }) // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
Cypress.Commands.add('mount', mount);" Cypress.Commands.add('mount', mount);"
`; `;
@ -71,7 +71,7 @@ exports[`update cy.mount usage should update angular react test file 1`] = `
}); });
it('should work with config', () => { it('should work with config', () => {
cy.mount(<MyComponent title={\\"blah\\"}/>,); cy.mount(<MyComponent title={"blah"}/>,);
}); });
}); });
" "
@ -87,7 +87,7 @@ exports[`update cy.mount usage should update angular react18 test file 1`] = `
}); });
it('should work with config', () => { it('should work with config', () => {
cy.mount(<MyComponent title={\\"blah\\"}/>); cy.mount(<MyComponent title={"blah"}/>);
}); });
}); });
" "

View File

@ -44,26 +44,26 @@ describe('15.0.0 migration (add-cypress-inputs)', () => {
const updated = readNxJson(tree); const updated = readNxJson(tree);
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
], ],
"sharedGlobals": Array [], "sharedGlobals": [],
}, },
"targetDefaults": Object { "targetDefaults": {
"e2e": Object { "e2e": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
], ],
}, },
"e2e2": Object { "e2e2": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
], ],
@ -107,29 +107,29 @@ describe('15.0.0 migration (add-cypress-inputs)', () => {
const updated = readNxJson(tree); const updated = readNxJson(tree);
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
"!{projectRoot}/cypress/**/*", "!{projectRoot}/cypress/**/*",
"!{projectRoot}/**/*.cy.[jt]s?(x)", "!{projectRoot}/**/*.cy.[jt]s?(x)",
"!{projectRoot}/cypress.config.[jt]s", "!{projectRoot}/cypress.config.[jt]s",
], ],
"sharedGlobals": Array [], "sharedGlobals": [],
}, },
"targetDefaults": Object { "targetDefaults": {
"e2e": Object { "e2e": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
], ],
}, },
"e2e2": Object { "e2e2": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
], ],

View File

@ -98,7 +98,7 @@ describe('Cypress 12 Migration', () => {
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should * More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/ **/
cy.should(($s) => { cy.should(($s) => {
cy.task(\\"\\"); cy.task("");
}) })
/** /**
* TODO(@nrwl/cypress): Nesting Cypress commands in a should assertion now throws. * TODO(@nrwl/cypress): Nesting Cypress commands in a should assertion now throws.
@ -106,7 +106,7 @@ describe('Cypress 12 Migration', () => {
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should * More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/ **/
cy.should(function($el) { cy.should(function($el) {
cy.task(\\"\\"); cy.task("");
}) })
}) })
}) })

View File

@ -20,18 +20,18 @@ describe('app', () => {
const tsconfig = readJson(appTree, 'apps/my-node-app/tsconfig.json'); const tsconfig = readJson(appTree, 'apps/my-node-app/tsconfig.json');
expect(tsconfig).toMatchInlineSnapshot(` expect(tsconfig).toMatchInlineSnapshot(`
Object { {
"compilerOptions": Object { "compilerOptions": {
"esModuleInterop": true, "esModuleInterop": true,
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"files": Array [], "files": [],
"include": Array [], "include": [],
"references": Array [ "references": [
Object { {
"path": "./tsconfig.app.json", "path": "./tsconfig.app.json",
}, },
Object { {
"path": "./tsconfig.spec.json", "path": "./tsconfig.spec.json",
}, },
], ],
@ -40,36 +40,36 @@ describe('app', () => {
const eslintrcJson = readJson(appTree, 'apps/my-node-app/.eslintrc.json'); const eslintrcJson = readJson(appTree, 'apps/my-node-app/.eslintrc.json');
expect(eslintrcJson).toMatchInlineSnapshot(` expect(eslintrcJson).toMatchInlineSnapshot(`
Object { {
"extends": Array [ "extends": [
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }
@ -83,22 +83,22 @@ describe('app', () => {
const tsconfig = readJson(appTree, 'apps/my-node-app/tsconfig.app.json'); const tsconfig = readJson(appTree, 'apps/my-node-app/tsconfig.app.json');
expect(tsconfig.compilerOptions.types).toContain('express'); expect(tsconfig.compilerOptions.types).toContain('express');
expect(tsconfig).toMatchInlineSnapshot(` expect(tsconfig).toMatchInlineSnapshot(`
Object { {
"compilerOptions": Object { "compilerOptions": {
"module": "commonjs", "module": "commonjs",
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"types": Array [ "types": [
"node", "node",
"express", "express",
], ],
}, },
"exclude": Array [ "exclude": [
"jest.config.ts", "jest.config.ts",
"src/**/*.spec.ts", "src/**/*.spec.ts",
"src/**/*.test.ts", "src/**/*.test.ts",
], ],
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"include": Array [ "include": [
"src/**/*.ts", "src/**/*.ts",
], ],
} }

View File

@ -246,9 +246,9 @@ projects: getJestProjects()
};`); };`);
expect(readProjectConfiguration(tree, 'my-project').targets.test) expect(readProjectConfiguration(tree, 'my-project').targets.test)
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"executor": "@nrwl/jest:jest", "executor": "@nrwl/jest:jest",
"options": Object { "options": {
"jestConfig": "jest.config.app.ts", "jestConfig": "jest.config.app.ts",
}, },
} }
@ -312,8 +312,8 @@ projects: getJestProjects()
await jestInitGenerator(tree, {}); await jestInitGenerator(tree, {});
const extensionsJson = readJson(tree, '.vscode/extensions.json'); const extensionsJson = readJson(tree, '.vscode/extensions.json');
expect(extensionsJson).toMatchInlineSnapshot(` expect(extensionsJson).toMatchInlineSnapshot(`
Object { {
"recommendations": Array [ "recommendations": [
"nrwl.angular-console", "nrwl.angular-console",
"angular.ng-template", "angular.ng-template",
"dbaeumer.vscode-eslint", "dbaeumer.vscode-eslint",

View File

@ -6,7 +6,7 @@ export default {
displayName: 'lib1', displayName: 'lib1',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'@swc/jest', '@swc/jest',
{ jsc: { transform: { react: { runtime: 'automatic' } } } }, { jsc: { transform: { react: { runtime: 'automatic' } } } },
], ],
@ -23,7 +23,7 @@ export default {
displayName: 'lib1', displayName: 'lib1',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest', '^.+\\\\.[tj]sx?$': 'babel-jest',
}, },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/libs/lib1', coverageDirectory: '../../coverage/libs/lib1',
@ -37,7 +37,7 @@ export default {
displayName: 'lib1', displayName: 'lib1',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
transform: { transform: {
'^.+\\\\\\\\.[tj]s$': 'babel-jest', '^.+\\\\.[tj]s$': 'babel-jest',
}, },
moduleFileExtensions: ['ts', 'js', 'html'], moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/libs/lib1', coverageDirectory: '../../coverage/libs/lib1',
@ -53,15 +53,15 @@ export default {
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../coverage/libs/lib1', coverageDirectory: '../../coverage/libs/lib1',
transform: { transform: {
'^.+\\\\\\\\.(ts|mjs|js|html)$': [ '^.+\\\\.(ts|mjs|js|html)$': [
'jest-preset-angular', 'jest-preset-angular',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\\\\\\\.(html|svg)$', stringifyContentPathRegex: '\\\\.(html|svg)$',
}, },
], ],
}, },
transformIgnorePatterns: ['node_modules/(?!.*\\\\\\\\.mjs$)'], transformIgnorePatterns: ['node_modules/(?!.*\\\\.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',
@ -89,15 +89,15 @@ export default {
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../coverage/libs/lib1', coverageDirectory: '../../coverage/libs/lib1',
transform: { transform: {
'^.+\\\\\\\\.(ts|mjs|js|html)$': [ '^.+\\\\.(ts|mjs|js|html)$': [
'jest-preset-angular', 'jest-preset-angular',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\\\\\\\.(html|svg)$', stringifyContentPathRegex: '\\\\.(html|svg)$',
}, },
], ],
}, },
transformIgnorePatterns: ['node_modules/(?!.*\\\\\\\\.mjs$)'], transformIgnorePatterns: ['node_modules/(?!.*\\\\.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',
@ -108,19 +108,19 @@ export default {
`; `;
exports[`jestProject should use jest.config.js in project config with --js flag 1`] = ` exports[`jestProject should use jest.config.js in project config with --js flag 1`] = `
Object { {
"configurations": Object { "configurations": {
"ci": Object { "ci": {
"ci": true, "ci": true,
"codeCoverage": true, "codeCoverage": true,
}, },
}, },
"executor": "@nrwl/jest:jest", "executor": "@nrwl/jest:jest",
"options": Object { "options": {
"jestConfig": "libs/lib1/jest.config.js", "jestConfig": "libs/lib1/jest.config.js",
"passWithNoTests": true, "passWithNoTests": true,
}, },
"outputs": Array [ "outputs": [
"{workspaceRoot}/coverage/{projectRoot}", "{workspaceRoot}/coverage/{projectRoot}",
], ],
} }

View File

@ -12,7 +12,7 @@ module.exports = {
}, },
}, },
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': 'ts-jest', '^.+\\\\.[tj]sx?$': 'ts-jest',
}, },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/libs/lib-one', coverageDirectory: '../../coverage/libs/lib-one',
@ -21,19 +21,19 @@ module.exports = {
`; `;
exports[`Jest Migration (v14.0.0) should produce the same results when running multiple times 1`] = ` exports[`Jest Migration (v14.0.0) should produce the same results when running multiple times 1`] = `
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"parserOptions": Object { "parserOptions": {
"project": Array [ "project": [
"libs/my-next-proj/tsconfig.*?.json", "libs/my-next-proj/tsconfig.*?.json",
], ],
}, },
"rules": Object {}, "rules": {},
} }
`; `;
@ -48,7 +48,7 @@ module.exports = {
}, },
}, },
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': 'ts-jest', '^.+\\\\.[tj]sx?$': 'ts-jest',
}, },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/libs/lib-one', coverageDirectory: '../../coverage/libs/lib-one',
@ -68,7 +68,7 @@ module.exports = {
}, },
}, },
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': 'ts-jest', '^.+\\\\.[tj]sx?$': 'ts-jest',
}, },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/libs/lib-one', coverageDirectory: '../../coverage/libs/lib-one',
@ -77,18 +77,18 @@ module.exports = {
`; `;
exports[`Jest Migration (v14.0.0) should update the excludes of next js apps using the project parser settings 1`] = ` exports[`Jest Migration (v14.0.0) should update the excludes of next js apps using the project parser settings 1`] = `
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"parserOptions": Object { "parserOptions": {
"project": Array [ "project": [
"libs/lib-one/tsconfig.*?.json", "libs/lib-one/tsconfig.*?.json",
], ],
}, },
"rules": Object {}, "rules": {},
} }
`; `;

View File

@ -28,14 +28,14 @@ export default {
globals: { globals: {
'ts-jest': { 'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\\\\\\\.(html|svg)$', stringifyContentPathRegex: '\\\\.(html|svg)$',
}, },
}, },
coverageDirectory: '../../coverage/apps/lib-one', coverageDirectory: '../../coverage/apps/lib-one',
transform: { transform: {
'^.+\\\\\\\\.(ts|mjs|js|html)$': 'jest-preset-angular', '^.+\\\\.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*\\\\\\\\.mjs$)'], transformIgnorePatterns: ['node_modules/(?!.*\\\\.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',
@ -58,14 +58,14 @@ export default {
globals: { globals: {
'ts-jest': { 'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\\\\\\\.(html|svg)$', stringifyContentPathRegex: '\\\\.(html|svg)$',
}, },
}, },
coverageDirectory: '../../coverage/apps/lib-one', coverageDirectory: '../../coverage/apps/lib-one',
transform: { transform: {
'^.+\\\\\\\\.(ts|mjs|js|html)$': 'jest-preset-angular', '^.+\\\\.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*\\\\\\\\.mjs$)'], transformIgnorePatterns: ['node_modules/(?!.*\\\\.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

View File

@ -44,30 +44,30 @@ describe('15.0.0 migration (add-jest-inputs)', () => {
const updated = readNxJson(tree); const updated = readNxJson(tree);
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
"!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s", "!{projectRoot}/jest.config.[jt]s",
], ],
"sharedGlobals": Array [], "sharedGlobals": [],
}, },
"targetDefaults": Object { "targetDefaults": {
"test": Object { "test": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
"{workspaceRoot}/jest.preset.js", "{workspaceRoot}/jest.preset.js",
], ],
}, },
"test2": Object { "test2": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
"{workspaceRoot}/jest.preset.js", "{workspaceRoot}/jest.preset.js",

View File

@ -17,7 +17,7 @@ module.exports = {
* It's recommend you update to the latest format. * It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property * You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag. * and running tests with --update-snapshot flag.
* Example: \\"nx affected --targets=test --update-snapshot\\" * Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/ */
snapshotFormat: { escapeString: true, printBasicPrototype: true }, snapshotFormat: { escapeString: true, printBasicPrototype: true },
@ -32,7 +32,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: {}, globals: {},
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -47,7 +47,7 @@ export default {
* It's recommend you update to the latest format. * It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property * You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag. * and running tests with --update-snapshot flag.
* Example: From within the project directory, run \\"nx test --update-snapshot\\" * Example: From within the project directory, run "nx test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/ */
snapshotFormat: { escapeString: true, printBasicPrototype: true }, snapshotFormat: { escapeString: true, printBasicPrototype: true },
@ -58,7 +58,7 @@ export default {
exports[`Jest Migration - jest 29 update configs should add snapshot config with no root preset 2`] = ` exports[`Jest Migration - jest 29 update configs should add snapshot config with no root preset 2`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -80,7 +80,7 @@ exports[`Jest Migration - jest 29 update configs should add snapshot config with
* It's recommend you update to the latest format. * It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property * You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag. * and running tests with --update-snapshot flag.
* Example: From within the project directory, run \\"nx test --update-snapshot\\" * Example: From within the project directory, run "nx test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/ */
snapshotFormat: { escapeString: true, printBasicPrototype: true }, snapshotFormat: { escapeString: true, printBasicPrototype: true },
@ -95,7 +95,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: {}, globals: {},
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -111,7 +111,7 @@ export default {
exports[`Jest Migration - jest 29 update configs should be idempotent 2`] = ` exports[`Jest Migration - jest 29 update configs should be idempotent 2`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -189,7 +189,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: {}, globals: {},
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -205,7 +205,7 @@ export default {
exports[`Jest Migration - jest 29 update configs should update jest.config.ts 2`] = ` exports[`Jest Migration - jest 29 update configs should update jest.config.ts 2`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -236,7 +236,7 @@ module.exports = {
* It's recommend you update to the latest format. * It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property * You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag. * and running tests with --update-snapshot flag.
* Example: \\"nx affected --targets=test --update-snapshot\\" * Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/ */
snapshotFormat: { escapeString: true, printBasicPrototype: true }, snapshotFormat: { escapeString: true, printBasicPrototype: true },
@ -251,7 +251,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: {}, globals: {},
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -267,7 +267,7 @@ export default {
exports[`Jest Migration - jest 29 update configs should update root preset 3`] = ` exports[`Jest Migration - jest 29 update configs should update root preset 3`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -310,7 +310,7 @@ module.exports = {
* It's recommend you update to the latest format. * It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property * You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag. * and running tests with --update-snapshot flag.
* Example: \\"nx affected --targets=test --update-snapshot\\" * Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/ */
snapshotFormat: { escapeString: true, printBasicPrototype: true }, snapshotFormat: { escapeString: true, printBasicPrototype: true },
@ -321,7 +321,7 @@ module.exports = {
exports[`Jest Migration - jest 29 update configs should work if not using ts-jest transformer 1`] = ` exports[`Jest Migration - jest 29 update configs should work if not using ts-jest transformer 1`] = `
"export default { "export default {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest', '^.+\\\\.[tj]sx?$': 'babel-jest',
}, },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
displayName: 'jest', displayName: 'jest',
@ -333,7 +333,7 @@ exports[`Jest Migration - jest 29 update configs should work if not using ts-jes
exports[`Jest Migration - jest 29 update configs should work if not using ts-jest transformer 2`] = ` exports[`Jest Migration - jest 29 update configs should work if not using ts-jest transformer 2`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest', '^.+\\\\.[tj]sx?$': 'babel-jest',
}, },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
displayName: 'jest', displayName: 'jest',
@ -345,7 +345,7 @@ exports[`Jest Migration - jest 29 update configs should work if not using ts-jes
exports[`Jest Migration - jest 29 update configs should work snapshotFormat is defined 1`] = ` exports[`Jest Migration - jest 29 update configs should work snapshotFormat is defined 1`] = `
"export default { "export default {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest', '^.+\\\\.[tj]sx?$': 'babel-jest',
}, },
globals: { something: 'else', globals: { something: 'else',
abc: [1234, true, {abc: 'yes'}] }, abc: [1234, true, {abc: 'yes'}] },
@ -360,7 +360,7 @@ abc: [1234, true, {abc: 'yes'}] },
exports[`Jest Migration - jest 29 update configs should work snapshotFormat is defined 2`] = ` exports[`Jest Migration - jest 29 update configs should work snapshotFormat is defined 2`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': ['ts-jest', { '^.+\\\\.[tj]sx?$': ['ts-jest', {
tsconfig: '<rootDir>/tsconfig.spec.json' tsconfig: '<rootDir>/tsconfig.spec.json'
}], }],
}, },
@ -380,7 +380,7 @@ exports[`Jest Migration - jest 29 update configs should work with jest-preset-an
transform: { transform: {
'^.+.(ts|mjs|js|html)$': ['jest-preset-angular', { '^.+.(ts|mjs|js|html)$': ['jest-preset-angular', {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\\\.(html|svg)$', stringifyContentPathRegex: '\\.(html|svg)$',
}], }],
}, },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
@ -396,7 +396,7 @@ exports[`Jest Migration - jest 29 update configs should work with jest-preset-an
transform: { transform: {
'^.+.(ts|mjs|js|html)$': ['jest-preset-angular', { '^.+.(ts|mjs|js|html)$': ['jest-preset-angular', {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\\\.(html|svg)$', stringifyContentPathRegex: '\\.(html|svg)$',
}], }],
}, },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
@ -413,7 +413,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: {}, globals: {},
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -429,7 +429,7 @@ export default {
exports[`Jest Migration - jest 29 update configs should work with multiple projects + configs 2`] = ` exports[`Jest Migration - jest 29 update configs should work with multiple projects + configs 2`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -456,7 +456,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: {}, globals: {},
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -472,7 +472,7 @@ export default {
exports[`Jest Migration - jest 29 update configs should work with multiple projects + configs 4`] = ` exports[`Jest Migration - jest 29 update configs should work with multiple projects + configs 4`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',

View File

@ -2,7 +2,7 @@
exports[`Jest AST Utils addTransformerToConfig should add transformer to export default config 1`] = ` exports[`Jest AST Utils addTransformerToConfig should add transformer to export default config 1`] = `
"export default { "export default {
transform: { '^.+\\\\\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.spec.json'}], '^(?!.*\\\\\\\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest' }, transform: { '^.+\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.spec.json'}], '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest' },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
displayName: 'blah', displayName: 'blah',
preset: '../../jest.preset.js' preset: '../../jest.preset.js'
@ -14,13 +14,13 @@ exports[`Jest AST Utils addTransformerToConfig should add transformer to export
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
displayName: 'blah', displayName: 'blah',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
transform: { '^.+\\\\\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.spec.json'}] } transform: { '^.+\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.spec.json'}] }
};" };"
`; `;
exports[`Jest AST Utils addTransformerToConfig should add transformer to module.exports config 1`] = ` exports[`Jest AST Utils addTransformerToConfig should add transformer to module.exports config 1`] = `
"module.exports = { "module.exports = {
transform: { '^.+\\\\\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.spec.json'}], '^(?!.*\\\\\\\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest' }, transform: { '^.+\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.spec.json'}], '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest' },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
displayName: 'blah', displayName: 'blah',
preset: '../../jest.preset.js' preset: '../../jest.preset.js'
@ -32,6 +32,6 @@ exports[`Jest AST Utils addTransformerToConfig should add transformer to module.
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
displayName: 'blah', displayName: 'blah',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
transform: { '^.+\\\\\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.spec.json'}] } transform: { '^.+\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.spec.json'}] }
};" };"
`; `;

View File

@ -4,14 +4,14 @@ exports[`lib --unit-test-runner jest should generate test configuration with swc
"/* eslint-disable */ "/* eslint-disable */
const { readFileSync } = require('fs'); const { readFileSync } = require('fs');
// Reading the SWC compilation config and remove the \\"exclude\\" // Reading the SWC compilation config and remove the "exclude"
// for the test files to be compiled by SWC // for the test files to be compiled by SWC
const { exclude: _, ...swcJestConfig } = JSON.parse( const { exclude: _, ...swcJestConfig } = JSON.parse(
readFileSync(\`\${__dirname}/.swcrc\`, 'utf-8') readFileSync(\`\${__dirname}/.swcrc\`, 'utf-8')
); );
// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves.
// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to \\"exclude\\" // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude"
if (swcJestConfig.swcrc === undefined) { if (swcJestConfig.swcrc === undefined) {
swcJestConfig.swcrc = false; swcJestConfig.swcrc = false;
} }
@ -20,7 +20,7 @@ module.exports = {
displayName: 'my-lib', displayName: 'my-lib',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
transform: { transform: {
'^.+\\\\\\\\.[tj]s$': ['@swc/jest', swcJestConfig], '^.+\\\\.[tj]s$': ['@swc/jest', swcJestConfig],
}, },
moduleFileExtensions: ['ts', 'js', 'html'], moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/libs/my-lib', coverageDirectory: '../../coverage/libs/my-lib',

View File

@ -128,8 +128,8 @@ describe('lib', () => {
await libraryGenerator(tree, { ...defaultOptions, name: 'myLib' }); await libraryGenerator(tree, { ...defaultOptions, name: 'myLib' });
const tsconfigJson = readJson(tree, 'libs/my-lib/tsconfig.json'); const tsconfigJson = readJson(tree, 'libs/my-lib/tsconfig.json');
expect(tsconfigJson).toMatchInlineSnapshot(` expect(tsconfigJson).toMatchInlineSnapshot(`
Object { {
"compilerOptions": Object { "compilerOptions": {
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"module": "commonjs", "module": "commonjs",
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
@ -139,13 +139,13 @@ describe('lib', () => {
"strict": true, "strict": true,
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"files": Array [], "files": [],
"include": Array [], "include": [],
"references": Array [ "references": [
Object { {
"path": "./tsconfig.lib.json", "path": "./tsconfig.lib.json",
}, },
Object { {
"path": "./tsconfig.spec.json", "path": "./tsconfig.spec.json",
}, },
], ],
@ -451,36 +451,36 @@ describe('lib', () => {
const eslintJson = readJson(tree, 'libs/my-lib/.eslintrc.json'); const eslintJson = readJson(tree, 'libs/my-lib/.eslintrc.json');
expect(eslintJson).toMatchInlineSnapshot(` expect(eslintJson).toMatchInlineSnapshot(`
Object { {
"extends": Array [ "extends": [
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }
@ -516,36 +516,36 @@ describe('lib', () => {
const eslintJson = readJson(tree, 'libs/my-dir/my-lib/.eslintrc.json'); const eslintJson = readJson(tree, 'libs/my-dir/my-lib/.eslintrc.json');
expect(eslintJson).toMatchInlineSnapshot(` expect(eslintJson).toMatchInlineSnapshot(`
Object { {
"extends": Array [ "extends": [
"../../../.eslintrc.json", "../../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }
@ -631,36 +631,36 @@ describe('lib', () => {
).toEqual(['libs/my-dir/my-lib/**/*.js']); ).toEqual(['libs/my-dir/my-lib/**/*.js']);
expect(readJson(tree, 'libs/my-dir/my-lib/.eslintrc.json')) expect(readJson(tree, 'libs/my-dir/my-lib/.eslintrc.json'))
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"extends": Array [ "extends": [
"../../../.eslintrc.json", "../../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }
@ -692,7 +692,7 @@ describe('lib', () => {
displayName: 'my-lib', displayName: 'my-lib',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
transform: { transform: {
'^.+\\\\\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }], '^.+\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
}, },
moduleFileExtensions: ['ts', 'js', 'html'], moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/libs/my-lib', coverageDirectory: '../../coverage/libs/my-lib',
@ -1029,11 +1029,11 @@ describe('lib', () => {
const babelRc = readJson(tree, 'libs/my-lib/.babelrc'); const babelRc = readJson(tree, 'libs/my-lib/.babelrc');
expect(babelRc).toMatchInlineSnapshot(` expect(babelRc).toMatchInlineSnapshot(`
Object { {
"presets": Array [ "presets": [
Array [ [
"@nrwl/js/babel", "@nrwl/js/babel",
Object { {
"useBuiltIns": "usage", "useBuiltIns": "usage",
}, },
], ],

View File

@ -2,34 +2,34 @@
exports[`Update .lib.swcrc exclude should update the exclude pattern 1`] = ` exports[`Update .lib.swcrc exclude should update the exclude pattern 1`] = `
"{ "{
\\"jsc\\": { "jsc": {
\\"target\\": \\"es2017\\", "target": "es2017",
\\"parser\\": { "parser": {
\\"syntax\\": \\"typescript\\", "syntax": "typescript",
\\"decorators\\": true, "decorators": true,
\\"dynamicImport\\": true "dynamicImport": true
}, },
\\"transform\\": { "transform": {
\\"decoratorMetadata\\": true, "decoratorMetadata": true,
\\"legacyDecorator\\": true "legacyDecorator": true
}, },
\\"keepClassNames\\": true, "keepClassNames": true,
\\"externalHelpers\\": true, "externalHelpers": true,
\\"loose\\": true "loose": true
}, },
\\"module\\": { "module": {
\\"type\\": \\"commonjs\\", "type": "commonjs",
\\"strict\\": true, "strict": true,
\\"noInterop\\": true "noInterop": true
}, },
\\"sourceMaps\\": true, "sourceMaps": true,
\\"exclude\\": [ "exclude": [
\\"jest.config.ts\\", "jest.config.ts",
\\".*\\\\\\\\.spec.tsx?$\\", ".*\\\\.spec.tsx?$",
\\".*\\\\\\\\.test.tsx?$\\", ".*\\\\.test.tsx?$",
\\"./src/jest-setup.ts$\\", "./src/jest-setup.ts$",
\\"./**/jest-setup.ts$\\", "./**/jest-setup.ts$",
\\".*.js$\\" ".*.js$"
] ]
} }
" "

View File

@ -2,34 +2,34 @@
exports[`JS Migration (v14.0.0) should update the exclude pattern 1`] = ` exports[`JS Migration (v14.0.0) should update the exclude pattern 1`] = `
"{ "{
\\"jsc\\": { "jsc": {
\\"target\\": \\"es2017\\", "target": "es2017",
\\"parser\\": { "parser": {
\\"syntax\\": \\"typescript\\", "syntax": "typescript",
\\"decorators\\": true, "decorators": true,
\\"dynamicImport\\": true "dynamicImport": true
}, },
\\"transform\\": { "transform": {
\\"decoratorMetadata\\": true, "decoratorMetadata": true,
\\"legacyDecorator\\": true "legacyDecorator": true
}, },
\\"keepClassNames\\": true, "keepClassNames": true,
\\"externalHelpers\\": true, "externalHelpers": true,
\\"loose\\": true "loose": true
}, },
\\"module\\": { "module": {
\\"type\\": \\"commonjs\\", "type": "commonjs",
\\"strict\\": true, "strict": true,
\\"noInterop\\": true "noInterop": true
}, },
\\"sourceMaps\\": true, "sourceMaps": true,
\\"exclude\\": [ "exclude": [
\\"jest.config.js\\", "jest.config.js",
\\".*.spec.tsx?$\\", ".*.spec.tsx?$",
\\".*.test.tsx?$\\", ".*.test.tsx?$",
\\"./src/jest-setup.ts$\\", "./src/jest-setup.ts$",
\\"./**/jest-setup.ts$\\", "./**/jest-setup.ts$",
\\".*.js$\\" ".*.js$"
] ]
} }
" "

View File

@ -385,7 +385,7 @@ describe('updatePackageJson', () => {
vol.readFileSync('dist/libs/lib1/package.json', 'utf-8').toString() vol.readFileSync('dist/libs/lib1/package.json', 'utf-8').toString()
); );
expect(distPackageJson).toMatchInlineSnapshot(` expect(distPackageJson).toMatchInlineSnapshot(`
Object { {
"main": "./main.js", "main": "./main.js",
"name": "@org/lib1", "name": "@org/lib1",
"types": "./main.d.ts", "types": "./main.d.ts",
@ -438,8 +438,8 @@ describe('updatePackageJson', () => {
vol.readFileSync('dist/libs/lib1/package.json', 'utf-8').toString() vol.readFileSync('dist/libs/lib1/package.json', 'utf-8').toString()
); );
expect(distPackageJson).toMatchInlineSnapshot(` expect(distPackageJson).toMatchInlineSnapshot(`
Object { {
"dependencies": Object { "dependencies": {
"external1": "1.0.0", "external1": "1.0.0",
"external2": "4.5.6", "external2": "4.5.6",
}, },

View File

@ -2,32 +2,32 @@
exports[`@nrwl/linter:init --linter eslint should generate the global eslint config 1`] = ` exports[`@nrwl/linter:init --linter eslint should generate the global eslint config 1`] = `
"{ "{
\\"root\\": true, "root": true,
\\"ignorePatterns\\": [ "ignorePatterns": [
\\"**/*\\" "**/*"
], ],
\\"plugins\\": [ "plugins": [
\\"@nrwl/nx\\" "@nrwl/nx"
], ],
\\"overrides\\": [ "overrides": [
{ {
\\"files\\": [ "files": [
\\"*.ts\\", "*.ts",
\\"*.tsx\\", "*.tsx",
\\"*.js\\", "*.js",
\\"*.jsx\\" "*.jsx"
], ],
\\"rules\\": { "rules": {
\\"@nrwl/nx/enforce-module-boundaries\\": [ "@nrwl/nx/enforce-module-boundaries": [
\\"error\\", "error",
{ {
\\"enforceBuildableLibDependency\\": true, "enforceBuildableLibDependency": true,
\\"allow\\": [], "allow": [],
\\"depConstraints\\": [ "depConstraints": [
{ {
\\"sourceTag\\": \\"*\\", "sourceTag": "*",
\\"onlyDependOnLibsWithTags\\": [ "onlyDependOnLibsWithTags": [
\\"*\\" "*"
] ]
} }
] ]
@ -36,24 +36,24 @@ exports[`@nrwl/linter:init --linter eslint should generate the global eslint con
} }
}, },
{ {
\\"files\\": [ "files": [
\\"*.ts\\", "*.ts",
\\"*.tsx\\" "*.tsx"
], ],
\\"extends\\": [ "extends": [
\\"plugin:@nrwl/nx/typescript\\" "plugin:@nrwl/nx/typescript"
], ],
\\"rules\\": {} "rules": {}
}, },
{ {
\\"files\\": [ "files": [
\\"*.js\\", "*.js",
\\"*.jsx\\" "*.jsx"
], ],
\\"extends\\": [ "extends": [
\\"plugin:@nrwl/nx/javascript\\" "plugin:@nrwl/nx/javascript"
], ],
\\"rules\\": {} "rules": {}
} }
] ]
} }

View File

@ -2,20 +2,20 @@
exports[`@nrwl/linter:lint-project --linter eslint should extend to .eslintrc.js when an .eslintrc.js already exist 1`] = ` exports[`@nrwl/linter:lint-project --linter eslint should extend to .eslintrc.js when an .eslintrc.js already exist 1`] = `
"{ "{
\\"extends\\": [\\"../../.eslintrc.js\\"], "extends": ["../../.eslintrc.js"],
\\"ignorePatterns\\": [\\"!**/*\\"], "ignorePatterns": ["!**/*"],
\\"overrides\\": [ "overrides": [
{ {
\\"files\\": [\\"*.ts\\", \\"*.tsx\\", \\"*.js\\", \\"*.jsx\\"], "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
\\"rules\\": {} "rules": {}
}, },
{ {
\\"files\\": [\\"*.ts\\", \\"*.tsx\\"], "files": ["*.ts", "*.tsx"],
\\"rules\\": {} "rules": {}
}, },
{ {
\\"files\\": [\\"*.js\\", \\"*.jsx\\"], "files": ["*.js", "*.jsx"],
\\"rules\\": {} "rules": {}
} }
] ]
} }
@ -24,20 +24,20 @@ exports[`@nrwl/linter:lint-project --linter eslint should extend to .eslintrc.js
exports[`@nrwl/linter:lint-project --linter eslint should generate a eslint config 1`] = ` exports[`@nrwl/linter:lint-project --linter eslint should generate a eslint config 1`] = `
"{ "{
\\"extends\\": [\\"../../.eslintrc.json\\"], "extends": ["../../.eslintrc.json"],
\\"ignorePatterns\\": [\\"!**/*\\"], "ignorePatterns": ["!**/*"],
\\"overrides\\": [ "overrides": [
{ {
\\"files\\": [\\"*.ts\\", \\"*.tsx\\", \\"*.js\\", \\"*.jsx\\"], "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
\\"rules\\": {} "rules": {}
}, },
{ {
\\"files\\": [\\"*.ts\\", \\"*.tsx\\"], "files": ["*.ts", "*.tsx"],
\\"rules\\": {} "rules": {}
}, },
{ {
\\"files\\": [\\"*.js\\", \\"*.jsx\\"], "files": ["*.js", "*.jsx"],
\\"rules\\": {} "rules": {}
} }
] ]
} }

View File

@ -50,14 +50,14 @@ describe('@nrwl/linter:lint-project', () => {
const projectConfig = readProjectConfiguration(tree, 'test-lib'); const projectConfig = readProjectConfiguration(tree, 'test-lib');
expect(projectConfig.targets.lint).toMatchInlineSnapshot(` expect(projectConfig.targets.lint).toMatchInlineSnapshot(`
Object { {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"**/*.ts", "**/*.ts",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
} }

View File

@ -19,7 +19,7 @@ exports[`@nrwl/linter:workspace-rule --dir should support creating the rule in a
import { ESLintUtils } from '@typescript-eslint/utils'; import { ESLintUtils } from '@typescript-eslint/utils';
// NOTE: The rule will be available in ESLint configs as \\"@nrwl/nx/workspace/another-rule\\" // NOTE: The rule will be available in ESLint configs as "@nrwl/nx/workspace/another-rule"
export const RULE_NAME = 'another-rule'; export const RULE_NAME = 'another-rule';
export const rule = ESLintUtils.RuleCreator(() => __filename)({ export const rule = ESLintUtils.RuleCreator(() => __filename)({
@ -75,7 +75,7 @@ exports[`@nrwl/linter:workspace-rule --dir should support creating the rule in a
import { ESLintUtils } from '@typescript-eslint/utils'; import { ESLintUtils } from '@typescript-eslint/utils';
// NOTE: The rule will be available in ESLint configs as \\"@nrwl/nx/workspace/one-more-rule\\" // NOTE: The rule will be available in ESLint configs as "@nrwl/nx/workspace/one-more-rule"
export const RULE_NAME = 'one-more-rule'; export const RULE_NAME = 'one-more-rule';
export const rule = ESLintUtils.RuleCreator(() => __filename)({ export const rule = ESLintUtils.RuleCreator(() => __filename)({
@ -131,7 +131,7 @@ exports[`@nrwl/linter:workspace-rule should generate the required files 1`] = `
import { ESLintUtils } from '@typescript-eslint/utils'; import { ESLintUtils } from '@typescript-eslint/utils';
// NOTE: The rule will be available in ESLint configs as \\"@nrwl/nx/workspace/my-rule\\" // NOTE: The rule will be available in ESLint configs as "@nrwl/nx/workspace/my-rule"
export const RULE_NAME = 'my-rule'; export const RULE_NAME = 'my-rule';
export const rule = ESLintUtils.RuleCreator(() => __filename)({ export const rule = ESLintUtils.RuleCreator(() => __filename)({

View File

@ -33,18 +33,18 @@ module.exports = {
exports[`@nrwl/linter:workspace-rules-project should generate the required files 2`] = ` exports[`@nrwl/linter:workspace-rules-project should generate the required files 2`] = `
"{ "{
\\"extends\\": \\"../../tsconfig.base.json\\", "extends": "../../tsconfig.base.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"module\\": \\"commonjs\\" "module": "commonjs"
}, },
\\"files\\": [], "files": [],
\\"include\\": [], "include": [],
\\"references\\": [ "references": [
{ {
\\"path\\": \\"./tsconfig.lint.json\\" "path": "./tsconfig.lint.json"
}, },
{ {
\\"path\\": \\"./tsconfig.spec.json\\" "path": "./tsconfig.spec.json"
} }
] ]
} }
@ -53,26 +53,26 @@ exports[`@nrwl/linter:workspace-rules-project should generate the required files
exports[`@nrwl/linter:workspace-rules-project should generate the required files 3`] = ` exports[`@nrwl/linter:workspace-rules-project should generate the required files 3`] = `
"{ "{
\\"extends\\": \\"./tsconfig.json\\", "extends": "./tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"outDir\\": \\"../../dist/out-tsc\\", "outDir": "../../dist/out-tsc",
\\"types\\": [\\"node\\"] "types": ["node"]
}, },
\\"exclude\\": [\\"**/*.spec.ts\\"], "exclude": ["**/*.spec.ts"],
\\"include\\": [\\"**/*.ts\\"] "include": ["**/*.ts"]
} }
" "
`; `;
exports[`@nrwl/linter:workspace-rules-project should generate the required files 4`] = ` exports[`@nrwl/linter:workspace-rules-project should generate the required files 4`] = `
"{ "{
\\"extends\\": \\"./tsconfig.json\\", "extends": "./tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"outDir\\": \\"../../dist/out-tsc\\", "outDir": "../../dist/out-tsc",
\\"module\\": \\"commonjs\\", "module": "commonjs",
\\"types\\": [\\"jest\\", \\"node\\"] "types": ["jest", "node"]
}, },
\\"include\\": [\\"jest.config.ts\\", \\"**/*.test.ts\\", \\"**/*.spec.ts\\", \\"**/*.d.ts\\"] "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
} }
" "
`; `;
@ -83,7 +83,7 @@ export default {
displayName: 'eslint-rules', displayName: 'eslint-rules',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
transform: { transform: {
'^.+\\\\\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }], '^.+\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
}, },
moduleFileExtensions: ['ts', 'js', 'html'], moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/tools/eslint-rules', coverageDirectory: '../../coverage/tools/eslint-rules',

View File

@ -74,25 +74,25 @@ describe('@nrwl/linter:workspace-rules-project', () => {
expect(readProjectConfiguration(tree, WORKSPACE_RULES_PROJECT_NAME)) expect(readProjectConfiguration(tree, WORKSPACE_RULES_PROJECT_NAME))
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"$schema": "../../node_modules/nx/schemas/project-schema.json", "$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "eslint-rules", "name": "eslint-rules",
"root": "tools/eslint-rules", "root": "tools/eslint-rules",
"sourceRoot": "tools/eslint-rules", "sourceRoot": "tools/eslint-rules",
"targets": Object { "targets": {
"test": Object { "test": {
"configurations": Object { "configurations": {
"ci": Object { "ci": {
"ci": true, "ci": true,
"codeCoverage": true, "codeCoverage": true,
}, },
}, },
"executor": "@nrwl/jest:jest", "executor": "@nrwl/jest:jest",
"options": Object { "options": {
"jestConfig": "tools/eslint-rules/jest.config.ts", "jestConfig": "tools/eslint-rules/jest.config.ts",
"passWithNoTests": true, "passWithNoTests": true,
}, },
"outputs": Array [ "outputs": [
"{workspaceRoot}/coverage/{projectRoot}", "{workspaceRoot}/coverage/{projectRoot}",
], ],
}, },

View File

@ -190,18 +190,18 @@ describe('Remove ESLint parserOptions.project config if no rules requiring type-
// Updated - no more parserOptions.project // Updated - no more parserOptions.project
expect(readJson(tree, 'libs/workspace-lib/.eslintrc.json')) expect(readJson(tree, 'libs/workspace-lib/.eslintrc.json'))
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"extends": "../../../.eslintrc.json", "extends": "../../../.eslintrc.json",
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }
@ -210,18 +210,18 @@ describe('Remove ESLint parserOptions.project config if no rules requiring type-
// Updated - no more parserOptions.project // Updated - no more parserOptions.project
expect(readJson(tree, 'libs/another-lib/.eslintrc.json')) expect(readJson(tree, 'libs/another-lib/.eslintrc.json'))
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"extends": "../../../.eslintrc.json", "extends": "../../../.eslintrc.json",
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object { "rules": {
"@typescript-eslint/await-thenable": "off", "@typescript-eslint/await-thenable": "off",
}, },
}, },

View File

@ -41,28 +41,28 @@ describe('addOutputs', () => {
await addOutputs(tree); await addOutputs(tree);
expect(readProjectConfiguration(tree, 'proj')).toMatchInlineSnapshot(` expect(readProjectConfiguration(tree, 'proj')).toMatchInlineSnapshot(`
Object { {
"$schema": "../node_modules/nx/schemas/project-schema.json", "$schema": "../node_modules/nx/schemas/project-schema.json",
"name": "proj", "name": "proj",
"root": "proj", "root": "proj",
"targets": Object { "targets": {
"lintWithOutputs": Object { "lintWithOutputs": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object {}, "options": {},
"outputs": Array [ "outputs": [
"dist", "dist",
], ],
}, },
"lintWithoutOutputs": Object { "lintWithoutOutputs": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object {}, "options": {},
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
"notLint": Object { "notLint": {
"executor": "@nrwl/node:build", "executor": "@nrwl/node:build",
"options": Object {}, "options": {},
}, },
}, },
} }

View File

@ -90,7 +90,7 @@ describe('eslint8Updates()', () => {
).toMatchInlineSnapshot(` ).toMatchInlineSnapshot(`
"import { ESLintUtils } from '@typescript-eslint/experimental-utils'; "import { ESLintUtils } from '@typescript-eslint/experimental-utils';
// NOTE: The rule will be available in ESLint configs as \\"@nrwl/nx/workspace/existing-rule\\" // NOTE: The rule will be available in ESLint configs as "@nrwl/nx/workspace/existing-rule"
export const RULE_NAME = 'existing-rule'; export const RULE_NAME = 'existing-rule';
export const rule = ESLintUtils.RuleCreator(() => __filename)({ export const rule = ESLintUtils.RuleCreator(() => __filename)({

View File

@ -2,23 +2,23 @@
exports[`addTypescriptEslintUtilsIfNeeded() should add @typescript-eslint/utils if plugins folder exists 1`] = ` exports[`addTypescriptEslintUtilsIfNeeded() should add @typescript-eslint/utils if plugins folder exists 1`] = `
"{ "{
\\"name\\": \\"test-name\\", "name": "test-name",
\\"dependencies\\": {}, "dependencies": {},
\\"devDependencies\\": { "devDependencies": {
\\"@typescript-eslint/utils\\": \\"^5.58.0\\" "@typescript-eslint/utils": "^5.58.0"
} }
} }
" "
`; `;
exports[`addTypescriptEslintUtilsIfNeeded() should not add @typescript-eslint/utils if plugins folder or experimental-utils dont exist 1`] = `"{\\"name\\":\\"test-name\\",\\"dependencies\\":{},\\"devDependencies\\":{}}"`; exports[`addTypescriptEslintUtilsIfNeeded() should not add @typescript-eslint/utils if plugins folder or experimental-utils dont exist 1`] = `"{"name":"test-name","dependencies":{},"devDependencies":{}}"`;
exports[`addTypescriptEslintUtilsIfNeeded() should remove @typescript-eslint/experimental-utils from package.json devDependencies and add @typescript-eslint/utils 1`] = ` exports[`addTypescriptEslintUtilsIfNeeded() should remove @typescript-eslint/experimental-utils from package.json devDependencies and add @typescript-eslint/utils 1`] = `
"{ "{
\\"name\\": \\"test-name\\", "name": "test-name",
\\"dependencies\\": {}, "dependencies": {},
\\"devDependencies\\": { "devDependencies": {
\\"@typescript-eslint/utils\\": \\"^5.58.0\\" "@typescript-eslint/utils": "^5.58.0"
} }
} }
" "
@ -26,10 +26,10 @@ exports[`addTypescriptEslintUtilsIfNeeded() should remove @typescript-eslint/exp
exports[`addTypescriptEslintUtilsIfNeeded() should remove @typescript-eslint/experimental-utils from package.json devDependencies and add @typescript-eslint/utils 2`] = ` exports[`addTypescriptEslintUtilsIfNeeded() should remove @typescript-eslint/experimental-utils from package.json devDependencies and add @typescript-eslint/utils 2`] = `
"{ "{
\\"name\\": \\"test-name\\", "name": "test-name",
\\"dependencies\\": {}, "dependencies": {},
\\"devDependencies\\": { "devDependencies": {
\\"@typescript-eslint/utils\\": \\"^5.58.0\\" "@typescript-eslint/utils": "^5.58.0"
} }
} }
" "

View File

@ -73,7 +73,7 @@ describe('experimentalToUtilsUpdate()', () => {
"import { ESLintUtils } from '@typescript-eslint/utils'; "import { ESLintUtils } from '@typescript-eslint/utils';
import { rule, RULE_NAME } from './existing-rule'; import { rule, RULE_NAME } from './existing-rule';
// NOTE: The rule will be available in ESLint configs as \\"@nrwl/nx/workspace/existing-rule\\" // NOTE: The rule will be available in ESLint configs as "@nrwl/nx/workspace/existing-rule"
export const RULE_NAME = 'existing-rule'; export const RULE_NAME = 'existing-rule';
export const rule = ESLintUtils.RuleCreator(() => __filename)({ export const rule = ESLintUtils.RuleCreator(() => __filename)({

View File

@ -84,15 +84,15 @@ describe('15.7.1 migration (add-eslintignore)', () => {
expect(tree.exists('.eslintignore')).toBeTruthy(); expect(tree.exists('.eslintignore')).toBeTruthy();
expect(readJson(tree, 'nx.json').targetDefaults).toMatchInlineSnapshot(` expect(readJson(tree, 'nx.json').targetDefaults).toMatchInlineSnapshot(`
Object { {
"lint": Object { "lint": {
"inputs": Array [ "inputs": [
"default", "default",
"{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/.eslintrc.json",
], ],
}, },
"lint2": Object { "lint2": {
"inputs": Array [ "inputs": [
"default", "default",
"{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/.eslintrc.json",
], ],

View File

@ -22,58 +22,58 @@ exports[`convertTSLintDisableCommentsForProject should replace tslint:disable co
`; `;
exports[`convertToESLintConfig() should work for a non-Angular project tslint.json file 1`] = ` exports[`convertToESLintConfig() should work for a non-Angular project tslint.json file 1`] = `
Object { {
"convertedESLintConfig": Object { "convertedESLintConfig": {
"env": Object { "env": {
"browser": true, "browser": true,
"es6": true, "es6": true,
"node": true, "node": true,
}, },
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"parserOptions": Object { "parserOptions": {
"project": "tsconfig.json", "project": "tsconfig.json",
"sourceType": "module", "sourceType": "module",
}, },
"plugins": Array [ "plugins": [
"@typescript-eslint", "@typescript-eslint",
], ],
"root": true, "root": true,
}, },
"ensureESLintPlugins": Array [], "ensureESLintPlugins": [],
"unconvertedTSLintRules": Array [], "unconvertedTSLintRules": [],
} }
`; `;
exports[`convertToESLintConfig() should work for a project tslint.json file 1`] = ` exports[`convertToESLintConfig() should work for a project tslint.json file 1`] = `
Object { {
"convertedESLintConfig": Object { "convertedESLintConfig": {
"env": Object { "env": {
"browser": true, "browser": true,
"es6": true, "es6": true,
"node": true, "node": true,
}, },
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"parserOptions": Object { "parserOptions": {
"project": "tsconfig.json", "project": "tsconfig.json",
"sourceType": "module", "sourceType": "module",
}, },
"plugins": Array [ "plugins": [
"@angular-eslint/eslint-plugin", "@angular-eslint/eslint-plugin",
"@typescript-eslint", "@typescript-eslint",
], ],
"root": true, "root": true,
"rules": Object { "rules": {
"@angular-eslint/component-selector": Array [ "@angular-eslint/component-selector": [
"error", "error",
Object { {
"prefix": "angular-app", "prefix": "angular-app",
"style": "kebab-case", "style": "kebab-case",
"type": "element", "type": "element",
}, },
], ],
"@angular-eslint/directive-selector": Array [ "@angular-eslint/directive-selector": [
"error", "error",
Object { {
"prefix": "angular-app", "prefix": "angular-app",
"style": "camelCase", "style": "camelCase",
"type": "attribute", "type": "attribute",
@ -81,43 +81,43 @@ Object {
], ],
}, },
}, },
"ensureESLintPlugins": Array [], "ensureESLintPlugins": [],
"unconvertedTSLintRules": Array [], "unconvertedTSLintRules": [],
} }
`; `;
exports[`convertToESLintConfig() should work for a root tslint.json file 1`] = ` exports[`convertToESLintConfig() should work for a root tslint.json file 1`] = `
Object { {
"convertedESLintConfig": Object { "convertedESLintConfig": {
"env": Object { "env": {
"browser": true, "browser": true,
"es6": true, "es6": true,
"node": true, "node": true,
}, },
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"parserOptions": Object { "parserOptions": {
"project": "tsconfig.json", "project": "tsconfig.json",
"sourceType": "module", "sourceType": "module",
}, },
"plugins": Array [ "plugins": [
"eslint-plugin-import", "eslint-plugin-import",
"@angular-eslint/eslint-plugin", "@angular-eslint/eslint-plugin",
"@angular-eslint/eslint-plugin-template", "@angular-eslint/eslint-plugin-template",
"@typescript-eslint", "@typescript-eslint",
], ],
"root": true, "root": true,
"rules": Object { "rules": {
"@angular-eslint/component-selector": Array [ "@angular-eslint/component-selector": [
"error", "error",
Object { {
"prefix": "app", "prefix": "app",
"style": "kebab-case", "style": "kebab-case",
"type": "element", "type": "element",
}, },
], ],
"@angular-eslint/directive-selector": Array [ "@angular-eslint/directive-selector": [
"error", "error",
Object { {
"prefix": "app", "prefix": "app",
"style": "camelCase", "style": "camelCase",
"type": "attribute", "type": "attribute",
@ -138,17 +138,17 @@ Object {
"@angular-eslint/use-pipe-transform-interface": "error", "@angular-eslint/use-pipe-transform-interface": "error",
"@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off", "@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": Array [ "@typescript-eslint/explicit-member-accessibility": [
"off", "off",
Object { {
"accessibility": "explicit", "accessibility": "explicit",
}, },
], ],
"@typescript-eslint/member-ordering": "error", "@typescript-eslint/member-ordering": "error",
"@typescript-eslint/naming-convention": Array [ "@typescript-eslint/naming-convention": [
"error", "error",
Object { {
"format": Array [ "format": [
"camelCase", "camelCase",
"UPPER_CASE", "UPPER_CASE",
], ],
@ -159,17 +159,17 @@ Object {
], ],
"@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-inferrable-types": Array [ "@typescript-eslint/no-inferrable-types": [
"error", "error",
Object { {
"ignoreParameters": true, "ignoreParameters": true,
}, },
], ],
"@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-non-null-assertion": "error", "@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-shadow": Array [ "@typescript-eslint/no-shadow": [
"error", "error",
Object { {
"hoist": "all", "hoist": "all",
}, },
], ],
@ -179,7 +179,7 @@ Object {
"arrow-body-style": "error", "arrow-body-style": "error",
"constructor-super": "error", "constructor-super": "error",
"dot-notation": "off", "dot-notation": "off",
"eqeqeq": Array [ "eqeqeq": [
"error", "error",
"smart", "smart",
], ],
@ -189,9 +189,9 @@ Object {
"import/no-deprecated": "warn", "import/no-deprecated": "warn",
"no-bitwise": "error", "no-bitwise": "error",
"no-caller": "error", "no-caller": "error",
"no-console": Array [ "no-console": [
"error", "error",
Object {}, {},
], ],
"no-debugger": "error", "no-debugger": "error",
"no-empty": "off", "no-empty": "off",
@ -199,7 +199,7 @@ Object {
"no-eval": "error", "no-eval": "error",
"no-fallthrough": "error", "no-fallthrough": "error",
"no-new-wrappers": "error", "no-new-wrappers": "error",
"no-restricted-imports": Array [ "no-restricted-imports": [
"error", "error",
"rxjs/Rx", "rxjs/Rx",
], ],
@ -213,32 +213,32 @@ Object {
"radix": "error", "radix": "error",
}, },
}, },
"ensureESLintPlugins": Array [ "ensureESLintPlugins": [
"eslint-plugin-import", "eslint-plugin-import",
], ],
"unconvertedTSLintRules": Array [], "unconvertedTSLintRules": [],
} }
`; `;
exports[`convertToESLintConfig() should work for an e2e project tslint.json file 1`] = ` exports[`convertToESLintConfig() should work for an e2e project tslint.json file 1`] = `
Object { {
"convertedESLintConfig": Object { "convertedESLintConfig": {
"env": Object { "env": {
"browser": true, "browser": true,
"es6": true, "es6": true,
"node": true, "node": true,
}, },
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"parserOptions": Object { "parserOptions": {
"project": "tsconfig.json", "project": "tsconfig.json",
"sourceType": "module", "sourceType": "module",
}, },
"plugins": Array [ "plugins": [
"@typescript-eslint", "@typescript-eslint",
], ],
"root": true, "root": true,
}, },
"ensureESLintPlugins": Array [], "ensureESLintPlugins": [],
"unconvertedTSLintRules": Array [], "unconvertedTSLintRules": [],
} }
`; `;

View File

@ -1,26 +1,26 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ProjectConverter ignoreExistingTslintConfig ignoreExistingTslintConfig: false should use existing TSLint configs and merge their converted ESLint equivalents with recommended ESLint configs 1`] = ` exports[`ProjectConverter ignoreExistingTslintConfig ignoreExistingTslintConfig: false should use existing TSLint configs and merge their converted ESLint equivalents with recommended ESLint configs 1`] = `
Object { {
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
], ],
"rules": Object { "rules": {
"some-converted-rule": "error", "some-converted-rule": "error",
}, },
}, },
], ],
"rules": Object { "rules": {
"some-recommended-root-eslint-rule": "error", "some-recommended-root-eslint-rule": "error",
}, },
} }
`; `;
exports[`ProjectConverter ignoreExistingTslintConfig ignoreExistingTslintConfig: false should use existing TSLint configs and merge their converted ESLint equivalents with recommended ESLint configs 2`] = ` exports[`ProjectConverter ignoreExistingTslintConfig ignoreExistingTslintConfig: false should use existing TSLint configs and merge their converted ESLint equivalents with recommended ESLint configs 2`] = `
Object { {
"rules": Object { "rules": {
"some-converted-rule": "error", "some-converted-rule": "error",
"some-recommended-project-eslint-rule": "error", "some-recommended-project-eslint-rule": "error",
}, },
@ -28,25 +28,25 @@ Object {
`; `;
exports[`ProjectConverter ignoreExistingTslintConfig ignoreExistingTslintConfig: true should ignore existing TSLint configs and just reset the project to use recommended ESLint configs 1`] = ` exports[`ProjectConverter ignoreExistingTslintConfig ignoreExistingTslintConfig: true should ignore existing TSLint configs and just reset the project to use recommended ESLint configs 1`] = `
Object { {
"rules": Object { "rules": {
"some-recommended-root-eslint-rule": "error", "some-recommended-root-eslint-rule": "error",
}, },
} }
`; `;
exports[`ProjectConverter ignoreExistingTslintConfig ignoreExistingTslintConfig: true should ignore existing TSLint configs and just reset the project to use recommended ESLint configs 2`] = ` exports[`ProjectConverter ignoreExistingTslintConfig ignoreExistingTslintConfig: true should ignore existing TSLint configs and just reset the project to use recommended ESLint configs 2`] = `
Object { {
"rules": Object { "rules": {
"some-recommended-project-eslint-rule": "error", "some-recommended-project-eslint-rule": "error",
}, },
} }
`; `;
exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 1`] = ` exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 1`] = `
Object { {
"dependencies": Object {}, "dependencies": {},
"devDependencies": Object { "devDependencies": {
"codelyzer": "latest", "codelyzer": "latest",
"tslint": "latest", "tslint": "latest",
}, },
@ -55,25 +55,25 @@ Object {
`; `;
exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 2`] = ` exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 2`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"generators": Object { "generators": {
"@nrwl/angular": Object { "@nrwl/angular": {
"application": Object { "application": {
"linter": "tslint", "linter": "tslint",
}, },
"library": Object { "library": {
"linter": "tslint", "linter": "tslint",
}, },
}, },
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -87,30 +87,30 @@ Object {
`; `;
exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 3`] = ` exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 3`] = `
Object { {
"$schema": "../../node_modules/nx/schemas/project-schema.json", "$schema": "../../node_modules/nx/schemas/project-schema.json",
"generators": Object { "generators": {
"@nrwl/angular:application": Object { "@nrwl/angular:application": {
"e2eTestRunner": "cypress", "e2eTestRunner": "cypress",
"linter": "eslint", "linter": "eslint",
"unitTestRunner": "jest", "unitTestRunner": "jest",
}, },
"@nrwl/angular:library": Object { "@nrwl/angular:library": {
"linter": "tslint", "linter": "tslint",
}, },
}, },
"name": "foo", "name": "foo",
"projectType": "application", "projectType": "application",
"root": "apps/foo", "root": "apps/foo",
"targets": Object { "targets": {
"lint": Object { "lint": {
"executor": "@angular-devkit/build-angular:tslint", "executor": "@angular-devkit/build-angular:tslint",
"options": Object { "options": {
"exclude": Array [ "exclude": [
"**/node_modules/**", "**/node_modules/**",
"!apps/foo/**/*", "!apps/foo/**/*",
], ],
"tsConfig": Array [ "tsConfig": [
"apps/foo/tsconfig.app.json", "apps/foo/tsconfig.app.json",
], ],
}, },
@ -120,23 +120,23 @@ Object {
`; `;
exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 4`] = ` exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 4`] = `
Object { {
"dependencies": Object {}, "dependencies": {},
"devDependencies": Object {}, "devDependencies": {},
"name": "test-name", "name": "test-name",
} }
`; `;
exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 5`] = ` exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 5`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -150,10 +150,10 @@ Object {
`; `;
exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 6`] = ` exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 6`] = `
Object { {
"$schema": "../../node_modules/nx/schemas/project-schema.json", "$schema": "../../node_modules/nx/schemas/project-schema.json",
"generators": Object { "generators": {
"@nrwl/angular:application": Object { "@nrwl/angular:application": {
"e2eTestRunner": "cypress", "e2eTestRunner": "cypress",
"unitTestRunner": "jest", "unitTestRunner": "jest",
}, },
@ -161,15 +161,15 @@ Object {
"name": "foo", "name": "foo",
"projectType": "application", "projectType": "application",
"root": "apps/foo", "root": "apps/foo",
"targets": Object { "targets": {
"lint": Object { "lint": {
"executor": "@angular-devkit/build-angular:tslint", "executor": "@angular-devkit/build-angular:tslint",
"options": Object { "options": {
"exclude": Array [ "exclude": [
"**/node_modules/**", "**/node_modules/**",
"!apps/foo/**/*", "!apps/foo/**/*",
], ],
"tsConfig": Array [ "tsConfig": [
"apps/foo/tsconfig.app.json", "apps/foo/tsconfig.app.json",
], ],
}, },
@ -179,22 +179,22 @@ Object {
`; `;
exports[`ProjectConverter removeTSLintFromWorkspace() should remove the entry in generators for convert-tslint-to-eslint because it is no longer needed 1`] = ` exports[`ProjectConverter removeTSLintFromWorkspace() should remove the entry in generators for convert-tslint-to-eslint because it is no longer needed 1`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"generators": Object { "generators": {
"@nrwl/angular": Object { "@nrwl/angular": {
"convert-tslint-to-eslint": Object { "convert-tslint-to-eslint": {
"removeTSLintIfNoMoreTSLintTargets": true, "removeTSLintIfNoMoreTSLintTargets": true,
}, },
}, },
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -208,15 +208,15 @@ Object {
`; `;
exports[`ProjectConverter removeTSLintFromWorkspace() should remove the entry in generators for convert-tslint-to-eslint because it is no longer needed 2`] = ` exports[`ProjectConverter removeTSLintFromWorkspace() should remove the entry in generators for convert-tslint-to-eslint because it is no longer needed 2`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -230,25 +230,25 @@ Object {
`; `;
exports[`ProjectConverter setDefaults() should save in nx.json 1`] = ` exports[`ProjectConverter setDefaults() should save in nx.json 1`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"generators": Object { "generators": {
"@nrwl/angular": Object { "@nrwl/angular": {
"application": Object { "application": {
"linter": "tslint", "linter": "tslint",
}, },
"library": Object { "library": {
"linter": "tslint", "linter": "tslint",
}, },
}, },
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -262,29 +262,29 @@ Object {
`; `;
exports[`ProjectConverter setDefaults() should save in nx.json 2`] = ` exports[`ProjectConverter setDefaults() should save in nx.json 2`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"generators": Object { "generators": {
"@nrwl/angular": Object { "@nrwl/angular": {
"application": Object { "application": {
"linter": "tslint", "linter": "tslint",
}, },
"convert-tslint-to-eslint": Object { "convert-tslint-to-eslint": {
"ignoreExistingTslintConfig": true, "ignoreExistingTslintConfig": true,
"removeTSLintIfNoMoreTSLintTargets": true, "removeTSLintIfNoMoreTSLintTargets": true,
}, },
"library": Object { "library": {
"linter": "tslint", "linter": "tslint",
}, },
}, },
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -298,29 +298,29 @@ Object {
`; `;
exports[`ProjectConverter setDefaults() should save in nx.json 3`] = ` exports[`ProjectConverter setDefaults() should save in nx.json 3`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"generators": Object { "generators": {
"@nrwl/angular": Object { "@nrwl/angular": {
"application": Object { "application": {
"linter": "tslint", "linter": "tslint",
}, },
"convert-tslint-to-eslint": Object { "convert-tslint-to-eslint": {
"ignoreExistingTslintConfig": false, "ignoreExistingTslintConfig": false,
"removeTSLintIfNoMoreTSLintTargets": false, "removeTSLintIfNoMoreTSLintTargets": false,
}, },
"library": Object { "library": {
"linter": "tslint", "linter": "tslint",
}, },
}, },
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -334,17 +334,17 @@ Object {
`; `;
exports[`ProjectConverter should throw if --dry-run is set 1`] = ` exports[`ProjectConverter should throw if --dry-run is set 1`] = `
"NOTE: This generator does not support --dry-run. If you are running this in Nx Console, it should execute fine once you hit the \\"Run\\" button. "NOTE: This generator does not support --dry-run. If you are running this in Nx Console, it should execute fine once you hit the "Run" button.
" "
`; `;
exports[`ProjectConverter should throw if --dryRun is set 1`] = ` exports[`ProjectConverter should throw if --dryRun is set 1`] = `
"NOTE: This generator does not support --dry-run. If you are running this in Nx Console, it should execute fine once you hit the \\"Run\\" button. "NOTE: This generator does not support --dry-run. If you are running this in Nx Console, it should execute fine once you hit the "Run" button.
" "
`; `;
exports[`ProjectConverter should throw if -d is set 1`] = ` exports[`ProjectConverter should throw if -d is set 1`] = `
"NOTE: This generator does not support --dry-run. If you are running this in Nx Console, it should execute fine once you hit the \\"Run\\" button. "NOTE: This generator does not support --dry-run. If you are running this in Nx Console, it should execute fine once you hit the "Run" button.
" "
`; `;

View File

@ -1,9 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`convert-tslint-to-eslint should work for NestJS applications 1`] = ` exports[`convert-tslint-to-eslint should work for NestJS applications 1`] = `
Object { {
"dependencies": Object {}, "dependencies": {},
"devDependencies": Object { "devDependencies": {
"@nrwl/eslint-plugin-nx": "0.0.1", "@nrwl/eslint-plugin-nx": "0.0.1",
"@nrwl/linter": "0.0.1", "@nrwl/linter": "0.0.1",
"@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/eslint-plugin": "^5.58.0",
@ -17,20 +17,20 @@ Object {
`; `;
exports[`convert-tslint-to-eslint should work for NestJS applications 2`] = ` exports[`convert-tslint-to-eslint should work for NestJS applications 2`] = `
Object { {
"$schema": "../../node_modules/nx/schemas/project-schema.json", "$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "nest-app-1", "name": "nest-app-1",
"projectType": "application", "projectType": "application",
"root": "apps/nest-app-1", "root": "apps/nest-app-1",
"targets": Object { "targets": {
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/nest-app-1/**/*.ts", "apps/nest-app-1/**/*.ts",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
@ -39,35 +39,35 @@ Object {
`; `;
exports[`convert-tslint-to-eslint should work for NestJS applications 3`] = ` exports[`convert-tslint-to-eslint should work for NestJS applications 3`] = `
Object { {
"ignorePatterns": Array [ "ignorePatterns": [
"**/*", "**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object { "rules": {
"@nrwl/nx/enforce-module-boundaries": Array [ "@nrwl/nx/enforce-module-boundaries": [
"error", "error",
Object { {
"allow": Array [ "allow": [
"@nx-example/shared/product/data/testing", "@nx-example/shared/product/data/testing",
], ],
"depConstraints": Array [ "depConstraints": [
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:feature", "type:feature",
"type:ui", "type:ui",
], ],
"sourceTag": "type:app", "sourceTag": "type:app",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:ui", "type:ui",
"type:data", "type:data",
"type:types", "type:types",
@ -75,48 +75,48 @@ Object {
], ],
"sourceTag": "type:feature", "sourceTag": "type:feature",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:types", "type:types",
], ],
"sourceTag": "type:types", "sourceTag": "type:types",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:state", "type:state",
"type:types", "type:types",
"type:data", "type:data",
], ],
"sourceTag": "type:state", "sourceTag": "type:state",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:types", "type:types",
], ],
"sourceTag": "type:data", "sourceTag": "type:data",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:e2e-utils", "type:e2e-utils",
], ],
"sourceTag": "type:e2e", "sourceTag": "type:e2e",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:types", "type:types",
"type:ui", "type:ui",
], ],
"sourceTag": "type:ui", "sourceTag": "type:ui",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"scope:products", "scope:products",
"scope:shared", "scope:shared",
], ],
"sourceTag": "scope:products", "sourceTag": "scope:products",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"scope:cart", "scope:cart",
"scope:shared", "scope:shared",
], ],
@ -128,49 +128,49 @@ Object {
], ],
}, },
}, },
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/typescript", "plugin:@nrwl/nx/typescript",
], ],
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/javascript", "plugin:@nrwl/nx/javascript",
], ],
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
], ],
"plugins": Array [ "plugins": [
"eslint-plugin-import", "eslint-plugin-import",
"@typescript-eslint", "@typescript-eslint",
], ],
"root": true, "root": true,
"rules": Object { "rules": {
"@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off", "@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": Array [ "@typescript-eslint/explicit-member-accessibility": [
"off", "off",
Object { {
"accessibility": "explicit", "accessibility": "explicit",
}, },
], ],
"@typescript-eslint/member-ordering": "error", "@typescript-eslint/member-ordering": "error",
"@typescript-eslint/naming-convention": Array [ "@typescript-eslint/naming-convention": [
"error", "error",
Object { {
"format": Array [ "format": [
"camelCase", "camelCase",
"UPPER_CASE", "UPPER_CASE",
], ],
@ -181,17 +181,17 @@ Object {
], ],
"@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-inferrable-types": Array [ "@typescript-eslint/no-inferrable-types": [
"error", "error",
Object { {
"ignoreParameters": true, "ignoreParameters": true,
}, },
], ],
"@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-non-null-assertion": "error", "@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-shadow": Array [ "@typescript-eslint/no-shadow": [
"error", "error",
Object { {
"hoist": "all", "hoist": "all",
}, },
], ],
@ -201,7 +201,7 @@ Object {
"arrow-body-style": "error", "arrow-body-style": "error",
"constructor-super": "error", "constructor-super": "error",
"dot-notation": "off", "dot-notation": "off",
"eqeqeq": Array [ "eqeqeq": [
"error", "error",
"smart", "smart",
], ],
@ -211,9 +211,9 @@ Object {
"import/no-deprecated": "warn", "import/no-deprecated": "warn",
"no-bitwise": "error", "no-bitwise": "error",
"no-caller": "error", "no-caller": "error",
"no-console": Array [ "no-console": [
"error", "error",
Object {}, {},
], ],
"no-debugger": "error", "no-debugger": "error",
"no-empty": "off", "no-empty": "off",
@ -221,7 +221,7 @@ Object {
"no-eval": "error", "no-eval": "error",
"no-fallthrough": "error", "no-fallthrough": "error",
"no-new-wrappers": "error", "no-new-wrappers": "error",
"no-restricted-imports": Array [ "no-restricted-imports": [
"error", "error",
"rxjs/Rx", "rxjs/Rx",
], ],
@ -236,7 +236,7 @@ Object {
}, },
}, },
], ],
"plugins": Array [ "plugins": [
"@nrwl/nx", "@nrwl/nx",
], ],
"root": true, "root": true,
@ -244,51 +244,51 @@ Object {
`; `;
exports[`convert-tslint-to-eslint should work for NestJS applications 4`] = ` exports[`convert-tslint-to-eslint should work for NestJS applications 4`] = `
Object { {
"extends": Array [ "extends": [
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
"plugins": Array [ "plugins": [
"@typescript-eslint", "@typescript-eslint",
], ],
"rules": Object { "rules": {
"@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-empty-interface": "error",
}, },
} }
`; `;
exports[`convert-tslint-to-eslint should work for NestJS libraries 1`] = ` exports[`convert-tslint-to-eslint should work for NestJS libraries 1`] = `
Object { {
"dependencies": Object {}, "dependencies": {},
"devDependencies": Object { "devDependencies": {
"@nrwl/eslint-plugin-nx": "0.0.1", "@nrwl/eslint-plugin-nx": "0.0.1",
"@nrwl/linter": "0.0.1", "@nrwl/linter": "0.0.1",
"@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/eslint-plugin": "^5.58.0",
@ -302,20 +302,20 @@ Object {
`; `;
exports[`convert-tslint-to-eslint should work for NestJS libraries 2`] = ` exports[`convert-tslint-to-eslint should work for NestJS libraries 2`] = `
Object { {
"$schema": "../../node_modules/nx/schemas/project-schema.json", "$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "nest-lib-1", "name": "nest-lib-1",
"projectType": "library", "projectType": "library",
"root": "libs/nest-lib-1", "root": "libs/nest-lib-1",
"targets": Object { "targets": {
"lint": Object { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"libs/nest-lib-1/**/*.ts", "libs/nest-lib-1/**/*.ts",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
}, },
@ -324,35 +324,35 @@ Object {
`; `;
exports[`convert-tslint-to-eslint should work for NestJS libraries 3`] = ` exports[`convert-tslint-to-eslint should work for NestJS libraries 3`] = `
Object { {
"ignorePatterns": Array [ "ignorePatterns": [
"**/*", "**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object { "rules": {
"@nrwl/nx/enforce-module-boundaries": Array [ "@nrwl/nx/enforce-module-boundaries": [
"error", "error",
Object { {
"allow": Array [ "allow": [
"@nx-example/shared/product/data/testing", "@nx-example/shared/product/data/testing",
], ],
"depConstraints": Array [ "depConstraints": [
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:feature", "type:feature",
"type:ui", "type:ui",
], ],
"sourceTag": "type:app", "sourceTag": "type:app",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:ui", "type:ui",
"type:data", "type:data",
"type:types", "type:types",
@ -360,48 +360,48 @@ Object {
], ],
"sourceTag": "type:feature", "sourceTag": "type:feature",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:types", "type:types",
], ],
"sourceTag": "type:types", "sourceTag": "type:types",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:state", "type:state",
"type:types", "type:types",
"type:data", "type:data",
], ],
"sourceTag": "type:state", "sourceTag": "type:state",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:types", "type:types",
], ],
"sourceTag": "type:data", "sourceTag": "type:data",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:e2e-utils", "type:e2e-utils",
], ],
"sourceTag": "type:e2e", "sourceTag": "type:e2e",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"type:types", "type:types",
"type:ui", "type:ui",
], ],
"sourceTag": "type:ui", "sourceTag": "type:ui",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"scope:products", "scope:products",
"scope:shared", "scope:shared",
], ],
"sourceTag": "scope:products", "sourceTag": "scope:products",
}, },
Object { {
"onlyDependOnLibsWithTags": Array [ "onlyDependOnLibsWithTags": [
"scope:cart", "scope:cart",
"scope:shared", "scope:shared",
], ],
@ -413,49 +413,49 @@ Object {
], ],
}, },
}, },
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/typescript", "plugin:@nrwl/nx/typescript",
], ],
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/javascript", "plugin:@nrwl/nx/javascript",
], ],
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
], ],
"plugins": Array [ "plugins": [
"eslint-plugin-import", "eslint-plugin-import",
"@typescript-eslint", "@typescript-eslint",
], ],
"root": true, "root": true,
"rules": Object { "rules": {
"@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off", "@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": Array [ "@typescript-eslint/explicit-member-accessibility": [
"off", "off",
Object { {
"accessibility": "explicit", "accessibility": "explicit",
}, },
], ],
"@typescript-eslint/member-ordering": "error", "@typescript-eslint/member-ordering": "error",
"@typescript-eslint/naming-convention": Array [ "@typescript-eslint/naming-convention": [
"error", "error",
Object { {
"format": Array [ "format": [
"camelCase", "camelCase",
"UPPER_CASE", "UPPER_CASE",
], ],
@ -466,17 +466,17 @@ Object {
], ],
"@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-inferrable-types": Array [ "@typescript-eslint/no-inferrable-types": [
"error", "error",
Object { {
"ignoreParameters": true, "ignoreParameters": true,
}, },
], ],
"@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-non-null-assertion": "error", "@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-shadow": Array [ "@typescript-eslint/no-shadow": [
"error", "error",
Object { {
"hoist": "all", "hoist": "all",
}, },
], ],
@ -486,7 +486,7 @@ Object {
"arrow-body-style": "error", "arrow-body-style": "error",
"constructor-super": "error", "constructor-super": "error",
"dot-notation": "off", "dot-notation": "off",
"eqeqeq": Array [ "eqeqeq": [
"error", "error",
"smart", "smart",
], ],
@ -496,9 +496,9 @@ Object {
"import/no-deprecated": "warn", "import/no-deprecated": "warn",
"no-bitwise": "error", "no-bitwise": "error",
"no-caller": "error", "no-caller": "error",
"no-console": Array [ "no-console": [
"error", "error",
Object {}, {},
], ],
"no-debugger": "error", "no-debugger": "error",
"no-empty": "off", "no-empty": "off",
@ -506,7 +506,7 @@ Object {
"no-eval": "error", "no-eval": "error",
"no-fallthrough": "error", "no-fallthrough": "error",
"no-new-wrappers": "error", "no-new-wrappers": "error",
"no-restricted-imports": Array [ "no-restricted-imports": [
"error", "error",
"rxjs/Rx", "rxjs/Rx",
], ],
@ -521,7 +521,7 @@ Object {
}, },
}, },
], ],
"plugins": Array [ "plugins": [
"@nrwl/nx", "@nrwl/nx",
], ],
"root": true, "root": true,
@ -529,42 +529,42 @@ Object {
`; `;
exports[`convert-tslint-to-eslint should work for NestJS libraries 4`] = ` exports[`convert-tslint-to-eslint should work for NestJS libraries 4`] = `
Object { {
"extends": Array [ "extends": [
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
"plugins": Array [ "plugins": [
"@typescript-eslint", "@typescript-eslint",
], ],
"rules": Object { "rules": {
"@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-empty-interface": "error",
}, },
} }

View File

@ -6,7 +6,7 @@ export default {
displayName: 'my-lib', displayName: 'my-lib',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
transform: { transform: {
'^.+\\\\\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }], '^.+\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
}, },
moduleFileExtensions: ['ts', 'js', 'html'], moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/libs/my-lib', coverageDirectory: '../../coverage/libs/my-lib',
@ -21,7 +21,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
testEnvironment: 'node', testEnvironment: 'node',
transform: { transform: {
'^.+\\\\\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }], '^.+\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
}, },
moduleFileExtensions: ['ts', 'js', 'html'], moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/libs/my-lib', coverageDirectory: '../../coverage/libs/my-lib',
@ -30,15 +30,15 @@ export default {
`; `;
exports[`lib --unit-test-runner none should not generate test configuration 1`] = ` exports[`lib --unit-test-runner none should not generate test configuration 1`] = `
Object { {
"compilerOptions": Object { "compilerOptions": {
"module": "commonjs", "module": "commonjs",
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"files": Array [], "files": [],
"include": Array [], "include": [],
"references": Array [ "references": [
Object { {
"path": "./tsconfig.lib.json", "path": "./tsconfig.lib.json",
}, },
], ],
@ -46,32 +46,32 @@ Object {
`; `;
exports[`lib --unit-test-runner none should not generate test configuration 2`] = ` exports[`lib --unit-test-runner none should not generate test configuration 2`] = `
Object { {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"libs/my-lib/**/*.ts", "libs/my-lib/**/*.ts",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
} }
`; `;
exports[`lib nested should create a local tsconfig.json 1`] = ` exports[`lib nested should create a local tsconfig.json 1`] = `
Object { {
"compilerOptions": Object { "compilerOptions": {
"module": "commonjs", "module": "commonjs",
}, },
"extends": "../../../tsconfig.base.json", "extends": "../../../tsconfig.base.json",
"files": Array [], "files": [],
"include": Array [], "include": [],
"references": Array [ "references": [
Object { {
"path": "./tsconfig.lib.json", "path": "./tsconfig.lib.json",
}, },
Object { {
"path": "./tsconfig.spec.json", "path": "./tsconfig.spec.json",
}, },
], ],
@ -92,18 +92,18 @@ export class MyLibModule {}
`; `;
exports[`lib not nested should create a local tsconfig.json 1`] = ` exports[`lib not nested should create a local tsconfig.json 1`] = `
Object { {
"compilerOptions": Object { "compilerOptions": {
"module": "commonjs", "module": "commonjs",
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"files": Array [], "files": [],
"include": Array [], "include": [],
"references": Array [ "references": [
Object { {
"path": "./tsconfig.lib.json", "path": "./tsconfig.lib.json",
}, },
Object { {
"path": "./tsconfig.spec.json", "path": "./tsconfig.spec.json",
}, },
], ],
@ -111,36 +111,36 @@ Object {
`; `;
exports[`lib not nested should generate files 1`] = ` exports[`lib not nested should generate files 1`] = `
Object { {
"extends": Array [ "extends": [
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }

View File

@ -14,67 +14,67 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
} }
\`}</style> \`}</style>
<div className=\\"wrapper\\"> <div className="wrapper">
<div className=\\"container\\"> <div className="container">
<div id=\\"welcome\\"> <div id="welcome">
<h1> <h1>
<span> Hello there, </span> <span> Hello there, </span>
Welcome my-app 👋 Welcome my-app 👋
</h1> </h1>
</div> </div>
<div id=\\"hero\\" className=\\"rounded\\"> <div id="hero" className="rounded">
<div className=\\"text-container\\"> <div className="text-container">
<h2> <h2>
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z\\" d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z"
/> />
</svg> </svg>
<span>You&apos;re up and running</span> <span>You&apos;re up and running</span>
</h2> </h2>
<a href=\\"#commands\\"> What&apos;s next? </a> <a href="#commands"> What&apos;s next? </a>
</div> </div>
<div className=\\"logo-container\\"> <div className="logo-container">
<svg <svg
fill=\\"currentColor\\" fill="currentColor"
role=\\"img\\" role="img"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path d=\\"M11.987 14.138l-3.132 4.923-5.193-8.427-.012 8.822H0V4.544h3.691l5.247 8.833.005-3.998 3.044 4.759zm.601-5.761c.024-.048 0-3.784.008-3.833h-3.65c.002.059-.005 3.776-.003 3.833h3.645zm5.634 4.134a2.061 2.061 0 0 0-1.969 1.336 1.963 1.963 0 0 1 2.343-.739c.396.161.917.422 1.33.283a2.1 2.1 0 0 0-1.704-.88zm3.39 1.061c-.375-.13-.8-.277-1.109-.681-.06-.08-.116-.17-.176-.265a2.143 2.143 0 0 0-.533-.642c-.294-.216-.68-.322-1.18-.322a2.482 2.482 0 0 0-2.294 1.536 2.325 2.325 0 0 1 4.002.388.75.75 0 0 0 .836.334c.493-.105.46.36 1.203.518v-.133c-.003-.446-.246-.55-.75-.733zm2.024 1.266a.723.723 0 0 0 .347-.638c-.01-2.957-2.41-5.487-5.37-5.487a5.364 5.364 0 0 0-4.487 2.418c-.01-.026-1.522-2.39-1.538-2.418H8.943l3.463 5.423-3.379 5.32h3.54l1.54-2.366 1.568 2.366h3.541l-3.21-5.052a.7.7 0 0 1-.084-.32 2.69 2.69 0 0 1 2.69-2.691h.001c1.488 0 1.736.89 2.057 1.308.634.826 1.9.464 1.9 1.541a.707.707 0 0 0 1.066.596zm.35.133c-.173.372-.56.338-.755.639-.176.271.114.412.114.412s.337.156.538-.311c.104-.231.14-.488.103-.74z\\" /> <path d="M11.987 14.138l-3.132 4.923-5.193-8.427-.012 8.822H0V4.544h3.691l5.247 8.833.005-3.998 3.044 4.759zm.601-5.761c.024-.048 0-3.784.008-3.833h-3.65c.002.059-.005 3.776-.003 3.833h3.645zm5.634 4.134a2.061 2.061 0 0 0-1.969 1.336 1.963 1.963 0 0 1 2.343-.739c.396.161.917.422 1.33.283a2.1 2.1 0 0 0-1.704-.88zm3.39 1.061c-.375-.13-.8-.277-1.109-.681-.06-.08-.116-.17-.176-.265a2.143 2.143 0 0 0-.533-.642c-.294-.216-.68-.322-1.18-.322a2.482 2.482 0 0 0-2.294 1.536 2.325 2.325 0 0 1 4.002.388.75.75 0 0 0 .836.334c.493-.105.46.36 1.203.518v-.133c-.003-.446-.246-.55-.75-.733zm2.024 1.266a.723.723 0 0 0 .347-.638c-.01-2.957-2.41-5.487-5.37-5.487a5.364 5.364 0 0 0-4.487 2.418c-.01-.026-1.522-2.39-1.538-2.418H8.943l3.463 5.423-3.379 5.32h3.54l1.54-2.366 1.568 2.366h3.541l-3.21-5.052a.7.7 0 0 1-.084-.32 2.69 2.69 0 0 1 2.69-2.691h.001c1.488 0 1.736.89 2.057 1.308.634.826 1.9.464 1.9 1.541a.707.707 0 0 0 1.066.596zm.35.133c-.173.372-.56.338-.755.639-.176.271.114.412.114.412s.337.156.538-.311c.104-.231.14-.488.103-.74z" />
</svg> </svg>
</div> </div>
</div> </div>
<div id=\\"middle-content\\"> <div id="middle-content">
<div id=\\"learning-materials\\" className=\\"rounded shadow\\"> <div id="learning-materials" className="rounded shadow">
<h2>Learning materials</h2> <h2>Learning materials</h2>
<a <a
href=\\"https://nx.dev/getting-started/intro?utm_source=nx-project\\" href="https://nx.dev/getting-started/intro?utm_source=nx-project"
target=\\"_blank\\" target="_blank"
rel=\\"noreferrer\\" rel="noreferrer"
className=\\"list-item-link\\" className="list-item-link"
> >
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253\\" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"
/> />
</svg> </svg>
<span> <span>
@ -82,36 +82,36 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
<span> Everything is in there </span> <span> Everything is in there </span>
</span> </span>
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M9 5l7 7-7 7\\" d="M9 5l7 7-7 7"
/> />
</svg> </svg>
</a> </a>
<a <a
href=\\"https://blog.nrwl.io/?utm_source=nx-project\\" href="https://blog.nrwl.io/?utm_source=nx-project"
target=\\"_blank\\" target="_blank"
rel=\\"noreferrer\\" rel="noreferrer"
className=\\"list-item-link\\" className="list-item-link"
> >
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z\\" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"
/> />
</svg> </svg>
<span> <span>
@ -119,69 +119,69 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
<span> Changelog, features & events </span> <span> Changelog, features & events </span>
</span> </span>
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M9 5l7 7-7 7\\" d="M9 5l7 7-7 7"
/> />
</svg> </svg>
</a> </a>
<a <a
href=\\"https://www.youtube.com/@NxDevtools/videos?utm_source=nx-project&sub_confirmation=1\\" href="https://www.youtube.com/@NxDevtools/videos?utm_source=nx-project&sub_confirmation=1"
target=\\"_blank\\" target="_blank"
rel=\\"noreferrer\\" rel="noreferrer"
className=\\"list-item-link\\" className="list-item-link"
> >
<svg <svg
role=\\"img\\" role="img"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
fill=\\"currentColor\\" fill="currentColor"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<title>YouTube</title> <title>YouTube</title>
<path d=\\"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z\\" /> <path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" />
</svg> </svg>
<span> <span>
YouTube channel YouTube channel
<span> Nx Show, talks & tutorials </span> <span> Nx Show, talks & tutorials </span>
</span> </span>
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M9 5l7 7-7 7\\" d="M9 5l7 7-7 7"
/> />
</svg> </svg>
</a> </a>
<a <a
href=\\"https://nx.dev/react-tutorial/1-code-generation?utm_source=nx-project\\" href="https://nx.dev/react-tutorial/1-code-generation?utm_source=nx-project"
target=\\"_blank\\" target="_blank"
rel=\\"noreferrer\\" rel="noreferrer"
className=\\"list-item-link\\" className="list-item-link"
> >
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122\\" d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"
/> />
</svg> </svg>
<span> <span>
@ -189,38 +189,38 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
<span> Create an app, step-by-step </span> <span> Create an app, step-by-step </span>
</span> </span>
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M9 5l7 7-7 7\\" d="M9 5l7 7-7 7"
/> />
</svg> </svg>
</a> </a>
<a <a
href=\\"https://nxplaybook.com/?utm_source=nx-project\\" href="https://nxplaybook.com/?utm_source=nx-project"
target=\\"_blank\\" target="_blank"
rel=\\"noreferrer\\" rel="noreferrer"
className=\\"list-item-link\\" className="list-item-link"
> >
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path d=\\"M12 14l9-5-9-5-9 5 9 5z\\" /> <path d="M12 14l9-5-9-5-9 5 9 5z" />
<path d=\\"M12 14l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14z\\" /> <path d="M12 14l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14z" />
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M12 14l9-5-9-5-9 5 9 5zm0 0l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14zm-4 6v-7.5l4-2.222\\" d="M12 14l9-5-9-5-9 5 9 5zm0 0l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14zm-4 6v-7.5l4-2.222"
/> />
</svg> </svg>
<span> <span>
@ -228,59 +228,59 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
<span> Nx custom courses </span> <span> Nx custom courses </span>
</span> </span>
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M9 5l7 7-7 7\\" d="M9 5l7 7-7 7"
/> />
</svg> </svg>
</a> </a>
</div> </div>
<div id=\\"other-links\\"> <div id="other-links">
<a <a
id=\\"nx-console\\" id="nx-console"
className=\\"button-pill rounded shadow\\" className="button-pill rounded shadow"
href=\\"https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console&utm_source=nx-project\\" href="https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console&utm_source=nx-project"
target=\\"_blank\\" target="_blank"
rel=\\"noreferrer\\" rel="noreferrer"
> >
<svg <svg
fill=\\"currentColor\\" fill="currentColor"
role=\\"img\\" role="img"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<title>Visual Studio Code</title> <title>Visual Studio Code</title>
<path d=\\"M23.15 2.587L18.21.21a1.494 1.494 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a.999.999 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a.999.999 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.492 1.492 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352zm-5.146 14.861L10.826 12l7.178-5.448v10.896z\\" /> <path d="M23.15 2.587L18.21.21a1.494 1.494 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a.999.999 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a.999.999 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.492 1.492 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352zm-5.146 14.861L10.826 12l7.178-5.448v10.896z" />
</svg> </svg>
<span> <span>
Install Nx Console Install Nx Console
<span>Plugin for VSCode</span> <span>Plugin for VSCode</span>
</span> </span>
</a> </a>
<div id=\\"nx-cloud\\" className=\\"rounded shadow\\"> <div id="nx-cloud" className="rounded shadow">
<div> <div>
<svg <svg
id=\\"nx-cloud-logo\\" id="nx-cloud-logo"
role=\\"img\\" role="img"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
stroke=\\"currentColor\\" stroke="currentColor"
fill=\\"transparent\\" fill="transparent"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
> >
<path <path
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M23 3.75V6.5c-3.036 0-5.5 2.464-5.5 5.5s-2.464 5.5-5.5 5.5-5.5 2.464-5.5 5.5H3.75C2.232 23 1 21.768 1 20.25V3.75C1 2.232 2.232 1 3.75 1h16.5C21.768 1 23 2.232 23 3.75Z\\" d="M23 3.75V6.5c-3.036 0-5.5 2.464-5.5 5.5s-2.464 5.5-5.5 5.5-5.5 2.464-5.5 5.5H3.75C2.232 23 1 21.768 1 20.25V3.75C1 2.232 2.232 1 3.75 1h16.5C21.768 1 23 2.232 23 3.75Z"
/> />
<path <path
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M23 6v14.1667C23 21.7307 21.7307 23 20.1667 23H6c0-3.128 2.53867-5.6667 5.6667-5.6667 3.128 0 5.6666-2.5386 5.6666-5.6666C17.3333 8.53867 19.872 6 23 6Z\\" d="M23 6v14.1667C23 21.7307 21.7307 23 20.1667 23H6c0-3.128 2.53867-5.6667 5.6667-5.6667 3.128 0 5.6666-2.5386 5.6666-5.6666C17.3333 8.53867 19.872 6 23 6Z"
/> />
</svg> </svg>
<h2> <h2>
@ -294,28 +294,28 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
</p> </p>
<pre>nx connect-to-nx-cloud</pre> <pre>nx connect-to-nx-cloud</pre>
<a <a
href=\\"https://nx.app/?utm_source=nx-project\\" href="https://nx.app/?utm_source=nx-project"
target=\\"_blank\\" target="_blank"
rel=\\"noreferrer\\" rel="noreferrer"
> >
{' '} {' '}
What is Nx Cloud?{' '} What is Nx Cloud?{' '}
</a> </a>
</div> </div>
<a <a
id=\\"nx-repo\\" id="nx-repo"
className=\\"button-pill rounded shadow\\" className="button-pill rounded shadow"
href=\\"https://github.com/nrwl/nx?utm_source=nx-project\\" href="https://github.com/nrwl/nx?utm_source=nx-project"
target=\\"_blank\\" target="_blank"
rel=\\"noreferrer\\" rel="noreferrer"
> >
<svg <svg
fill=\\"currentColor\\" fill="currentColor"
role=\\"img\\" role="img"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path d=\\"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\\" /> <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />
</svg> </svg>
<span> <span>
Nx is open source Nx is open source
@ -325,22 +325,22 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
</div> </div>
</div> </div>
<div id=\\"commands\\" className=\\"rounded shadow\\"> <div id="commands" className="rounded shadow">
<h2>Next steps</h2> <h2>Next steps</h2>
<p>Here are some things you can do with Nx:</p> <p>Here are some things you can do with Nx:</p>
<details> <details>
<summary> <summary>
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z\\" d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
/> />
</svg> </svg>
Add UI library Add UI library
@ -355,16 +355,16 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
<details> <details>
<summary> <summary>
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z\\" d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
/> />
</svg> </svg>
View interactive project graph View interactive project graph
@ -374,16 +374,16 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
<details> <details>
<summary> <summary>
<svg <svg
fill=\\"none\\" fill="none"
stroke=\\"currentColor\\" stroke="currentColor"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z\\" d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
/> />
</svg> </svg>
Run affected commands Run affected commands
@ -399,19 +399,19 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
</details> </details>
</div> </div>
<p id=\\"love\\"> <p id="love">
Carefully crafted with Carefully crafted with
<svg <svg
fill=\\"currentColor\\" fill="currentColor"
stroke=\\"none\\" stroke="none"
viewBox=\\"0 0 24 24\\" viewBox="0 0 24 24"
xmlns=\\"http://www.w3.org/2000/svg\\" xmlns="http://www.w3.org/2000/svg"
> >
<path <path
strokeLinecap=\\"round\\" strokeLinecap="round"
strokeLinejoin=\\"round\\" strokeLinejoin="round"
strokeWidth=\\"2\\" strokeWidth="2"
d=\\"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z\\" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"
/> />
</svg> </svg>
</p> </p>

View File

@ -334,51 +334,51 @@ describe('app', () => {
const eslintJson = readJson(tree, '/apps/my-app/.eslintrc.json'); const eslintJson = readJson(tree, '/apps/my-app/.eslintrc.json');
expect(eslintJson).toMatchInlineSnapshot(` expect(eslintJson).toMatchInlineSnapshot(`
Object { {
"env": Object { "env": {
"jest": true, "jest": true,
}, },
"extends": Array [ "extends": [
"plugin:@nrwl/nx/react-typescript", "plugin:@nrwl/nx/react-typescript",
"next", "next",
"next/core-web-vitals", "next/core-web-vitals",
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
".next/**/*", ".next/**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object { "rules": {
"@next/next/no-html-link-for-pages": Array [ "@next/next/no-html-link-for-pages": [
"error", "error",
"apps/my-app/pages", "apps/my-app/pages",
], ],
}, },
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
"rules": Object { "rules": {
"@next/next/no-html-link-for-pages": "off", "@next/next/no-html-link-for-pages": "off",
}, },
} }

View File

@ -116,18 +116,18 @@ describe('app', () => {
const tsconfig = readJson(tree, 'my-node-app/tsconfig.json'); const tsconfig = readJson(tree, 'my-node-app/tsconfig.json');
expect(tsconfig).toMatchInlineSnapshot(` expect(tsconfig).toMatchInlineSnapshot(`
Object { {
"compilerOptions": Object { "compilerOptions": {
"esModuleInterop": true, "esModuleInterop": true,
}, },
"extends": "../tsconfig.base.json", "extends": "../tsconfig.base.json",
"files": Array [], "files": [],
"include": Array [], "include": [],
"references": Array [ "references": [
Object { {
"path": "./tsconfig.app.json", "path": "./tsconfig.app.json",
}, },
Object { {
"path": "./tsconfig.spec.json", "path": "./tsconfig.spec.json",
}, },
], ],
@ -144,36 +144,36 @@ describe('app', () => {
]); ]);
const eslintrc = readJson(tree, 'my-node-app/.eslintrc.json'); const eslintrc = readJson(tree, 'my-node-app/.eslintrc.json');
expect(eslintrc).toMatchInlineSnapshot(` expect(eslintrc).toMatchInlineSnapshot(`
Object { {
"extends": Array [ "extends": [
"../.eslintrc.json", "../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }
@ -292,14 +292,14 @@ describe('app', () => {
const project = readProjectConfiguration(tree, 'my-node-app'); const project = readProjectConfiguration(tree, 'my-node-app');
expect(project.targets.test).toBeUndefined(); expect(project.targets.test).toBeUndefined();
expect(project.targets.lint).toMatchInlineSnapshot(` expect(project.targets.lint).toMatchInlineSnapshot(`
Object { {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"my-node-app/**/*.ts", "my-node-app/**/*.ts",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
} }
@ -374,7 +374,7 @@ describe('app', () => {
preset: '../jest.preset.js', preset: '../jest.preset.js',
testEnvironment: 'node', testEnvironment: 'node',
transform: { transform: {
'^.+\\\\\\\\.[tj]s$': 'babel-jest', '^.+\\\\.[tj]s$': 'babel-jest',
}, },
moduleFileExtensions: ['ts', 'js', 'html'], moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../coverage/my-node-app', coverageDirectory: '../coverage/my-node-app',

View File

@ -93,18 +93,18 @@ describe('lib', () => {
await libraryGenerator(tree, baseLibraryConfig); await libraryGenerator(tree, baseLibraryConfig);
const tsconfigJson = readJson(tree, 'libs/my-lib/tsconfig.json'); const tsconfigJson = readJson(tree, 'libs/my-lib/tsconfig.json');
expect(tsconfigJson).toMatchInlineSnapshot(` expect(tsconfigJson).toMatchInlineSnapshot(`
Object { {
"compilerOptions": Object { "compilerOptions": {
"module": "commonjs", "module": "commonjs",
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"files": Array [], "files": [],
"include": Array [], "include": [],
"references": Array [ "references": [
Object { {
"path": "./tsconfig.lib.json", "path": "./tsconfig.lib.json",
}, },
Object { {
"path": "./tsconfig.spec.json", "path": "./tsconfig.spec.json",
}, },
], ],
@ -142,36 +142,36 @@ describe('lib', () => {
const eslintrc = readJson(tree, 'libs/my-lib/.eslintrc.json'); const eslintrc = readJson(tree, 'libs/my-lib/.eslintrc.json');
expect(eslintrc).toMatchInlineSnapshot(` expect(eslintrc).toMatchInlineSnapshot(`
Object { {
"extends": Array [ "extends": [
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }
@ -360,10 +360,10 @@ describe('lib', () => {
expect(projectConfiguration.root).toEqual('libs/my-lib'); expect(projectConfiguration.root).toEqual('libs/my-lib');
expect(projectConfiguration.targets.build).toMatchInlineSnapshot(` expect(projectConfiguration.targets.build).toMatchInlineSnapshot(`
Object { {
"executor": "@nrwl/js:tsc", "executor": "@nrwl/js:tsc",
"options": Object { "options": {
"assets": Array [ "assets": [
"libs/my-lib/*.md", "libs/my-lib/*.md",
], ],
"main": "libs/my-lib/src/index.ts", "main": "libs/my-lib/src/index.ts",
@ -371,7 +371,7 @@ describe('lib', () => {
"packageJson": "libs/my-lib/package.json", "packageJson": "libs/my-lib/package.json",
"tsConfig": "libs/my-lib/tsconfig.lib.json", "tsConfig": "libs/my-lib/tsconfig.lib.json",
}, },
"outputs": Array [ "outputs": [
"{options.outputPath}", "{options.outputPath}",
], ],
} }
@ -463,7 +463,7 @@ describe('lib', () => {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
testEnvironment: 'node', testEnvironment: 'node',
transform: { transform: {
'^.+\\\\\\\\.[tj]s$': 'babel-jest', '^.+\\\\.[tj]s$': 'babel-jest',
}, },
moduleFileExtensions: ['ts', 'js', 'html'], moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/libs/my-lib', coverageDirectory: '../../coverage/libs/my-lib',

View File

@ -17,7 +17,7 @@ module.exports = {
* It's recommend you update to the latest format. * It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property * You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag. * and running tests with --update-snapshot flag.
* Example: \\"nx affected --targets=test --update-snapshot\\" * Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/ */
snapshotFormat: { escapeString: true, printBasicPrototype: true }, snapshotFormat: { escapeString: true, printBasicPrototype: true },
@ -32,7 +32,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: {}, globals: {},
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -47,7 +47,7 @@ export default {
* It's recommend you update to the latest format. * It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property * You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag. * and running tests with --update-snapshot flag.
* Example: From within the project directory, run \\"nx test --update-snapshot\\" * Example: From within the project directory, run "nx test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/ */
snapshotFormat: { escapeString: true, printBasicPrototype: true }, snapshotFormat: { escapeString: true, printBasicPrototype: true },
@ -58,7 +58,7 @@ export default {
exports[`Nx Plugin Migration - jest 29 update configs should add snapshot config with no root preset 2`] = ` exports[`Nx Plugin Migration - jest 29 update configs should add snapshot config with no root preset 2`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -80,7 +80,7 @@ exports[`Nx Plugin Migration - jest 29 update configs should add snapshot config
* It's recommend you update to the latest format. * It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property * You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag. * and running tests with --update-snapshot flag.
* Example: From within the project directory, run \\"nx test --update-snapshot\\" * Example: From within the project directory, run "nx test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/ */
snapshotFormat: { escapeString: true, printBasicPrototype: true }, snapshotFormat: { escapeString: true, printBasicPrototype: true },
@ -95,7 +95,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: {}, globals: {},
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -111,7 +111,7 @@ export default {
exports[`Nx Plugin Migration - jest 29 update configs should be idempotent 2`] = ` exports[`Nx Plugin Migration - jest 29 update configs should be idempotent 2`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -189,7 +189,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: {}, globals: {},
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -205,7 +205,7 @@ export default {
exports[`Nx Plugin Migration - jest 29 update configs should update jest.config.ts 2`] = ` exports[`Nx Plugin Migration - jest 29 update configs should update jest.config.ts 2`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -236,7 +236,7 @@ module.exports = {
* It's recommend you update to the latest format. * It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property * You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag. * and running tests with --update-snapshot flag.
* Example: \\"nx affected --targets=test --update-snapshot\\" * Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/ */
snapshotFormat: { escapeString: true, printBasicPrototype: true }, snapshotFormat: { escapeString: true, printBasicPrototype: true },
@ -251,7 +251,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: {}, globals: {},
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -267,7 +267,7 @@ export default {
exports[`Nx Plugin Migration - jest 29 update configs should update root preset 3`] = ` exports[`Nx Plugin Migration - jest 29 update configs should update root preset 3`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -310,7 +310,7 @@ module.exports = {
* It's recommend you update to the latest format. * It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property * You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag. * and running tests with --update-snapshot flag.
* Example: \\"nx affected --targets=test --update-snapshot\\" * Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/ */
snapshotFormat: { escapeString: true, printBasicPrototype: true }, snapshotFormat: { escapeString: true, printBasicPrototype: true },
@ -321,7 +321,7 @@ module.exports = {
exports[`Nx Plugin Migration - jest 29 update configs should work if not using ts-jest transformer 1`] = ` exports[`Nx Plugin Migration - jest 29 update configs should work if not using ts-jest transformer 1`] = `
"export default { "export default {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest', '^.+\\\\.[tj]sx?$': 'babel-jest',
}, },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
displayName: 'jest', displayName: 'jest',
@ -333,7 +333,7 @@ exports[`Nx Plugin Migration - jest 29 update configs should work if not using t
exports[`Nx Plugin Migration - jest 29 update configs should work if not using ts-jest transformer 2`] = ` exports[`Nx Plugin Migration - jest 29 update configs should work if not using ts-jest transformer 2`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest', '^.+\\\\.[tj]sx?$': 'babel-jest',
}, },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
displayName: 'jest', displayName: 'jest',
@ -345,7 +345,7 @@ exports[`Nx Plugin Migration - jest 29 update configs should work if not using t
exports[`Nx Plugin Migration - jest 29 update configs should work snapshotFormat is defined 1`] = ` exports[`Nx Plugin Migration - jest 29 update configs should work snapshotFormat is defined 1`] = `
"export default { "export default {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest', '^.+\\\\.[tj]sx?$': 'babel-jest',
}, },
globals: { something: 'else', globals: { something: 'else',
abc: [1234, true, {abc: 'yes'}] }, abc: [1234, true, {abc: 'yes'}] },
@ -360,7 +360,7 @@ abc: [1234, true, {abc: 'yes'}] },
exports[`Nx Plugin Migration - jest 29 update configs should work snapshotFormat is defined 2`] = ` exports[`Nx Plugin Migration - jest 29 update configs should work snapshotFormat is defined 2`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': ['ts-jest', { '^.+\\\\.[tj]sx?$': ['ts-jest', {
tsconfig: '<rootDir>/tsconfig.spec.json' tsconfig: '<rootDir>/tsconfig.spec.json'
}], }],
}, },
@ -380,7 +380,7 @@ exports[`Nx Plugin Migration - jest 29 update configs should work with jest-pres
transform: { transform: {
'^.+.(ts|mjs|js|html)$': ['jest-preset-angular', { '^.+.(ts|mjs|js|html)$': ['jest-preset-angular', {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\\\.(html|svg)$', stringifyContentPathRegex: '\\.(html|svg)$',
}], }],
}, },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
@ -396,7 +396,7 @@ exports[`Nx Plugin Migration - jest 29 update configs should work with jest-pres
transform: { transform: {
'^.+.(ts|mjs|js|html)$': ['jest-preset-angular', { '^.+.(ts|mjs|js|html)$': ['jest-preset-angular', {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\\\.(html|svg)$', stringifyContentPathRegex: '\\.(html|svg)$',
}], }],
}, },
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'] moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
@ -413,7 +413,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: {}, globals: {},
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -429,7 +429,7 @@ export default {
exports[`Nx Plugin Migration - jest 29 update configs should work with multiple projects + configs 2`] = ` exports[`Nx Plugin Migration - jest 29 update configs should work with multiple projects + configs 2`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -456,7 +456,7 @@ export default {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: {}, globals: {},
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
@ -472,7 +472,7 @@ export default {
exports[`Nx Plugin Migration - jest 29 update configs should work with multiple projects + configs 4`] = ` exports[`Nx Plugin Migration - jest 29 update configs should work with multiple projects + configs 4`] = `
"module.exports = { "module.exports = {
transform: { transform: {
'^.+\\\\\\\\.[tj]sx?$': [ '^.+\\\\.[tj]sx?$': [
'ts-jest', 'ts-jest',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',

View File

@ -34,12 +34,12 @@ describe('project configuration', () => {
addProjectConfiguration(tree, 'test', projectConfiguration); addProjectConfiguration(tree, 'test', projectConfiguration);
expect(readProjectConfiguration(tree, 'test')).toMatchInlineSnapshot(` expect(readProjectConfiguration(tree, 'test')).toMatchInlineSnapshot(`
Object { {
"$schema": "../../node_modules/nx/schemas/project-schema.json", "$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "test", "name": "test",
"root": "libs/test", "root": "libs/test",
"sourceRoot": "libs/test/src", "sourceRoot": "libs/test/src",
"targets": Object {}, "targets": {},
} }
`); `);
expect(tree.exists('libs/test/project.json')).toBeTruthy(); expect(tree.exists('libs/test/project.json')).toBeTruthy();

View File

@ -43,23 +43,23 @@ describe('15.0.0 migration (migrate-to-inputs)', () => {
expect(updated.implicitDependencies).toBeUndefined(); expect(updated.implicitDependencies).toBeUndefined();
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
], ],
"sharedGlobals": Array [], "sharedGlobals": [],
}, },
"targetDefaults": Object { "targetDefaults": {
"build": Object { "build": {
"dependsOn": Array [ "dependsOn": [
"^build", "^build",
], ],
"inputs": Array [ "inputs": [
"production", "production",
"^production", "^production",
], ],
@ -95,20 +95,20 @@ describe('15.0.0 migration (migrate-to-inputs)', () => {
expect(updated.implicitDependencies).toBeUndefined(); expect(updated.implicitDependencies).toBeUndefined();
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
], ],
"sharedGlobals": Array [], "sharedGlobals": [],
}, },
"targetDefaults": Object { "targetDefaults": {
"prepare": Object { "prepare": {
"dependsOn": Array [ "dependsOn": [
"^prepare", "^prepare",
], ],
}, },
@ -307,20 +307,20 @@ describe('15.0.0 migration (migrate-to-inputs)', () => {
expect(updated.implicitDependencies).toBeUndefined(); expect(updated.implicitDependencies).toBeUndefined();
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
"!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s", "!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/.eslintrc.json", "!{projectRoot}/.eslintrc.json",
], ],
"sharedGlobals": Array [ "sharedGlobals": [
"{workspaceRoot}/nx.json", "{workspaceRoot}/nx.json",
], ],
}, },
@ -350,20 +350,20 @@ describe('15.0.0 migration (migrate-to-inputs)', () => {
expect(updated.implicitDependencies).toBeUndefined(); expect(updated.implicitDependencies).toBeUndefined();
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
"!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s", "!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/.eslintrc.json", "!{projectRoot}/.eslintrc.json",
], ],
"sharedGlobals": Array [ "sharedGlobals": [
"{workspaceRoot}/nx.json", "{workspaceRoot}/nx.json",
], ],
}, },
@ -392,15 +392,15 @@ describe('15.0.0 migration (migrate-to-inputs)', () => {
expect(updated.implicitDependencies).toBeUndefined(); expect(updated.implicitDependencies).toBeUndefined();
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"production": Array [ "production": [
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
"!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s", "!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/.eslintrc.json", "!{projectRoot}/.eslintrc.json",
], ],
"sharedGlobals": Array [ "sharedGlobals": [
"{workspaceRoot}/nx.json", "{workspaceRoot}/nx.json",
], ],
}, },

View File

@ -70,9 +70,9 @@ describe('15.0.0 migration (prefix-outputs)', () => {
const updated = readNxJson(tree); const updated = readNxJson(tree);
expect(updated.targetDefaults).toMatchInlineSnapshot(` expect(updated.targetDefaults).toMatchInlineSnapshot(`
Object { {
"build": Object { "build": {
"outputs": Array [ "outputs": [
"{workspaceRoot}/dist", "{workspaceRoot}/dist",
"{projectRoot}/build", "{projectRoot}/build",
"{options.outputPath}", "{options.outputPath}",

View File

@ -96,8 +96,8 @@ describe('NPM lock file utility', () => {
expect(Object.keys(graph.externalNodes).length).toEqual(212); // 202 expect(Object.keys(graph.externalNodes).length).toEqual(212); // 202
expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "hash": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"packageName": "minimatch", "packageName": "minimatch",
"version": "3.1.2", "version": "3.1.2",
@ -107,8 +107,8 @@ describe('NPM lock file utility', () => {
} }
`); `);
expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", "hash": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
"packageName": "minimatch", "packageName": "minimatch",
"version": "5.1.1", "version": "5.1.1",
@ -118,8 +118,8 @@ describe('NPM lock file utility', () => {
} }
`); `);
expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-M7i4XVjrrReHG+IjWEeDSfBnyNg2Q5OQpxrr3dqCGpleYx0FyUpMQZfk8zb6yyPrn6ut3KbrkYfnAf+TG6DPLQ==", "hash": "sha512-M7i4XVjrrReHG+IjWEeDSfBnyNg2Q5OQpxrr3dqCGpleYx0FyUpMQZfk8zb6yyPrn6ut3KbrkYfnAf+TG6DPLQ==",
"packageName": "postgres", "packageName": "postgres",
"version": "git+ssh://git@github.com/charsleysa/postgres.git#3b1a01b2da3e2fafb1a79006f838eff11a8de3cb", "version": "git+ssh://git@github.com/charsleysa/postgres.git#3b1a01b2da3e2fafb1a79006f838eff11a8de3cb",
@ -130,8 +130,8 @@ describe('NPM lock file utility', () => {
`); `);
expect(graph.externalNodes['npm:eslint-plugin-disable-autofix']) expect(graph.externalNodes['npm:eslint-plugin-disable-autofix'])
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-zYDdpaj+1Al8Ki3WpY2I9bOAd8NSgFWGT7yR6KemSi25qWwDMNArnR2q6gDEDKSw+KuYY4shFxkY/JpoNF64tg==", "hash": "sha512-zYDdpaj+1Al8Ki3WpY2I9bOAd8NSgFWGT7yR6KemSi25qWwDMNArnR2q6gDEDKSw+KuYY4shFxkY/JpoNF64tg==",
"packageName": "eslint-plugin-disable-autofix", "packageName": "eslint-plugin-disable-autofix",
"version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0", "version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0",
@ -154,8 +154,8 @@ describe('NPM lock file utility', () => {
expect(Object.keys(graph.externalNodes).length).toEqual(212); expect(Object.keys(graph.externalNodes).length).toEqual(212);
expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "hash": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"packageName": "minimatch", "packageName": "minimatch",
"version": "3.1.2", "version": "3.1.2",
@ -165,8 +165,8 @@ describe('NPM lock file utility', () => {
} }
`); `);
expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", "hash": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
"packageName": "minimatch", "packageName": "minimatch",
"version": "5.1.1", "version": "5.1.1",
@ -176,8 +176,8 @@ describe('NPM lock file utility', () => {
} }
`); `);
expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-M7i4XVjrrReHG+IjWEeDSfBnyNg2Q5OQpxrr3dqCGpleYx0FyUpMQZfk8zb6yyPrn6ut3KbrkYfnAf+TG6DPLQ==", "hash": "sha512-M7i4XVjrrReHG+IjWEeDSfBnyNg2Q5OQpxrr3dqCGpleYx0FyUpMQZfk8zb6yyPrn6ut3KbrkYfnAf+TG6DPLQ==",
"packageName": "postgres", "packageName": "postgres",
"version": "git+ssh://git@github.com/charsleysa/postgres.git#3b1a01b2da3e2fafb1a79006f838eff11a8de3cb", "version": "git+ssh://git@github.com/charsleysa/postgres.git#3b1a01b2da3e2fafb1a79006f838eff11a8de3cb",
@ -188,8 +188,8 @@ describe('NPM lock file utility', () => {
`); `);
expect(graph.externalNodes['npm:eslint-plugin-disable-autofix']) expect(graph.externalNodes['npm:eslint-plugin-disable-autofix'])
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-zYDdpaj+1Al8Ki3WpY2I9bOAd8NSgFWGT7yR6KemSi25qWwDMNArnR2q6gDEDKSw+KuYY4shFxkY/JpoNF64tg==", "hash": "sha512-zYDdpaj+1Al8Ki3WpY2I9bOAd8NSgFWGT7yR6KemSi25qWwDMNArnR2q6gDEDKSw+KuYY4shFxkY/JpoNF64tg==",
"packageName": "eslint-plugin-disable-autofix", "packageName": "eslint-plugin-disable-autofix",
"version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0", "version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0",

View File

@ -230,8 +230,8 @@ describe('pnpm LockFile utility', () => {
expect(Object.keys(graph.externalNodes).length).toEqual(213); expect(Object.keys(graph.externalNodes).length).toEqual(213);
expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "hash": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"packageName": "minimatch", "packageName": "minimatch",
"version": "3.1.2", "version": "3.1.2",
@ -241,8 +241,8 @@ describe('pnpm LockFile utility', () => {
} }
`); `);
expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", "hash": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
"packageName": "minimatch", "packageName": "minimatch",
"version": "5.1.1", "version": "5.1.1",
@ -252,8 +252,8 @@ describe('pnpm LockFile utility', () => {
} }
`); `);
expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "e33995295353137d0e2a79cad3efec01f9bae57a41f44a882c3eb57212cad3d3", "hash": "e33995295353137d0e2a79cad3efec01f9bae57a41f44a882c3eb57212cad3d3",
"packageName": "postgres", "packageName": "postgres",
"version": "github.com/charsleysa/postgres/3b1a01b2da3e2fafb1a79006f838eff11a8de3cb", "version": "github.com/charsleysa/postgres/3b1a01b2da3e2fafb1a79006f838eff11a8de3cb",
@ -264,8 +264,8 @@ describe('pnpm LockFile utility', () => {
`); `);
expect(graph.externalNodes['npm:eslint-plugin-disable-autofix']) expect(graph.externalNodes['npm:eslint-plugin-disable-autofix'])
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-zYDdpaj+1Al8Ki3WpY2I9bOAd8NSgFWGT7yR6KemSi25qWwDMNArnR2q6gDEDKSw+KuYY4shFxkY/JpoNF64tg==", "hash": "sha512-zYDdpaj+1Al8Ki3WpY2I9bOAd8NSgFWGT7yR6KemSi25qWwDMNArnR2q6gDEDKSw+KuYY4shFxkY/JpoNF64tg==",
"packageName": "eslint-plugin-disable-autofix", "packageName": "eslint-plugin-disable-autofix",
"version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0", "version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0",

View File

@ -234,8 +234,8 @@ describe('yarn LockFile utility', () => {
expect(Object.keys(graph.externalNodes).length).toEqual(127); expect(Object.keys(graph.externalNodes).length).toEqual(127);
expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "hash": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"packageName": "minimatch", "packageName": "minimatch",
"version": "3.1.2", "version": "3.1.2",
@ -245,8 +245,8 @@ describe('yarn LockFile utility', () => {
} }
`); `);
expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", "hash": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
"packageName": "minimatch", "packageName": "minimatch",
"version": "5.1.1", "version": "5.1.1",
@ -256,8 +256,8 @@ describe('yarn LockFile utility', () => {
} }
`); `);
expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "89b0967274cbe05ffc81fee9ce2f0e58aac96f15cf97e916258044ed9a2e6f61", "hash": "89b0967274cbe05ffc81fee9ce2f0e58aac96f15cf97e916258044ed9a2e6f61",
"packageName": "postgres", "packageName": "postgres",
"version": "https://codeload.github.com/charsleysa/postgres/tar.gz/3b1a01b2da3e2fafb1a79006f838eff11a8de3cb", "version": "https://codeload.github.com/charsleysa/postgres/tar.gz/3b1a01b2da3e2fafb1a79006f838eff11a8de3cb",
@ -268,8 +268,8 @@ describe('yarn LockFile utility', () => {
`); `);
expect(graph.externalNodes['npm:eslint-plugin-disable-autofix']) expect(graph.externalNodes['npm:eslint-plugin-disable-autofix'])
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-zYDdpaj+1Al8Ki3WpY2I9bOAd8NSgFWGT7yR6KemSi25qWwDMNArnR2q6gDEDKSw+KuYY4shFxkY/JpoNF64tg==", "hash": "sha512-zYDdpaj+1Al8Ki3WpY2I9bOAd8NSgFWGT7yR6KemSi25qWwDMNArnR2q6gDEDKSw+KuYY4shFxkY/JpoNF64tg==",
"packageName": "eslint-plugin-disable-autofix", "packageName": "eslint-plugin-disable-autofix",
"version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0", "version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0",
@ -372,8 +372,8 @@ describe('yarn LockFile utility', () => {
expect(Object.keys(graph.externalNodes).length).toEqual(129); expect(Object.keys(graph.externalNodes).length).toEqual(129);
expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "c154e566406683e7bcb746e000b84d74465b3a832c45d59912b9b55cd50dee66e5c4b1e5566dba26154040e51672f9aa450a9aef0c97cfc7336b78b7afb9540a", "hash": "c154e566406683e7bcb746e000b84d74465b3a832c45d59912b9b55cd50dee66e5c4b1e5566dba26154040e51672f9aa450a9aef0c97cfc7336b78b7afb9540a",
"packageName": "minimatch", "packageName": "minimatch",
"version": "3.1.2", "version": "3.1.2",
@ -383,8 +383,8 @@ describe('yarn LockFile utility', () => {
} }
`); `);
expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "215edd0978320a3354188f84a537d45841f2449af4df4379f79b9b777e71aa4f5722cc9d1717eabd2a70d38ef76ab7b708d24d83ea6a6c909dfd8833de98b437", "hash": "215edd0978320a3354188f84a537d45841f2449af4df4379f79b9b777e71aa4f5722cc9d1717eabd2a70d38ef76ab7b708d24d83ea6a6c909dfd8833de98b437",
"packageName": "minimatch", "packageName": "minimatch",
"version": "5.1.1", "version": "5.1.1",
@ -394,8 +394,8 @@ describe('yarn LockFile utility', () => {
} }
`); `);
expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "521660853e0c9f1c604cf43d32c75e2b4675e2d912eaec7bb6749716539dd53f1dfaf575a422087f6a53362f5162f9a4b8a88cc1dadf9d7580423fc05137767a", "hash": "521660853e0c9f1c604cf43d32c75e2b4675e2d912eaec7bb6749716539dd53f1dfaf575a422087f6a53362f5162f9a4b8a88cc1dadf9d7580423fc05137767a",
"packageName": "postgres", "packageName": "postgres",
"version": "https://github.com/charsleysa/postgres.git#commit=3b1a01b2da3e2fafb1a79006f838eff11a8de3cb", "version": "https://github.com/charsleysa/postgres.git#commit=3b1a01b2da3e2fafb1a79006f838eff11a8de3cb",
@ -406,8 +406,8 @@ describe('yarn LockFile utility', () => {
`); `);
expect(graph.externalNodes['npm:eslint-plugin-disable-autofix']) expect(graph.externalNodes['npm:eslint-plugin-disable-autofix'])
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "fb7272c37e5701df14a79d0f8a9d6a0cb521972011ba91d70290eefc33fca589307908a6fb63e2985257b1c7cc3839c076d1c8def0caabddf21a91f13d7c8fc1", "hash": "fb7272c37e5701df14a79d0f8a9d6a0cb521972011ba91d70290eefc33fca589307908a6fb63e2985257b1c7cc3839c076d1c8def0caabddf21a91f13d7c8fc1",
"packageName": "eslint-plugin-disable-autofix", "packageName": "eslint-plugin-disable-autofix",
"version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0", "version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0",
@ -830,8 +830,8 @@ type-fest@^0.20.2:
parseYarnLockfile(lockFile, builder); parseYarnLockfile(lockFile, builder);
const graph = builder.getUpdatedProjectGraph(); const graph = builder.getUpdatedProjectGraph();
expect(graph.externalNodes['npm:tslib']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:tslib']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "hash": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==",
"packageName": "tslib", "packageName": "tslib",
"version": "2.5.0", "version": "2.5.0",
@ -842,8 +842,8 @@ type-fest@^0.20.2:
`); `);
expect(graph.externalNodes['npm:@gitlab-examples/semantic-release-npm']) expect(graph.externalNodes['npm:@gitlab-examples/semantic-release-npm'])
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "sha1-kjNFw/3FHGzfkh58DptD6ZnKpho=", "hash": "sha1-kjNFw/3FHGzfkh58DptD6ZnKpho=",
"packageName": "@gitlab-examples/semantic-release-npm", "packageName": "@gitlab-examples/semantic-release-npm",
"version": "2.0.1", "version": "2.0.1",
@ -859,14 +859,14 @@ type-fest@^0.20.2:
# yarn lockfile v1 # yarn lockfile v1
\\"@gitlab-examples/semantic-release-npm@2.0.1\\": "@gitlab-examples/semantic-release-npm@2.0.1":
version \\"2.0.1\\" version "2.0.1"
resolved \\"https://gitlab.com/api/v4/projects/22738259/packages/npm/@gitlab-examples/semantic-release-npm/-/@gitlab-examples/semantic-release-npm-2.0.1.tgz#923345c3fdc51c6cdf921e7c0e9b43e999caa61a\\" resolved "https://gitlab.com/api/v4/projects/22738259/packages/npm/@gitlab-examples/semantic-release-npm/-/@gitlab-examples/semantic-release-npm-2.0.1.tgz#923345c3fdc51c6cdf921e7c0e9b43e999caa61a"
integrity sha1-kjNFw/3FHGzfkh58DptD6ZnKpho= integrity sha1-kjNFw/3FHGzfkh58DptD6ZnKpho=
tslib@2.5.0: tslib@2.5.0:
version \\"2.5.0\\" version "2.5.0"
resolved \\"https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf\\" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
" "
`); `);
@ -905,8 +905,8 @@ __metadata:
parseYarnLockfile(lockFile, builder); parseYarnLockfile(lockFile, builder);
const graph = builder.getUpdatedProjectGraph(); const graph = builder.getUpdatedProjectGraph();
expect(graph.externalNodes['npm:tslib']).toMatchInlineSnapshot(` expect(graph.externalNodes['npm:tslib']).toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1", "hash": "ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1",
"packageName": "tslib", "packageName": "tslib",
"version": "2.5.0", "version": "2.5.0",
@ -917,8 +917,8 @@ __metadata:
`); `);
expect(graph.externalNodes['npm:@gitlab-examples/semantic-release-npm']) expect(graph.externalNodes['npm:@gitlab-examples/semantic-release-npm'])
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"data": Object { "data": {
"hash": "1944ac24ebb3e7c30db4fe743b75f0bb3b82a0c142c9ba435aa8224005fcc2bc709e21cec109c6f67d6290e0abb6032a55eaca38ca950711bf03317d128db30a", "hash": "1944ac24ebb3e7c30db4fe743b75f0bb3b82a0c142c9ba435aa8224005fcc2bc709e21cec109c6f67d6290e0abb6032a55eaca38ca950711bf03317d128db30a",
"packageName": "@gitlab-examples/semantic-release-npm", "packageName": "@gitlab-examples/semantic-release-npm",
"version": "2.0.1", "version": "2.0.1",
@ -931,33 +931,33 @@ __metadata:
const prunedGraph = pruneProjectGraph(graph, prunedPackageJson); const prunedGraph = pruneProjectGraph(graph, prunedPackageJson);
expect(stringifyYarnLockfile(prunedGraph, lockFile, prunedPackageJson)) expect(stringifyYarnLockfile(prunedGraph, lockFile, prunedPackageJson))
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
"# This file is generated by running \\"yarn install\\" inside your project. "# This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution! # Manual changes might be lost - proceed with caution!
__metadata: __metadata:
version: 6 version: 6
cacheKey: 8 cacheKey: 8
\\"@gitlab-examples/semantic-release-npm@npm:2.0.1\\": "@gitlab-examples/semantic-release-npm@npm:2.0.1":
version: 2.0.1 version: 2.0.1
resolution: \\"@gitlab-examples/semantic-release-npm@npm:2.0.1::__archiveUrl=https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%2Fprojects%2F22738259%2Fpackages%2Fnpm%2F%40gitlab-examples%2Fsemantic-release-npm%2F-%2F%40gitlab-examples%2Fsemantic-release-npm-2.0.1.tgz\\" resolution: "@gitlab-examples/semantic-release-npm@npm:2.0.1::__archiveUrl=https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%2Fprojects%2F22738259%2Fpackages%2Fnpm%2F%40gitlab-examples%2Fsemantic-release-npm%2F-%2F%40gitlab-examples%2Fsemantic-release-npm-2.0.1.tgz"
checksum: 1944ac24ebb3e7c30db4fe743b75f0bb3b82a0c142c9ba435aa8224005fcc2bc709e21cec109c6f67d6290e0abb6032a55eaca38ca950711bf03317d128db30a checksum: 1944ac24ebb3e7c30db4fe743b75f0bb3b82a0c142c9ba435aa8224005fcc2bc709e21cec109c6f67d6290e0abb6032a55eaca38ca950711bf03317d128db30a
languageName: node languageName: node
linkType: hard linkType: hard
\\"@my-ns/example@workspace:.\\": "@my-ns/example@workspace:.":
version: 0.0.0-use.local version: 0.0.0-use.local
resolution: \\"@my-ns/example@workspace:.\\" resolution: "@my-ns/example@workspace:."
dependencies: dependencies:
\\"@gitlab-examples/semantic-release-npm\\": 2.0.1 "@gitlab-examples/semantic-release-npm": 2.0.1
peerDependencies: peerDependencies:
tslib: 2.5.0 tslib: 2.5.0
languageName: unknown languageName: unknown
linkType: soft linkType: soft
\\"tslib@npm:2.5.0\\": "tslib@npm:2.5.0":
version: 2.5.0 version: 2.5.0
resolution: \\"tslib@npm:2.5.0\\" resolution: "tslib@npm:2.5.0"
checksum: ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1 checksum: ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1
languageName: node languageName: node
linkType: hard linkType: hard

View File

@ -41,15 +41,15 @@ describe('StoreRunInformationLifeCycle', () => {
store.endCommand(); store.endCommand();
expect(runDetails).toMatchInlineSnapshot(` expect(runDetails).toMatchInlineSnapshot(`
Object { {
"run": Object { "run": {
"command": "nx run-many --target=test", "command": "nx run-many --target=test",
"endTime": "DATE", "endTime": "DATE",
"inner": false, "inner": false,
"startTime": "DATE", "startTime": "DATE",
}, },
"tasks": Array [ "tasks": [
Object { {
"cacheStatus": "cache-miss", "cacheStatus": "cache-miss",
"endTime": "DATE", "endTime": "DATE",
"hash": "hash1", "hash": "hash1",
@ -60,7 +60,7 @@ describe('StoreRunInformationLifeCycle', () => {
"target": "test", "target": "test",
"taskId": "proj1:test", "taskId": "proj1:test",
}, },
Object { {
"cacheStatus": "cache-miss", "cacheStatus": "cache-miss",
"endTime": "DATE", "endTime": "DATE",
"hash": "hash2", "hash": "hash2",

View File

@ -61,10 +61,10 @@ describe('parseJson', () => {
).toThrowErrorMatchingInlineSnapshot(` ).toThrowErrorMatchingInlineSnapshot(`
"InvalidCommentToken in JSON at 2:7 "InvalidCommentToken in JSON at 2:7
  1 | {   1 | {
> 2 |  //\\"test\\": 123, > 2 |  //"test": 123,
  |  ^^^^^^^^^^^^^^   |  ^^^^^^^^^^^^^^
  3 |  \\"nested\\": {   3 |  "nested": {
  4 |  \\"test\\": 123   4 |  "test": 123
  5 |  /*   5 |  /*
" "
`); `);
@ -89,10 +89,10 @@ describe('parseJson', () => {
).toThrowErrorMatchingInlineSnapshot(` ).toThrowErrorMatchingInlineSnapshot(`
"InvalidCommentToken in JSON at 2:7 "InvalidCommentToken in JSON at 2:7
  1 | {   1 | {
> 2 |  //\\"test\\": 123, > 2 |  //"test": 123,
  |  ^^^^^^^^^^^^^^   |  ^^^^^^^^^^^^^^
  3 |  \\"nested\\": {   3 |  "nested": {
  4 |  \\"test\\": 123   4 |  "test": 123
  5 |  /*   5 |  /*
" "
`); `);
@ -128,11 +128,11 @@ describe('parseJson', () => {
) )
).toThrowErrorMatchingInlineSnapshot(` ).toThrowErrorMatchingInlineSnapshot(`
"PropertyNameExpected in JSON at 6:6 "PropertyNameExpected in JSON at 6:6
  4 |  \\"test\\": 123,   4 |  "test": 123,
  5 |  \\"more\\": 456,   5 |  "more": 456,
> 6 |  }, > 6 |  },
  |  ^   |  ^
  7 |  \\"array\\": [1, 2, 3,]   7 |  "array": [1, 2, 3,]
  8 |  }   8 |  }
" "
`); `);

View File

@ -48,7 +48,7 @@ describe('printHelp', () => {
.map((x) => x.replace('--', '')); .map((x) => x.replace('--', ''));
expect(flagsFromOutput).toMatchInlineSnapshot(` expect(flagsFromOutput).toMatchInlineSnapshot(`
Array [ [
"aReq", "aReq",
"bReq", "bReq",
"aImp", "aImp",

View File

@ -23,16 +23,16 @@ describe('15.0.0 migration (add-babel-inputs)', () => {
const updated = readNxJson(tree); const updated = readNxJson(tree);
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
], ],
"sharedGlobals": Array [ "sharedGlobals": [
"{workspaceRoot}/babel.config.json", "{workspaceRoot}/babel.config.json",
], ],
}, },
@ -54,16 +54,16 @@ describe('15.0.0 migration (add-babel-inputs)', () => {
const updated = readNxJson(tree); const updated = readNxJson(tree);
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
], ],
"sharedGlobals": Array [ "sharedGlobals": [
"{workspaceRoot}/babel.config.js", "{workspaceRoot}/babel.config.js",
], ],
}, },

View File

@ -52,7 +52,7 @@ import NxWelcome from './nx-welcome';
export function App() { export function App() {
return ( return (
<> <>
<NxWelcome title=\\"my-app\\" /> <NxWelcome title="my-app" />
<div /> <div />
</> </>
@ -72,7 +72,7 @@ import NxWelcome from './nx-welcome';
export function App() { export function App() {
return ( return (
<> <>
<NxWelcome title=\\"my-dir-my-app\\" /> <NxWelcome title="my-dir-my-app" />
<div /> <div />
</> </>

View File

@ -139,18 +139,18 @@ describe('app', () => {
expect(appTree.exists('apps/my-app-e2e/cypress.config.ts')).toBeTruthy(); expect(appTree.exists('apps/my-app-e2e/cypress.config.ts')).toBeTruthy();
const tsconfigE2E = readJson(appTree, 'apps/my-app-e2e/tsconfig.json'); const tsconfigE2E = readJson(appTree, 'apps/my-app-e2e/tsconfig.json');
expect(tsconfigE2E).toMatchInlineSnapshot(` expect(tsconfigE2E).toMatchInlineSnapshot(`
Object { {
"compilerOptions": Object { "compilerOptions": {
"allowJs": true, "allowJs": true,
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"sourceMap": false, "sourceMap": false,
"types": Array [ "types": [
"cypress", "cypress",
"node", "node",
], ],
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"include": Array [ "include": [
"src/**/*.ts", "src/**/*.ts",
"src/**/*.js", "src/**/*.js",
"cypress.config.ts", "cypress.config.ts",
@ -446,14 +446,14 @@ describe('app', () => {
expect(projectsConfigurations.get('my-app').targets.test).toBeUndefined(); expect(projectsConfigurations.get('my-app').targets.test).toBeUndefined();
expect(projectsConfigurations.get('my-app').targets.lint) expect(projectsConfigurations.get('my-app').targets.lint)
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-app/**/*.{ts,tsx,js,jsx}", "apps/my-app/**/*.{ts,tsx,js,jsx}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
} }
@ -531,37 +531,37 @@ describe('app', () => {
const eslintJson = readJson(appTree, '/apps/my-app/.eslintrc.json'); const eslintJson = readJson(appTree, '/apps/my-app/.eslintrc.json');
expect(eslintJson).toMatchInlineSnapshot(` expect(eslintJson).toMatchInlineSnapshot(`
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/react", "plugin:@nrwl/nx/react",
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }

View File

@ -192,37 +192,37 @@ describe('lib', () => {
const eslintJson = readJson(tree, 'libs/my-lib/.eslintrc.json'); const eslintJson = readJson(tree, 'libs/my-lib/.eslintrc.json');
expect(eslintJson).toMatchInlineSnapshot(` expect(eslintJson).toMatchInlineSnapshot(`
Object { {
"extends": Array [ "extends": [
"plugin:@nrwl/nx/react", "plugin:@nrwl/nx/react",
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }
@ -396,14 +396,14 @@ describe('lib', () => {
const config = readProjectConfiguration(tree, 'my-lib'); const config = readProjectConfiguration(tree, 'my-lib');
expect(config.targets.test).toBeUndefined(); expect(config.targets.test).toBeUndefined();
expect(config.targets.lint).toMatchInlineSnapshot(` expect(config.targets.lint).toMatchInlineSnapshot(`
Object { {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"libs/my-lib/**/*.{ts,tsx,js,jsx}", "libs/my-lib/**/*.{ts,tsx,js,jsx}",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
} }

View File

@ -1,12 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`webpack5ChangesUtils should get project name and storybook configuration for all react projects 1`] = ` exports[`webpack5ChangesUtils should get project name and storybook configuration for all react projects 1`] = `
Array [ [
Object { {
"projectName": "test-one", "projectName": "test-one",
"storybookConfigPath": "libs/test-one/.storybook", "storybookConfigPath": "libs/test-one/.storybook",
}, },
Object { {
"projectName": "test-two", "projectName": "test-two",
"storybookConfigPath": "libs/test-two/.storybook", "storybookConfigPath": "libs/test-two/.storybook",
}, },

View File

@ -23,16 +23,16 @@ describe('15.0.0 migration (add-babel-inputs)', () => {
const updated = readNxJson(tree); const updated = readNxJson(tree);
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
], ],
"sharedGlobals": Array [ "sharedGlobals": [
"{workspaceRoot}/babel.config.json", "{workspaceRoot}/babel.config.json",
], ],
}, },
@ -54,16 +54,16 @@ describe('15.0.0 migration (add-babel-inputs)', () => {
const updated = readNxJson(tree); const updated = readNxJson(tree);
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
], ],
"sharedGlobals": Array [ "sharedGlobals": [
"{workspaceRoot}/babel.config.js", "{workspaceRoot}/babel.config.js",
], ],
}, },

View File

@ -26,30 +26,30 @@ export default config;
exports[`@nrwl/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 2`] = ` exports[`@nrwl/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../node_modules/@nrwl/react/typings/image.d.ts\\" "../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.ts\\", "*.ts",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -79,30 +79,30 @@ export default config;
exports[`@nrwl/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 5`] = ` exports[`@nrwl/storybook:configuration for workspaces with Root project basic functionalities should generate Storybook files for nested project only 5`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.ts\\", "*.ts",
\\"*.js\\" "*.js"
] ]
} }
" "

View File

@ -14,12 +14,12 @@ exports[`@nrwl/storybook:configuration basic functionalities should generate a w
`; `;
exports[`@nrwl/storybook:configuration basic functionalities should generate files 1`] = ` exports[`@nrwl/storybook:configuration basic functionalities should generate files 1`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"namedInputs": Object { "namedInputs": {
"production": Array [ "production": [
"default", "default",
"!{projectRoot}/.eslintrc.json", "!{projectRoot}/.eslintrc.json",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
@ -30,39 +30,39 @@ Object {
], ],
}, },
"npmScope": "proj", "npmScope": "proj",
"targetDefaults": Object { "targetDefaults": {
"build-storybook": Object { "build-storybook": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
"!{projectRoot}/.storybook/**/*", "!{projectRoot}/.storybook/**/*",
], ],
}, },
"e2e": Object { "e2e": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
], ],
}, },
"lint": Object { "lint": {
"inputs": Array [ "inputs": [
"default", "default",
"{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/.eslintrc.json",
"{workspaceRoot}/.eslintignore", "{workspaceRoot}/.eslintignore",
], ],
}, },
"test": Object { "test": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
"{workspaceRoot}/jest.preset.js", "{workspaceRoot}/jest.preset.js",
], ],
}, },
}, },
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -77,7 +77,7 @@ Object {
`; `;
exports[`@nrwl/storybook:configuration basic functionalities should have the proper typings 1`] = ` exports[`@nrwl/storybook:configuration basic functionalities should have the proper typings 1`] = `
Array [ [
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
"../../../node_modules/@nrwl/react/typings/image.d.ts", "../../../node_modules/@nrwl/react/typings/image.d.ts",
@ -114,29 +114,29 @@ module.exports = {
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for NextJS buildable libs 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for NextJS buildable libs 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -172,29 +172,29 @@ module.exports = {
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for React apps using the swc compiler 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for React apps using the swc compiler 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -230,29 +230,29 @@ module.exports = {
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for React buildable libs 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.js and tsconfig.json for React buildable libs 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -292,30 +292,30 @@ module.exports = config;
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for NextJS libs 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for NextJS libs 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.ts\\", "*.ts",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -365,30 +365,30 @@ module.exports = config;
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for NextJs apps 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for NextJs apps 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../components/**/*.stories.ts\\", "../components/**/*.stories.ts",
\\"../components/**/*.stories.js\\", "../components/**/*.stories.js",
\\"../components/**/*.stories.jsx\\", "../components/**/*.stories.jsx",
\\"../components/**/*.stories.tsx\\", "../components/**/*.stories.tsx",
\\"../components/**/*.stories.mdx\\", "../components/**/*.stories.mdx",
\\"*.ts\\", "*.ts",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -428,30 +428,30 @@ module.exports = config;
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for React apps 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for Storybook configurations with Vite should create correct main.ts and tsconfig.json for React apps 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.ts\\", "*.ts",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -479,30 +479,30 @@ module.exports = config;
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJS buildable libs 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJS buildable libs 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.ts\\", "*.ts",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -530,30 +530,30 @@ module.exports = config;
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJS libs 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJS libs 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.ts\\", "*.ts",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -593,30 +593,30 @@ module.exports = config;
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJs apps 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for NextJs apps 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../components/**/*.stories.ts\\", "../components/**/*.stories.ts",
\\"../components/**/*.stories.js\\", "../components/**/*.stories.js",
\\"../components/**/*.stories.jsx\\", "../components/**/*.stories.jsx",
\\"../components/**/*.stories.tsx\\", "../components/**/*.stories.tsx",
\\"../components/**/*.stories.mdx\\", "../components/**/*.stories.mdx",
\\"*.ts\\", "*.ts",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -644,30 +644,30 @@ module.exports = config;
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React apps 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React apps 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.ts\\", "*.ts",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -699,30 +699,30 @@ module.exports = config;
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React apps using the swc compiler 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React apps using the swc compiler 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.ts\\", "*.ts",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -750,30 +750,30 @@ module.exports = config;
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React buildable libs 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for TypeScript Storybook configurations should create correct main.ts and tsconfig.json for React buildable libs 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.ts\\", "*.ts",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -797,29 +797,29 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJS buildable libs 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJS buildable libs 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -843,29 +843,29 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJS libs 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJS libs 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -902,29 +902,29 @@ module.exports = {
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJs apps 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for NextJs apps 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../components/**/*.stories.ts\\", "../components/**/*.stories.ts",
\\"../components/**/*.stories.js\\", "../components/**/*.stories.js",
\\"../components/**/*.stories.jsx\\", "../components/**/*.stories.jsx",
\\"../components/**/*.stories.tsx\\", "../components/**/*.stories.tsx",
\\"../components/**/*.stories.mdx\\", "../components/**/*.stories.mdx",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -948,29 +948,29 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React apps 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React apps 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -998,29 +998,29 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React apps using the swc compiler 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React apps using the swc compiler 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.js\\" "*.js"
] ]
} }
" "
@ -1044,29 +1044,29 @@ exports[`@nrwl/storybook:configuration for other types of projects - Next.js and
exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React buildable libs 2`] = ` exports[`@nrwl/storybook:configuration for other types of projects - Next.js and the swc compiler for js Storybook configurations should create correct main.js and tsconfig.json for React buildable libs 2`] = `
"{ "{
\\"extends\\": \\"../tsconfig.json\\", "extends": "../tsconfig.json",
\\"compilerOptions\\": { "compilerOptions": {
\\"emitDecoratorMetadata\\": true, "emitDecoratorMetadata": true,
\\"outDir\\": \\"\\" "outDir": ""
}, },
\\"files\\": [ "files": [
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\", "../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\", "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\" "../../../node_modules/@nrwl/react/typings/image.d.ts"
], ],
\\"exclude\\": [ "exclude": [
\\"../**/*.spec.ts\\", "../**/*.spec.ts",
\\"../**/*.spec.js\\", "../**/*.spec.js",
\\"../**/*.spec.tsx\\", "../**/*.spec.tsx",
\\"../**/*.spec.jsx\\" "../**/*.spec.jsx"
], ],
\\"include\\": [ "include": [
\\"../src/**/*.stories.ts\\", "../src/**/*.stories.ts",
\\"../src/**/*.stories.js\\", "../src/**/*.stories.js",
\\"../src/**/*.stories.jsx\\", "../src/**/*.stories.jsx",
\\"../src/**/*.stories.tsx\\", "../src/**/*.stories.tsx",
\\"../src/**/*.stories.mdx\\", "../src/**/*.stories.mdx",
\\"*.js\\" "*.js"
] ]
} }
" "

View File

@ -112,14 +112,14 @@ describe('@nrwl/storybook:configuration for Storybook v7', () => {
); );
expect(tsconfigJson.references).toMatchInlineSnapshot(` expect(tsconfigJson.references).toMatchInlineSnapshot(`
Array [ [
Object { {
"path": "./tsconfig.lib.json", "path": "./tsconfig.lib.json",
}, },
Object { {
"path": "./tsconfig.spec.json", "path": "./tsconfig.spec.json",
}, },
Object { {
"path": "./.storybook/tsconfig.json", "path": "./.storybook/tsconfig.json",
}, },
] ]
@ -147,8 +147,8 @@ describe('@nrwl/storybook:configuration for Storybook v7', () => {
expect(readJson(tree, 'libs/test-ui-lib2/.eslintrc.json').parserOptions) expect(readJson(tree, 'libs/test-ui-lib2/.eslintrc.json').parserOptions)
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"project": Array [ "project": [
"libs/test-ui-lib2/.storybook/tsconfig.json", "libs/test-ui-lib2/.storybook/tsconfig.json",
], ],
} }

View File

@ -280,14 +280,14 @@ describe('@nrwl/storybook:configuration', () => {
expect(enquirer.prompt).toHaveBeenCalled(); expect(enquirer.prompt).toHaveBeenCalled();
expect(tsconfigJson.references).toMatchInlineSnapshot(` expect(tsconfigJson.references).toMatchInlineSnapshot(`
Array [ [
Object { {
"path": "./tsconfig.lib.json", "path": "./tsconfig.lib.json",
}, },
Object { {
"path": "./tsconfig.spec.json", "path": "./tsconfig.spec.json",
}, },
Object { {
"path": "./.storybook/tsconfig.json", "path": "./.storybook/tsconfig.json",
}, },
] ]
@ -321,8 +321,8 @@ describe('@nrwl/storybook:configuration', () => {
expect(enquirer.prompt).toHaveBeenCalled(); expect(enquirer.prompt).toHaveBeenCalled();
expect(readJson(tree, 'libs/test-ui-lib2/.eslintrc.json').parserOptions) expect(readJson(tree, 'libs/test-ui-lib2/.eslintrc.json').parserOptions)
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"project": Array [ "project": [
"libs/test-ui-lib2/.storybook/tsconfig.json", "libs/test-ui-lib2/.storybook/tsconfig.json",
], ],
} }
@ -408,14 +408,14 @@ describe('@nrwl/storybook:configuration', () => {
'static-storybook' 'static-storybook'
] ]
).toMatchInlineSnapshot(` ).toMatchInlineSnapshot(`
Object { {
"configurations": Object { "configurations": {
"ci": Object { "ci": {
"buildTarget": "test-ui-lib:build-storybook:ci", "buildTarget": "test-ui-lib:build-storybook:ci",
}, },
}, },
"executor": "@nrwl/web:file-server", "executor": "@nrwl/web:file-server",
"options": Object { "options": {
"buildTarget": "test-ui-lib:build-storybook", "buildTarget": "test-ui-lib:build-storybook",
"staticFilePath": "dist/storybook/test-ui-lib", "staticFilePath": "dist/storybook/test-ui-lib",
}, },
@ -439,14 +439,14 @@ describe('@nrwl/storybook:configuration', () => {
'static-storybook' 'static-storybook'
] ]
).toMatchInlineSnapshot(` ).toMatchInlineSnapshot(`
Object { {
"configurations": Object { "configurations": {
"ci": Object { "ci": {
"buildTarget": "test-ui-lib:build-storybook:ci", "buildTarget": "test-ui-lib:build-storybook:ci",
}, },
}, },
"executor": "@nrwl/web:file-server", "executor": "@nrwl/web:file-server",
"options": Object { "options": {
"buildTarget": "test-ui-lib:build-storybook", "buildTarget": "test-ui-lib:build-storybook",
"staticFilePath": "dist/storybook/test-ui-lib", "staticFilePath": "dist/storybook/test-ui-lib",
}, },
@ -454,14 +454,14 @@ describe('@nrwl/storybook:configuration', () => {
`); `);
expect(readProjectConfiguration(tree, 'test-ui-lib-e2e').targets.e2e) expect(readProjectConfiguration(tree, 'test-ui-lib-e2e').targets.e2e)
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"configurations": Object { "configurations": {
"ci": Object { "ci": {
"devServerTarget": "test-ui-lib:static-storybook:ci", "devServerTarget": "test-ui-lib:static-storybook:ci",
}, },
}, },
"executor": "@nrwl/cypress:cypress", "executor": "@nrwl/cypress:cypress",
"options": Object { "options": {
"cypressConfig": "apps/test-ui-lib-e2e/cypress.config.ts", "cypressConfig": "apps/test-ui-lib-e2e/cypress.config.ts",
"devServerTarget": "test-ui-lib:storybook", "devServerTarget": "test-ui-lib:storybook",
"testingType": "e2e", "testingType": "e2e",

View File

@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`@nrwl/storybook:init dependencies for package.json should add angular related dependencies when using Angular as uiFramework 1`] = ` exports[`@nrwl/storybook:init dependencies for package.json should add angular related dependencies when using Angular as uiFramework 1`] = `
Object { {
"dependencies": Object { "dependencies": {
"existing": "1.0.0", "existing": "1.0.0",
}, },
"devDependencies": Object { "devDependencies": {
"@angular/forms": "*", "@angular/forms": "*",
"@nrwl/js": "0.0.1", "@nrwl/js": "0.0.1",
"@nrwl/storybook": "^6.5.15", "@nrwl/storybook": "^6.5.15",

View File

@ -87,46 +87,46 @@ exports[`Helper functions for the Storybook 7 migration generator changeCoreComm
`; `;
exports[`Helper functions for the Storybook 7 migration generator getAllStorybookInfo and onlyShowGuide should return all info for all projects with Storybook 1`] = ` exports[`Helper functions for the Storybook 7 migration generator getAllStorybookInfo and onlyShowGuide should return all info for all projects with Storybook 1`] = `
Object { {
"nextapp": Object { "nextapp": {
"configDir": "apps/nextapp/.storybook", "configDir": "apps/nextapp/.storybook",
"uiFramework": "@storybook/react", "uiFramework": "@storybook/react",
"viteConfigFilePath": undefined, "viteConfigFilePath": undefined,
}, },
"nextapp-ts": Object { "nextapp-ts": {
"configDir": "apps/nextapp-ts/.storybook", "configDir": "apps/nextapp-ts/.storybook",
"uiFramework": "@storybook/react", "uiFramework": "@storybook/react",
"viteConfigFilePath": undefined, "viteConfigFilePath": undefined,
}, },
"ngapp": Object { "ngapp": {
"configDir": "apps/ngapp/.storybook", "configDir": "apps/ngapp/.storybook",
"uiFramework": "@storybook/angular", "uiFramework": "@storybook/angular",
}, },
"ngapp-ts": Object { "ngapp-ts": {
"configDir": "apps/ngapp-ts/.storybook", "configDir": "apps/ngapp-ts/.storybook",
"uiFramework": "@storybook/angular", "uiFramework": "@storybook/angular",
}, },
"rv1": Object { "rv1": {
"configDir": "apps/rv1/.storybook", "configDir": "apps/rv1/.storybook",
"uiFramework": "@storybook/react", "uiFramework": "@storybook/react",
"viteConfigFilePath": "apps/rv1/vite.config.js", "viteConfigFilePath": "apps/rv1/vite.config.js",
}, },
"rv2-ts": Object { "rv2-ts": {
"configDir": "apps/rv2-ts/.storybook", "configDir": "apps/rv2-ts/.storybook",
"uiFramework": "@storybook/react", "uiFramework": "@storybook/react",
"viteConfigFilePath": "apps/rv2-ts/vite.config.ts", "viteConfigFilePath": "apps/rv2-ts/vite.config.ts",
}, },
"rw1": Object { "rw1": {
"configDir": "apps/rw1/.storybook", "configDir": "apps/rw1/.storybook",
"uiFramework": "@storybook/react", "uiFramework": "@storybook/react",
"viteConfigFilePath": undefined, "viteConfigFilePath": undefined,
}, },
"wv1": Object { "wv1": {
"configDir": "apps/wv1/.storybook", "configDir": "apps/wv1/.storybook",
"uiFramework": "@storybook/web-components", "uiFramework": "@storybook/web-components",
"viteConfigFilePath": "apps/wv1/vite.config.ts", "viteConfigFilePath": "apps/wv1/vite.config.ts",
}, },
"ww1": Object { "ww1": {
"configDir": "apps/ww1/.storybook", "configDir": "apps/ww1/.storybook",
"uiFramework": "@storybook/web-components", "uiFramework": "@storybook/web-components",
"viteConfigFilePath": undefined, "viteConfigFilePath": undefined,

View File

@ -1,15 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Change the Storybook targets for Angular projects to use native Storybooke executor for all types of angular projects - non-buildable and buildable libs/apps should keep any extra options added in the target 1`] = ` exports[`Change the Storybook targets for Angular projects to use native Storybooke executor for all types of angular projects - non-buildable and buildable libs/apps should keep any extra options added in the target 1`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -23,15 +23,15 @@ Object {
`; `;
exports[`Change the Storybook targets for Angular projects to use native Storybooke executor for all types of angular projects - non-buildable and buildable libs/apps should not throw an error if no Storybook exists 1`] = ` exports[`Change the Storybook targets for Angular projects to use native Storybooke executor for all types of angular projects - non-buildable and buildable libs/apps should not throw an error if no Storybook exists 1`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -45,15 +45,15 @@ Object {
`; `;
exports[`Change the Storybook targets for Angular projects to use native Storybooke executor for all types of angular projects - non-buildable and buildable libs/apps should set the browserTarget correctly even if target names are not the default 1`] = ` exports[`Change the Storybook targets for Angular projects to use native Storybooke executor for all types of angular projects - non-buildable and buildable libs/apps should set the browserTarget correctly even if target names are not the default 1`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -67,15 +67,15 @@ Object {
`; `;
exports[`Change the Storybook targets for Angular projects to use native Storybooke executor for all types of angular projects - non-buildable and buildable libs/apps should set the browserTarget correctly in the Storybook config according to the type of project 1`] = ` exports[`Change the Storybook targets for Angular projects to use native Storybooke executor for all types of angular projects - non-buildable and buildable libs/apps should set the browserTarget correctly in the Storybook config according to the type of project 1`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -89,15 +89,15 @@ Object {
`; `;
exports[`Change the Storybook targets for Angular projects to use native Storybooke executor for all types of angular projects - non-buildable and buildable libs/apps should work even if build-storybook does not exist 1`] = ` exports[`Change the Storybook targets for Angular projects to use native Storybooke executor for all types of angular projects - non-buildable and buildable libs/apps should work even if build-storybook does not exist 1`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",
@ -111,15 +111,15 @@ Object {
`; `;
exports[`Change the Storybook targets for Angular projects to use native Storybooke executor for non-angular projects should not change their Storybook targets 1`] = ` exports[`Change the Storybook targets for Angular projects to use native Storybooke executor for non-angular projects should not change their Storybook targets 1`] = `
Object { {
"affected": Object { "affected": {
"defaultBase": "main", "defaultBase": "main",
}, },
"npmScope": "proj", "npmScope": "proj",
"tasksRunnerOptions": Object { "tasksRunnerOptions": {
"default": Object { "default": {
"options": Object { "options": {
"cacheableOperations": Array [ "cacheableOperations": [
"build", "build",
"lint", "lint",
"test", "test",

View File

@ -44,29 +44,29 @@ describe('15.0.0 migration (add-storybook-inputs)', () => {
const updated = readNxJson(tree); const updated = readNxJson(tree);
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
"!{projectRoot}/.storybook/**/*", "!{projectRoot}/.storybook/**/*",
"!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)", "!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
], ],
"sharedGlobals": Array [], "sharedGlobals": [],
}, },
"targetDefaults": Object { "targetDefaults": {
"build-storybook": Object { "build-storybook": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
"{workspaceRoot}/.storybook/**/*", "{workspaceRoot}/.storybook/**/*",
], ],
}, },
"build-storybook2": Object { "build-storybook2": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
"{workspaceRoot}/.storybook/**/*", "{workspaceRoot}/.storybook/**/*",
@ -107,29 +107,29 @@ describe('15.0.0 migration (add-storybook-inputs)', () => {
const updated = readNxJson(tree); const updated = readNxJson(tree);
expect(updated).toMatchInlineSnapshot(` expect(updated).toMatchInlineSnapshot(`
Object { {
"namedInputs": Object { "namedInputs": {
"default": Array [ "default": [
"{projectRoot}/**/*", "{projectRoot}/**/*",
"sharedGlobals", "sharedGlobals",
], ],
"production": Array [ "production": [
"default", "default",
"!{projectRoot}/.storybook/**/*", "!{projectRoot}/.storybook/**/*",
"!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)", "!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
], ],
"sharedGlobals": Array [], "sharedGlobals": [],
}, },
"targetDefaults": Object { "targetDefaults": {
"build-storybook": Object { "build-storybook": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
"{workspaceRoot}/.storybook/**/*", "{workspaceRoot}/.storybook/**/*",
], ],
}, },
"build-storybook2": Object { "build-storybook2": {
"inputs": Array [ "inputs": [
"default", "default",
"^production", "^production",
"{workspaceRoot}/.storybook/**/*", "{workspaceRoot}/.storybook/**/*",

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`@nrwl/vite:configuration library mode should add config for building library 1`] = ` exports[`@nrwl/vite:configuration library mode should add config for building library 1`] = `
"/// <reference types=\\"vitest\\" /> "/// <reference types="vitest" />
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
import viteTsConfigPaths from 'vite-tsconfig-paths'; import viteTsConfigPaths from 'vite-tsconfig-paths';
@ -54,7 +54,7 @@ export default defineConfig({
`; `;
exports[`@nrwl/vite:configuration library mode should set up non buildable library correctly 1`] = ` exports[`@nrwl/vite:configuration library mode should set up non buildable library correctly 1`] = `
"/// <reference types=\\"vitest\\" /> "/// <reference types="vitest" />
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
import viteTsConfigPaths from 'vite-tsconfig-paths'; import viteTsConfigPaths from 'vite-tsconfig-paths';
@ -117,33 +117,33 @@ export default defineConfig({
exports[`@nrwl/vite:configuration library mode should set up non buildable library correctly 2`] = ` exports[`@nrwl/vite:configuration library mode should set up non buildable library correctly 2`] = `
"{ "{
\\"projects\\": { "projects": {
\\"react-lib-nonb-jest\\": { "react-lib-nonb-jest": {
\\"name\\": \\"react-lib-nonb-jest\\", "name": "react-lib-nonb-jest",
\\"$schema\\": \\"../../node_modules/nx/schemas/project-schema.json\\", "$schema": "../../node_modules/nx/schemas/project-schema.json",
\\"root\\": \\"libs/react-lib-nonb-jest\\", "root": "libs/react-lib-nonb-jest",
\\"sourceRoot\\": \\"libs/react-lib-nonb-jest/src\\", "sourceRoot": "libs/react-lib-nonb-jest/src",
\\"projectType\\": \\"library\\", "projectType": "library",
\\"targets\\": { "targets": {
\\"lint\\": { "lint": {
\\"executor\\": \\"@nrwl/linter:eslint\\", "executor": "@nrwl/linter:eslint",
\\"outputs\\": [\\"{options.outputFile}\\"], "outputs": ["{options.outputFile}"],
\\"options\\": { "options": {
\\"lintFilePatterns\\": [ "lintFilePatterns": [
\\"libs/react-lib-nonb-jest/**/*.{ts,tsx,js,jsx}\\" "libs/react-lib-nonb-jest/**/*.{ts,tsx,js,jsx}"
] ]
} }
}, },
\\"test\\": { "test": {
\\"executor\\": \\"@nrwl/jest:jest\\", "executor": "@nrwl/jest:jest",
\\"outputs\\": [\\"{workspaceRoot}/coverage/{projectRoot}\\"], "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
\\"options\\": { "options": {
\\"jestConfig\\": \\"libs/react-lib-nonb-jest/jest.config.ts\\", "jestConfig": "libs/react-lib-nonb-jest/jest.config.ts",
\\"passWithNoTests\\": true "passWithNoTests": true
} }
} }
}, },
\\"tags\\": [] "tags": []
} }
} }
} }
@ -204,33 +204,33 @@ export default defineConfig({
exports[`@nrwl/vite:configuration library mode should set up non buildable library which already has vite.config.ts correctly 2`] = ` exports[`@nrwl/vite:configuration library mode should set up non buildable library which already has vite.config.ts correctly 2`] = `
"{ "{
\\"projects\\": { "projects": {
\\"react-lib-nonb-vitest\\": { "react-lib-nonb-vitest": {
\\"name\\": \\"react-lib-nonb-vitest\\", "name": "react-lib-nonb-vitest",
\\"$schema\\": \\"../../node_modules/nx/schemas/project-schema.json\\", "$schema": "../../node_modules/nx/schemas/project-schema.json",
\\"root\\": \\"libs/react-lib-nonb-vitest\\", "root": "libs/react-lib-nonb-vitest",
\\"sourceRoot\\": \\"libs/react-lib-nonb-vitest/src\\", "sourceRoot": "libs/react-lib-nonb-vitest/src",
\\"projectType\\": \\"library\\", "projectType": "library",
\\"targets\\": { "targets": {
\\"lint\\": { "lint": {
\\"executor\\": \\"@nrwl/linter:eslint\\", "executor": "@nrwl/linter:eslint",
\\"outputs\\": [\\"{options.outputFile}\\"], "outputs": ["{options.outputFile}"],
\\"options\\": { "options": {
\\"lintFilePatterns\\": [ "lintFilePatterns": [
\\"libs/react-lib-nonb-vitest/**/*.{ts,tsx,js,jsx}\\" "libs/react-lib-nonb-vitest/**/*.{ts,tsx,js,jsx}"
] ]
} }
}, },
\\"test\\": { "test": {
\\"executor\\": \\"@nrwl/vite:test\\", "executor": "@nrwl/vite:test",
\\"outputs\\": [\\"{projectRoot}/coverage\\"], "outputs": ["{projectRoot}/coverage"],
\\"options\\": { "options": {
\\"passWithNoTests\\": true, "passWithNoTests": true,
\\"reportsDirectory\\": \\"{workspaceRoot}/coverage/{projectRoot}\\" "reportsDirectory": "{workspaceRoot}/coverage/{projectRoot}"
} }
} }
}, },
\\"tags\\": [] "tags": []
} }
} }
} }
@ -239,58 +239,58 @@ exports[`@nrwl/vite:configuration library mode should set up non buildable libra
exports[`@nrwl/vite:configuration transform React app to use Vite by providing custom targets transform React app if supported executor is provided should transform workspace.json project config 1`] = ` exports[`@nrwl/vite:configuration transform React app to use Vite by providing custom targets transform React app if supported executor is provided should transform workspace.json project config 1`] = `
"{ "{
\\"projects\\": { "projects": {
\\"my-test-mixed-react-app\\": { "my-test-mixed-react-app": {
\\"name\\": \\"my-test-mixed-react-app\\", "name": "my-test-mixed-react-app",
\\"$schema\\": \\"../../node_modules/nx/schemas/project-schema.json\\", "$schema": "../../node_modules/nx/schemas/project-schema.json",
\\"root\\": \\"apps/my-test-mixed-react-app\\", "root": "apps/my-test-mixed-react-app",
\\"sourceRoot\\": \\"apps/my-test-mixed-react-app/src\\", "sourceRoot": "apps/my-test-mixed-react-app/src",
\\"projectType\\": \\"application\\", "projectType": "application",
\\"targets\\": { "targets": {
\\"invalid-build\\": { "invalid-build": {
\\"executor\\": \\"@nrwl/js:tsc\\", "executor": "@nrwl/js:tsc",
\\"outputs\\": [\\"{options.outputPath}\\"] "outputs": ["{options.outputPath}"]
}, },
\\"valid-build\\": { "valid-build": {
\\"executor\\": \\"@nrwl/webpack:webpack\\", "executor": "@nrwl/webpack:webpack",
\\"outputs\\": [\\"{options.outputPath}\\"] "outputs": ["{options.outputPath}"]
}, },
\\"serve\\": { "serve": {
\\"executor\\": \\"@nrwl/webpack:dev-server\\", "executor": "@nrwl/webpack:dev-server",
\\"defaultConfiguration\\": \\"development\\", "defaultConfiguration": "development",
\\"options\\": { "options": {
\\"buildTarget\\": \\"my-test-mixed-react-app:build\\", "buildTarget": "my-test-mixed-react-app:build",
\\"hmr\\": true "hmr": true
}, },
\\"configurations\\": { "configurations": {
\\"development\\": { "development": {
\\"buildTarget\\": \\"my-test-mixed-react-app:build:development\\" "buildTarget": "my-test-mixed-react-app:build:development"
}, },
\\"production\\": { "production": {
\\"buildTarget\\": \\"my-test-mixed-react-app:build:production\\", "buildTarget": "my-test-mixed-react-app:build:production",
\\"hmr\\": false "hmr": false
} }
} }
}, },
\\"lint\\": { "lint": {
\\"executor\\": \\"@nrwl/linter:eslint\\", "executor": "@nrwl/linter:eslint",
\\"outputs\\": [\\"{options.outputFile}\\"], "outputs": ["{options.outputFile}"],
\\"options\\": { "options": {
\\"lintFilePatterns\\": [ "lintFilePatterns": [
\\"apps/my-test-mixed-react-app/**/*.{ts,tsx,js,jsx}\\" "apps/my-test-mixed-react-app/**/*.{ts,tsx,js,jsx}"
] ]
} }
}, },
\\"test\\": { "test": {
\\"executor\\": \\"@nrwl/jest:jest\\", "executor": "@nrwl/jest:jest",
\\"outputs\\": [\\"{workspaceRoot}/coverage/{projectRoot}\\"], "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
\\"options\\": { "options": {
\\"jestConfig\\": \\"apps/my-test-mixed-react-app/jest.config.ts\\", "jestConfig": "apps/my-test-mixed-react-app/jest.config.ts",
\\"passWithNoTests\\": true "passWithNoTests": true
} }
} }
}, },
\\"tags\\": [] "tags": []
} }
} }
} }
@ -298,7 +298,7 @@ exports[`@nrwl/vite:configuration transform React app to use Vite by providing c
`; `;
exports[`@nrwl/vite:configuration transform React app to use Vite should create vite.config file at the root of the app 1`] = ` exports[`@nrwl/vite:configuration transform React app to use Vite should create vite.config file at the root of the app 1`] = `
"/// <reference types=\\"vitest\\" /> "/// <reference types="vitest" />
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
import viteTsConfigPaths from 'vite-tsconfig-paths'; import viteTsConfigPaths from 'vite-tsconfig-paths';
@ -337,18 +337,18 @@ export default defineConfig({
exports[`@nrwl/vite:configuration transform React app to use Vite should move index.html to the root of the project 1`] = ` exports[`@nrwl/vite:configuration transform React app to use Vite should move index.html to the root of the project 1`] = `
"<!DOCTYPE html> "<!DOCTYPE html>
<html lang=\\"en\\"> <html lang="en">
<head> <head>
<meta charset=\\"utf-8\\" /> <meta charset="utf-8" />
<title>My Test React App</title> <title>My Test React App</title>
<base href=\\"/\\" /> <base href="/" />
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel=\\"icon\\" type=\\"image/x-icon\\" href=\\"favicon.ico\\" /> <link rel="icon" type="image/x-icon" href="favicon.ico" />
</head> </head>
<body> <body>
<div id=\\"root\\"></div> <div id="root"></div>
<script type=\\"module\\" src=\\"/src/main.tsx\\"></script> <script type="module" src="/src/main.tsx"></script>
</body> </body>
</html> </html>
" "
@ -356,91 +356,91 @@ exports[`@nrwl/vite:configuration transform React app to use Vite should move in
exports[`@nrwl/vite:configuration transform React app to use Vite should transform workspace.json project config 1`] = ` exports[`@nrwl/vite:configuration transform React app to use Vite should transform workspace.json project config 1`] = `
"{ "{
\\"projects\\": { "projects": {
\\"my-test-react-app\\": { "my-test-react-app": {
\\"name\\": \\"my-test-react-app\\", "name": "my-test-react-app",
\\"$schema\\": \\"../../node_modules/nx/schemas/project-schema.json\\", "$schema": "../../node_modules/nx/schemas/project-schema.json",
\\"root\\": \\"apps/my-test-react-app\\", "root": "apps/my-test-react-app",
\\"sourceRoot\\": \\"apps/my-test-react-app/src\\", "sourceRoot": "apps/my-test-react-app/src",
\\"projectType\\": \\"application\\", "projectType": "application",
\\"targets\\": { "targets": {
\\"build\\": { "build": {
\\"executor\\": \\"@nrwl/webpack:webpack\\", "executor": "@nrwl/webpack:webpack",
\\"outputs\\": [\\"{options.outputPath}\\"], "outputs": ["{options.outputPath}"],
\\"defaultConfiguration\\": \\"production\\", "defaultConfiguration": "production",
\\"options\\": { "options": {
\\"compiler\\": \\"babel\\", "compiler": "babel",
\\"outputPath\\": \\"dist/apps/my-test-react-app\\", "outputPath": "dist/apps/my-test-react-app",
\\"index\\": \\"apps/my-test-react-app/src/index.html\\", "index": "apps/my-test-react-app/src/index.html",
\\"baseHref\\": \\"/\\", "baseHref": "/",
\\"main\\": \\"apps/my-test-react-app/src/main.tsx\\", "main": "apps/my-test-react-app/src/main.tsx",
\\"polyfills\\": \\"apps/my-test-react-app/src/polyfills.ts\\", "polyfills": "apps/my-test-react-app/src/polyfills.ts",
\\"tsConfig\\": \\"apps/my-test-react-app/tsconfig.app.json\\", "tsConfig": "apps/my-test-react-app/tsconfig.app.json",
\\"assets\\": [ "assets": [
\\"apps/my-test-react-app/src/favicon.ico\\", "apps/my-test-react-app/src/favicon.ico",
\\"apps/my-test-react-app/src/assets\\" "apps/my-test-react-app/src/assets"
], ],
\\"styles\\": [\\"apps/my-test-react-app/src/styles.css\\"], "styles": ["apps/my-test-react-app/src/styles.css"],
\\"scripts\\": [], "scripts": [],
\\"webpackConfig\\": \\"@nrwl/react/plugins/webpack\\" "webpackConfig": "@nrwl/react/plugins/webpack"
}, },
\\"configurations\\": { "configurations": {
\\"development\\": { "development": {
\\"extractLicenses\\": false, "extractLicenses": false,
\\"optimization\\": false, "optimization": false,
\\"sourceMap\\": true, "sourceMap": true,
\\"vendorChunk\\": true "vendorChunk": true
}, },
\\"production\\": { "production": {
\\"fileReplacements\\": [ "fileReplacements": [
{ {
\\"replace\\": \\"apps/my-test-react-app/src/environments/environment.ts\\", "replace": "apps/my-test-react-app/src/environments/environment.ts",
\\"with\\": \\"apps/my-test-react-app/src/environments/environment.prod.ts\\" "with": "apps/my-test-react-app/src/environments/environment.prod.ts"
} }
], ],
\\"optimization\\": true, "optimization": true,
\\"outputHashing\\": \\"all\\", "outputHashing": "all",
\\"sourceMap\\": false, "sourceMap": false,
\\"namedChunks\\": false, "namedChunks": false,
\\"extractLicenses\\": true, "extractLicenses": true,
\\"vendorChunk\\": false "vendorChunk": false
} }
} }
}, },
\\"serve\\": { "serve": {
\\"executor\\": \\"@nrwl/webpack:dev-server\\", "executor": "@nrwl/webpack:dev-server",
\\"defaultConfiguration\\": \\"development\\", "defaultConfiguration": "development",
\\"options\\": { "options": {
\\"buildTarget\\": \\"my-test-react-app:build\\", "buildTarget": "my-test-react-app:build",
\\"hmr\\": true "hmr": true
}, },
\\"configurations\\": { "configurations": {
\\"development\\": { "development": {
\\"buildTarget\\": \\"my-test-react-app:build:development\\" "buildTarget": "my-test-react-app:build:development"
}, },
\\"production\\": { "production": {
\\"buildTarget\\": \\"my-test-react-app:build:production\\", "buildTarget": "my-test-react-app:build:production",
\\"hmr\\": false "hmr": false
} }
} }
}, },
\\"lint\\": { "lint": {
\\"executor\\": \\"@nrwl/linter:eslint\\", "executor": "@nrwl/linter:eslint",
\\"outputs\\": [\\"{options.outputFile}\\"], "outputs": ["{options.outputFile}"],
\\"options\\": { "options": {
\\"lintFilePatterns\\": [\\"apps/my-test-react-app/**/*.{ts,tsx,js,jsx}\\"] "lintFilePatterns": ["apps/my-test-react-app/**/*.{ts,tsx,js,jsx}"]
} }
}, },
\\"test\\": { "test": {
\\"executor\\": \\"@nrwl/jest:jest\\", "executor": "@nrwl/jest:jest",
\\"outputs\\": [\\"{workspaceRoot}/coverage/{projectRoot}\\"], "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
\\"options\\": { "options": {
\\"jestConfig\\": \\"apps/my-test-react-app/jest.config.ts\\", "jestConfig": "apps/my-test-react-app/jest.config.ts",
\\"passWithNoTests\\": true "passWithNoTests": true
} }
} }
}, },
\\"tags\\": [] "tags": []
} }
} }
} }
@ -448,7 +448,7 @@ exports[`@nrwl/vite:configuration transform React app to use Vite should transfo
`; `;
exports[`@nrwl/vite:configuration transform Web app to use Vite should create vite.config file at the root of the app 1`] = ` exports[`@nrwl/vite:configuration transform Web app to use Vite should create vite.config file at the root of the app 1`] = `
"/// <reference types=\\"vitest\\" /> "/// <reference types="vitest" />
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import viteTsConfigPaths from 'vite-tsconfig-paths'; import viteTsConfigPaths from 'vite-tsconfig-paths';
@ -486,18 +486,18 @@ export default defineConfig({
exports[`@nrwl/vite:configuration transform Web app to use Vite should move index.html to the root of the project 1`] = ` exports[`@nrwl/vite:configuration transform Web app to use Vite should move index.html to the root of the project 1`] = `
"<!DOCTYPE html> "<!DOCTYPE html>
<html lang=\\"en\\"> <html lang="en">
<head> <head>
<meta charset=\\"utf-8\\" /> <meta charset="utf-8" />
<title>WebappPure</title> <title>WebappPure</title>
<base href=\\"/\\" /> <base href="/" />
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel=\\"icon\\" type=\\"image/x-icon\\" href=\\"favicon.ico\\" /> <link rel="icon" type="image/x-icon" href="favicon.ico" />
</head> </head>
<body> <body>
<workspace-root></workspace-root> <workspace-root></workspace-root>
<script type=\\"module\\" src=\\"/src/main.ts\\"></script> <script type="module" src="/src/main.ts"></script>
</body> </body>
</html> </html>
" "
@ -505,75 +505,75 @@ exports[`@nrwl/vite:configuration transform Web app to use Vite should move inde
exports[`@nrwl/vite:configuration transform Web app to use Vite should transform workspace.json project config 1`] = ` exports[`@nrwl/vite:configuration transform Web app to use Vite should transform workspace.json project config 1`] = `
"{ "{
\\"projects\\": { "projects": {
\\"my-test-web-app\\": { "my-test-web-app": {
\\"name\\": \\"my-test-web-app\\", "name": "my-test-web-app",
\\"$schema\\": \\"../../node_modules/nx/schemas/project-schema.json\\", "$schema": "../../node_modules/nx/schemas/project-schema.json",
\\"projectType\\": \\"application\\", "projectType": "application",
\\"root\\": \\"apps/my-test-web-app\\", "root": "apps/my-test-web-app",
\\"sourceRoot\\": \\"apps/my-test-web-app/src\\", "sourceRoot": "apps/my-test-web-app/src",
\\"tags\\": [], "tags": [],
\\"targets\\": { "targets": {
\\"build\\": { "build": {
\\"executor\\": \\"@nrwl/webpack:webpack\\", "executor": "@nrwl/webpack:webpack",
\\"outputs\\": [\\"{options.outputPath}\\"], "outputs": ["{options.outputPath}"],
\\"defaultConfiguration\\": \\"production\\", "defaultConfiguration": "production",
\\"options\\": { "options": {
\\"outputPath\\": \\"dist/apps/my-test-web-app\\", "outputPath": "dist/apps/my-test-web-app",
\\"compiler\\": \\"babel\\", "compiler": "babel",
\\"main\\": \\"apps/my-test-web-app/src/main.ts\\", "main": "apps/my-test-web-app/src/main.ts",
\\"tsConfig\\": \\"apps/my-test-web-app/tsconfig.app.json\\", "tsConfig": "apps/my-test-web-app/tsconfig.app.json",
\\"assets\\": [ "assets": [
\\"apps/my-test-web-app/src/favicon.ico\\", "apps/my-test-web-app/src/favicon.ico",
\\"apps/my-test-web-app/src/assets\\" "apps/my-test-web-app/src/assets"
], ],
\\"index\\": \\"apps/my-test-web-app/src/index.html\\", "index": "apps/my-test-web-app/src/index.html",
\\"baseHref\\": \\"/\\", "baseHref": "/",
\\"polyfills\\": \\"apps/my-test-web-app/src/polyfills.ts\\", "polyfills": "apps/my-test-web-app/src/polyfills.ts",
\\"styles\\": [\\"apps/my-test-web-app/src/styles.css\\"], "styles": ["apps/my-test-web-app/src/styles.css"],
\\"scripts\\": [] "scripts": []
}, },
\\"configurations\\": { "configurations": {
\\"production\\": { "production": {
\\"optimization\\": true, "optimization": true,
\\"outputHashing\\": \\"all\\", "outputHashing": "all",
\\"sourceMap\\": false, "sourceMap": false,
\\"namedChunks\\": false, "namedChunks": false,
\\"extractLicenses\\": true, "extractLicenses": true,
\\"vendorChunk\\": false, "vendorChunk": false,
\\"fileReplacements\\": [ "fileReplacements": [
{ {
\\"replace\\": \\"apps/my-test-web-app/src/environments/environment.ts\\", "replace": "apps/my-test-web-app/src/environments/environment.ts",
\\"with\\": \\"apps/my-test-web-app/src/environments/environment.prod.ts\\" "with": "apps/my-test-web-app/src/environments/environment.prod.ts"
} }
] ]
} }
} }
}, },
\\"serve\\": { "serve": {
\\"executor\\": \\"@nrwl/webpack:dev-server\\", "executor": "@nrwl/webpack:dev-server",
\\"options\\": { "options": {
\\"buildTarget\\": \\"my-test-web-app:build\\" "buildTarget": "my-test-web-app:build"
}, },
\\"configurations\\": { "configurations": {
\\"production\\": { "production": {
\\"buildTarget\\": \\"my-test-web-app:build:production\\" "buildTarget": "my-test-web-app:build:production"
} }
} }
}, },
\\"lint\\": { "lint": {
\\"executor\\": \\"@nrwl/linter:eslint\\", "executor": "@nrwl/linter:eslint",
\\"outputs\\": [\\"{options.outputFile}\\"], "outputs": ["{options.outputFile}"],
\\"options\\": { "options": {
\\"lintFilePatterns\\": [\\"apps/my-test-web-app/**/*.ts\\"] "lintFilePatterns": ["apps/my-test-web-app/**/*.ts"]
} }
}, },
\\"test\\": { "test": {
\\"executor\\": \\"@nrwl/jest:jest\\", "executor": "@nrwl/jest:jest",
\\"outputs\\": [\\"{workspaceRoot}/coverage/{projectRoot}\\"], "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
\\"options\\": { "options": {
\\"jestConfig\\": \\"apps/my-test-web-app/jest.config.ts\\", "jestConfig": "apps/my-test-web-app/jest.config.ts",
\\"passWithNoTests\\": true "passWithNoTests": true
} }
} }
} }
@ -584,7 +584,7 @@ exports[`@nrwl/vite:configuration transform Web app to use Vite should transform
`; `;
exports[`@nrwl/vite:configuration vitest should create a vitest configuration if "includeVitest" is true 1`] = ` exports[`@nrwl/vite:configuration vitest should create a vitest configuration if "includeVitest" is true 1`] = `
"/// <reference types=\\"vitest\\" /> "/// <reference types="vitest" />
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
import viteTsConfigPaths from 'vite-tsconfig-paths'; import viteTsConfigPaths from 'vite-tsconfig-paths';

View File

@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`@nrwl/vite:init dependencies for package.json should add vite packages and react-related dependencies for vite 1`] = ` exports[`@nrwl/vite:init dependencies for package.json should add vite packages and react-related dependencies for vite 1`] = `
Object { {
"dependencies": Object { "dependencies": {
"existing": "1.0.0", "existing": "1.0.0",
}, },
"devDependencies": Object { "devDependencies": {
"@nrwl/js": "0.0.1", "@nrwl/js": "0.0.1",
"@nrwl/vite": "0.0.1", "@nrwl/vite": "0.0.1",
"@vitejs/plugin-react": "^3.0.0", "@vitejs/plugin-react": "^3.0.0",

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`vitest generator insourceTests should add the insourceSource option in the vite config 1`] = ` exports[`vitest generator insourceTests should add the insourceSource option in the vite config 1`] = `
"/// <reference types=\\"vitest\\" /> "/// <reference types="vitest" />
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
import viteTsConfigPaths from 'vite-tsconfig-paths'; import viteTsConfigPaths from 'vite-tsconfig-paths';
@ -42,7 +42,7 @@ export default defineConfig({
`; `;
exports[`vitest generator vite.config should create correct vite.config.ts file for apps 1`] = ` exports[`vitest generator vite.config should create correct vite.config.ts file for apps 1`] = `
"/// <reference types=\\"vitest\\" /> "/// <reference types="vitest" />
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
import viteTsConfigPaths from 'vite-tsconfig-paths'; import viteTsConfigPaths from 'vite-tsconfig-paths';
@ -79,7 +79,7 @@ export default defineConfig({
`; `;
exports[`vitest generator vite.config should create correct vite.config.ts file for non buildable libs 1`] = ` exports[`vitest generator vite.config should create correct vite.config.ts file for non buildable libs 1`] = `
"/// <reference types=\\"vitest\\" /> "/// <reference types="vitest" />
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
import viteTsConfigPaths from 'vite-tsconfig-paths'; import viteTsConfigPaths from 'vite-tsconfig-paths';

View File

@ -29,12 +29,12 @@ describe('vitest generator', () => {
await generator(appTree, options); await generator(appTree, options);
const config = readProjectConfiguration(appTree, 'my-test-react-app'); const config = readProjectConfiguration(appTree, 'my-test-react-app');
expect(config.targets['test']).toMatchInlineSnapshot(` expect(config.targets['test']).toMatchInlineSnapshot(`
Object { {
"executor": "@nrwl/vite:test", "executor": "@nrwl/vite:test",
"options": Object { "options": {
"passWithNoTests": true, "passWithNoTests": true,
}, },
"outputs": Array [ "outputs": [
"{workspaceRoot}/coverage/{projectRoot}", "{workspaceRoot}/coverage/{projectRoot}",
], ],
} }
@ -52,13 +52,13 @@ describe('vitest generator', () => {
await generator(appTree, options); await generator(appTree, options);
const config = readProjectConfiguration(appTree, 'my-test-react-app'); const config = readProjectConfiguration(appTree, 'my-test-react-app');
expect(config.targets['test']).toMatchInlineSnapshot(` expect(config.targets['test']).toMatchInlineSnapshot(`
Object { {
"executor": "@nrwl/vite:test", "executor": "@nrwl/vite:test",
"options": Object { "options": {
"passWithNoTests": true, "passWithNoTests": true,
"reportsDirectory": "../../coverage/apps/my-test-react-app", "reportsDirectory": "../../coverage/apps/my-test-react-app",
}, },
"outputs": Array [ "outputs": [
"coverage/apps/my-test-react-app", "coverage/apps/my-test-react-app",
], ],
} }
@ -73,11 +73,11 @@ describe('vitest generator', () => {
appTree.read('apps/my-test-react-app/tsconfig.json')?.toString() ?? '{}' appTree.read('apps/my-test-react-app/tsconfig.json')?.toString() ?? '{}'
); );
expect(tsconfig.references).toMatchInlineSnapshot(` expect(tsconfig.references).toMatchInlineSnapshot(`
Array [ [
Object { {
"path": "./tsconfig.app.json", "path": "./tsconfig.app.json",
}, },
Object { {
"path": "./tsconfig.spec.json", "path": "./tsconfig.spec.json",
}, },
] ]
@ -88,10 +88,10 @@ describe('vitest generator', () => {
'{}' '{}'
); );
expect(tsconfigSpec).toMatchInlineSnapshot(` expect(tsconfigSpec).toMatchInlineSnapshot(`
Object { {
"compilerOptions": Object { "compilerOptions": {
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"types": Array [ "types": [
"vitest/globals", "vitest/globals",
"vitest/importMeta", "vitest/importMeta",
"vite/client", "vite/client",
@ -99,7 +99,7 @@ describe('vitest generator', () => {
], ],
}, },
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"include": Array [ "include": [
"vite.config.ts", "vite.config.ts",
"src/**/*.test.ts", "src/**/*.test.ts",
"src/**/*.spec.ts", "src/**/*.spec.ts",
@ -123,7 +123,7 @@ describe('vitest generator', () => {
'{}' '{}'
); );
expect(tsconfig.compilerOptions.types).toMatchInlineSnapshot(` expect(tsconfig.compilerOptions.types).toMatchInlineSnapshot(`
Array [ [
"vitest/importMeta", "vitest/importMeta",
] ]
`); `);

View File

@ -18,14 +18,14 @@ describe('Update Report Directory Vitest Migration', () => {
updateReportDirectoryPlaceholders(tree); updateReportDirectoryPlaceholders(tree);
expect(readProjectConfiguration(tree, 'project-one').targets) expect(readProjectConfiguration(tree, 'project-one').targets)
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"test": Object { "test": {
"executor": "@nrwl/vite:test", "executor": "@nrwl/vite:test",
"options": Object { "options": {
"passWithNoTests": true, "passWithNoTests": true,
"reportsDirectory": "../../coverge/packages/project-one", "reportsDirectory": "../../coverge/packages/project-one",
}, },
"outputs": Array [ "outputs": [
"coverage/packages/project-one", "coverage/packages/project-one",
], ],
}, },
@ -33,25 +33,25 @@ describe('Update Report Directory Vitest Migration', () => {
`); `);
expect(readProjectConfiguration(tree, 'project-two').targets) expect(readProjectConfiguration(tree, 'project-two').targets)
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
Object { {
"custom-test": Object { "custom-test": {
"configurations": Object { "configurations": {
"ci": Object { "ci": {
"reportsDirectory": "coverge/project-two", "reportsDirectory": "coverge/project-two",
}, },
}, },
"executor": "@nrwl/vite:test", "executor": "@nrwl/vite:test",
"options": Object { "options": {
"passWithNoTests": true, "passWithNoTests": true,
}, },
"outputs": Array [ "outputs": [
"coverage/project-two", "coverage/project-two",
"dist/coverage/else.txt", "dist/coverage/else.txt",
], ],
}, },
"test": Object { "test": {
"executor": "@nrwl/vite:test", "executor": "@nrwl/vite:test",
"options": Object { "options": {
"passWithNoTests": true, "passWithNoTests": true,
"reportsDirectory": "coverge/project-two", "reportsDirectory": "coverge/project-two",
}, },

View File

@ -4,7 +4,7 @@ exports[`ensureViteConfigIsCorrect should add build and test options if defineCo
"import dts from 'vite-plugin-dts'; "import dts from 'vite-plugin-dts';
import { join } from 'path'; import { join } from 'path';
/// <reference types=\\"vitest\\" /> /// <reference types="vitest" />
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
import viteTsConfigPaths from 'vite-tsconfig-paths'; import viteTsConfigPaths from 'vite-tsconfig-paths';
@ -25,7 +25,7 @@ import { join } from 'path';
}, },
rollupOptions: { rollupOptions: {
// External packages that should not be bundled into your library. // External packages that should not be bundled into your library.
external: [\\"'react', 'react-dom', 'react/jsx-runtime'\\"] external: ["'react', 'react-dom', 'react/jsx-runtime'"]
} }
},plugins: [ },plugins: [
dts({ dts({
@ -72,7 +72,7 @@ import { defineConfig } from 'vite';
}, },
rollupOptions: { rollupOptions: {
// External packages that should not be bundled into your library. // External packages that should not be bundled into your library.
external: [\\"'react', 'react-dom', 'react/jsx-runtime'\\"] external: ["'react', 'react-dom', 'react/jsx-runtime'"]
} }
},plugins: [ },plugins: [
...[ ...[
@ -124,7 +124,7 @@ import { defineConfig } from 'vite';
}, },
rollupOptions: { rollupOptions: {
// External packages that should not be bundled into your library. // External packages that should not be bundled into your library.
external: [\\"'react', 'react-dom', 'react/jsx-runtime'\\"] external: ["'react', 'react-dom', 'react/jsx-runtime'"]
} }
},plugins: [ },plugins: [
...[ ...[
@ -175,7 +175,7 @@ import { defineConfig } from 'vite';
}, },
rollupOptions: { rollupOptions: {
// External packages that should not be bundled into your library. // External packages that should not be bundled into your library.
external: [\\"'react', 'react-dom', 'react/jsx-runtime'\\"] external: ["'react', 'react-dom', 'react/jsx-runtime'"]
} }
},test: { },test: {
globals: true, globals: true,
@ -204,7 +204,7 @@ import { defineConfig } from 'vite';
exports[`ensureViteConfigIsCorrect should add build options if it is using conditional config - do nothing for test 1`] = ` exports[`ensureViteConfigIsCorrect should add build options if it is using conditional config - do nothing for test 1`] = `
" "
/// <reference types=\\"vitest\\" /> /// <reference types="vitest" />
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
export default defineConfig(({ command, mode, ssrBuild }) => { export default defineConfig(({ command, mode, ssrBuild }) => {
if (command === 'serve') { if (command === 'serve') {
@ -218,7 +218,7 @@ exports[`ensureViteConfigIsCorrect should add build options if it is using condi
...{ ...{
my: 'option', my: 'option',
}, },
...\\"\\\\n // Configuration for building your library.\\\\n // See: https://vitejs.dev/guide/build.html#library-mode\\\\n build: {\\\\n lib: {\\\\n // Could also be a dictionary or array of multiple entry points.\\\\n entry: 'src/index.ts',\\\\n name: 'my-app',\\\\n fileName: 'index',\\\\n // Change this to the formats you want to support.\\\\n // Don't forgot to update your package.json as well.\\\\n formats: ['es', 'cjs']\\\\n },\\\\n rollupOptions: {\\\\n // External packages that should not be bundled into your library.\\\\n external: [\\\\\\"'react', 'react-dom', 'react/jsx-runtime'\\\\\\"]\\\\n }\\\\n },\\" ..."\\n // Configuration for building your library.\\n // See: https://vitejs.dev/guide/build.html#library-mode\\n build: {\\n lib: {\\n // Could also be a dictionary or array of multiple entry points.\\n entry: 'src/index.ts',\\n name: 'my-app',\\n fileName: 'index',\\n // Change this to the formats you want to support.\\n // Don't forgot to update your package.json as well.\\n formats: ['es', 'cjs']\\n },\\n rollupOptions: {\\n // External packages that should not be bundled into your library.\\n external: [\\"'react', 'react-dom', 'react/jsx-runtime'\\"]\\n }\\n },"
} }
} }
}) })
@ -260,7 +260,7 @@ import { defineConfig } from 'vite';
...{ ...{
my: 'option', my: 'option',
}, },
...{\\"lib\\":{\\"entry\\":\\"src/index.ts\\",\\"name\\":\\"my-app\\",\\"fileName\\":\\"index\\",\\"formats\\":[\\"es\\",\\"cjs\\"]},\\"rollupOptions\\":{\\"external\\":[\\"'react', 'react-dom', 'react/jsx-runtime'\\"]}} ...{"lib":{"entry":"src/index.ts","name":"my-app","fileName":"index","formats":["es","cjs"]},"rollupOptions":{"external":["'react', 'react-dom', 'react/jsx-runtime'"]}}
} }
}); });
@ -271,7 +271,7 @@ exports[`ensureViteConfigIsCorrect should not do anything if cannot understand s
exports[`ensureViteConfigIsCorrect should not do anything if project has everything setup already 1`] = ` exports[`ensureViteConfigIsCorrect should not do anything if project has everything setup already 1`] = `
" "
/// <reference types=\\"vitest\\" /> /// <reference types="vitest" />
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
import viteTsConfigPaths from 'vite-tsconfig-paths'; import viteTsConfigPaths from 'vite-tsconfig-paths';
@ -347,14 +347,14 @@ import { defineConfig } from 'vite';
...{ ...{
my: 'option', my: 'option',
}, },
...{\\"globals\\":true,\\"cache\\":{\\"dir\\":\\"../node_modules/.vitest\\"},\\"environment\\":\\"jsdom\\",\\"include\\":[\\"src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}\\"]} ...{"globals":true,"cache":{"dir":"../node_modules/.vitest"},"environment":"jsdom","include":["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"]}
}, },
build: { build: {
...{ ...{
my: 'option', my: 'option',
}, },
...{\\"lib\\":{\\"entry\\":\\"src/index.ts\\",\\"name\\":\\"my-app\\",\\"fileName\\":\\"index\\",\\"formats\\":[\\"es\\",\\"cjs\\"]},\\"rollupOptions\\":{\\"external\\":[\\"'react', 'react-dom', 'react/jsx-runtime'\\"]}} ...{"lib":{"entry":"src/index.ts","name":"my-app","fileName":"index","formats":["es","cjs"]},"rollupOptions":{"external":["'react', 'react-dom', 'react/jsx-runtime'"]}}
} }
}); });

View File

@ -78,18 +78,18 @@ describe('app', () => {
expect(tree.exists('apps/my-app-e2e/cypress.config.ts')).toBeTruthy(); expect(tree.exists('apps/my-app-e2e/cypress.config.ts')).toBeTruthy();
const tsconfigE2E = readJson(tree, 'apps/my-app-e2e/tsconfig.json'); const tsconfigE2E = readJson(tree, 'apps/my-app-e2e/tsconfig.json');
expect(tsconfigE2E).toMatchInlineSnapshot(` expect(tsconfigE2E).toMatchInlineSnapshot(`
Object { {
"compilerOptions": Object { "compilerOptions": {
"allowJs": true, "allowJs": true,
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"sourceMap": false, "sourceMap": false,
"types": Array [ "types": [
"cypress", "cypress",
"node", "node",
], ],
}, },
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"include": Array [ "include": [
"src/**/*.ts", "src/**/*.ts",
"src/**/*.js", "src/**/*.js",
"cypress.config.ts", "cypress.config.ts",
@ -99,36 +99,36 @@ describe('app', () => {
const eslintJson = readJson(tree, '/apps/my-app/.eslintrc.json'); const eslintJson = readJson(tree, '/apps/my-app/.eslintrc.json');
expect(eslintJson).toMatchInlineSnapshot(` expect(eslintJson).toMatchInlineSnapshot(`
Object { {
"extends": Array [ "extends": [
"../../.eslintrc.json", "../../.eslintrc.json",
], ],
"ignorePatterns": Array [ "ignorePatterns": [
"!**/*", "!**/*",
], ],
"overrides": Array [ "overrides": [
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.ts", "*.ts",
"*.tsx", "*.tsx",
], ],
"rules": Object {}, "rules": {},
}, },
Object { {
"files": Array [ "files": [
"*.js", "*.js",
"*.jsx", "*.jsx",
], ],
"rules": Object {}, "rules": {},
}, },
], ],
} }
@ -437,14 +437,14 @@ describe('app', () => {
const projectConfiguration = readProjectConfiguration(tree, 'my-app'); const projectConfiguration = readProjectConfiguration(tree, 'my-app');
expect(projectConfiguration.targets.test).toBeUndefined(); expect(projectConfiguration.targets.test).toBeUndefined();
expect(projectConfiguration.targets.lint).toMatchInlineSnapshot(` expect(projectConfiguration.targets.lint).toMatchInlineSnapshot(`
Object { {
"executor": "@nrwl/linter:eslint", "executor": "@nrwl/linter:eslint",
"options": Object { "options": {
"lintFilePatterns": Array [ "lintFilePatterns": [
"apps/my-app/**/*.ts", "apps/my-app/**/*.ts",
], ],
}, },
"outputs": Array [ "outputs": [
"{options.outputFile}", "{options.outputFile}",
], ],
} }
@ -462,7 +462,7 @@ describe('app', () => {
readJson(tree, 'apps/my-cool-app/tsconfig.spec.json').compilerOptions readJson(tree, 'apps/my-cool-app/tsconfig.spec.json').compilerOptions
.types .types
).toMatchInlineSnapshot(` ).toMatchInlineSnapshot(`
Array [ [
"jest", "jest",
"node", "node",
] ]
@ -488,7 +488,7 @@ describe('app', () => {
readJson(tree, 'apps/my-vite-app/tsconfig.spec.json').compilerOptions readJson(tree, 'apps/my-vite-app/tsconfig.spec.json').compilerOptions
.types .types
).toMatchInlineSnapshot(` ).toMatchInlineSnapshot(`
Array [ [
"jest", "jest",
"node", "node",
] ]
@ -511,7 +511,7 @@ describe('app', () => {
readJson(tree, 'apps/my-webpack-app/tsconfig.spec.json').compilerOptions readJson(tree, 'apps/my-webpack-app/tsconfig.spec.json').compilerOptions
.types .types
).toMatchInlineSnapshot(` ).toMatchInlineSnapshot(`
Array [ [
"vitest/globals", "vitest/globals",
"vitest/importMeta", "vitest/importMeta",
"vite/client", "vite/client",
@ -549,7 +549,7 @@ describe('app', () => {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
transform: { transform: {
'^.+\\\\\\\\.[tj]s$': 'babel-jest', '^.+\\\\.[tj]s$': 'babel-jest',
}, },
moduleFileExtensions: ['ts', 'js', 'html'], moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/apps/my-app', coverageDirectory: '../../coverage/apps/my-app',
@ -572,7 +572,7 @@ describe('app', () => {
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
transform: { transform: {
'^.+\\\\\\\\.[tj]s$': '@swc/jest', '^.+\\\\.[tj]s$': '@swc/jest',
}, },
moduleFileExtensions: ['ts', 'js', 'html'], moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/apps/my-app', coverageDirectory: '../../coverage/apps/my-app',

Some files were not shown because too many files have changed in this diff Show More