chore(misc): update snapshots to latest format (#16276)
This commit is contained in:
parent
a42cc57354
commit
85b3315b34
@ -16,14 +16,4 @@ export default {
|
||||
modulePathIgnorePatterns: [
|
||||
'/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 },
|
||||
};
|
||||
|
||||
@ -14,14 +14,4 @@ module.exports = {
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageReporters: ['html'],
|
||||
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 },
|
||||
};
|
||||
|
||||
@ -11,14 +11,4 @@ module.exports = {
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
coverageDirectory: '../../coverage/nx-dev/nx-dev',
|
||||
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 },
|
||||
};
|
||||
|
||||
@ -1,34 +1,34 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`addLinting generator should correctly generate the .eslintrc.json file 1`] = `
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"extends": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular",
|
||||
"plugin:@angular-eslint/template/process-inline-templates",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.ts",
|
||||
],
|
||||
"rules": Object {
|
||||
"@angular-eslint/component-selector": Array [
|
||||
"rules": {
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "my-org",
|
||||
"style": "kebab-case",
|
||||
"type": "element",
|
||||
},
|
||||
],
|
||||
"@angular-eslint/directive-selector": Array [
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "myOrg",
|
||||
"style": "camelCase",
|
||||
"type": "attribute",
|
||||
@ -36,48 +36,48 @@ Object {
|
||||
],
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular-template",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.html",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`addLinting generator support angular v14 should correctly generate the .eslintrc.json file 1`] = `
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"extends": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular",
|
||||
"plugin:@angular-eslint/template/process-inline-templates",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.ts",
|
||||
],
|
||||
"rules": Object {
|
||||
"@angular-eslint/component-selector": Array [
|
||||
"rules": {
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "my-org",
|
||||
"style": "kebab-case",
|
||||
"type": "element",
|
||||
},
|
||||
],
|
||||
"@angular-eslint/directive-selector": Array [
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "myOrg",
|
||||
"style": "camelCase",
|
||||
"type": "attribute",
|
||||
@ -85,14 +85,14 @@ Object {
|
||||
],
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular-template",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.html",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@ -335,14 +335,14 @@ describe('AppComponent', () => {
|
||||
`;
|
||||
|
||||
exports[`app --strict should enable strict type checking: app tsconfig.json 1`] = `
|
||||
Object {
|
||||
"angularCompilerOptions": Object {
|
||||
{
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true,
|
||||
},
|
||||
"compilerOptions": Object {
|
||||
"compilerOptions": {
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitOverride": true,
|
||||
@ -353,16 +353,16 @@ Object {
|
||||
"useDefineForClassFields": false,
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": Array [],
|
||||
"include": Array [],
|
||||
"references": Array [
|
||||
Object {
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.app.json",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"path": "./tsconfig.editor.json",
|
||||
},
|
||||
],
|
||||
@ -370,8 +370,8 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`app --strict should enable strict type checking: e2e tsconfig.json 1`] = `
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
@ -381,13 +381,13 @@ Object {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"sourceMap": false,
|
||||
"strict": true,
|
||||
"types": Array [
|
||||
"types": [
|
||||
"cypress",
|
||||
"node",
|
||||
],
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"include": Array [
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.js",
|
||||
"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 nested should create project configs 1`] = `
|
||||
Object {
|
||||
{
|
||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "my-dir-my-app",
|
||||
"prefix": "proj",
|
||||
"projectType": "application",
|
||||
"root": "apps/my-dir/my-app",
|
||||
"sourceRoot": "apps/my-dir/my-app/src",
|
||||
"tags": Array [],
|
||||
"targets": Object {
|
||||
"build": Object {
|
||||
"configurations": Object {
|
||||
"development": Object {
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"configurations": {
|
||||
"development": {
|
||||
"buildOptimizer": false,
|
||||
"extractLicenses": false,
|
||||
"namedChunks": true,
|
||||
@ -417,14 +417,14 @@ Object {
|
||||
"sourceMap": true,
|
||||
"vendorChunk": true,
|
||||
},
|
||||
"production": Object {
|
||||
"budgets": Array [
|
||||
Object {
|
||||
"production": {
|
||||
"budgets": [
|
||||
{
|
||||
"maximumError": "1mb",
|
||||
"maximumWarning": "500kb",
|
||||
"type": "initial",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"maximumError": "4kb",
|
||||
"maximumWarning": "2kb",
|
||||
"type": "anyComponentStyle",
|
||||
@ -435,76 +435,76 @@ Object {
|
||||
},
|
||||
"defaultConfiguration": "production",
|
||||
"executor": "@angular-devkit/build-angular:browser",
|
||||
"options": Object {
|
||||
"assets": Array [
|
||||
"options": {
|
||||
"assets": [
|
||||
"apps/my-dir/my-app/src/favicon.ico",
|
||||
"apps/my-dir/my-app/src/assets",
|
||||
],
|
||||
"index": "apps/my-dir/my-app/src/index.html",
|
||||
"main": "apps/my-dir/my-app/src/main.ts",
|
||||
"outputPath": "dist/apps/my-dir/my-app",
|
||||
"polyfills": Array [
|
||||
"polyfills": [
|
||||
"zone.js",
|
||||
],
|
||||
"scripts": Array [],
|
||||
"styles": Array [
|
||||
"scripts": [],
|
||||
"styles": [
|
||||
"apps/my-dir/my-app/src/styles.css",
|
||||
],
|
||||
"tsConfig": "apps/my-dir/my-app/tsconfig.app.json",
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputPath}",
|
||||
],
|
||||
},
|
||||
"extract-i18n": Object {
|
||||
"extract-i18n": {
|
||||
"executor": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"browserTarget": "my-dir-my-app:build",
|
||||
},
|
||||
},
|
||||
"lint": Object {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-dir/my-app/**/*.ts",
|
||||
"apps/my-dir/my-app/**/*.html",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
"serve": Object {
|
||||
"configurations": Object {
|
||||
"development": Object {
|
||||
"serve": {
|
||||
"configurations": {
|
||||
"development": {
|
||||
"browserTarget": "my-dir-my-app:build:development",
|
||||
},
|
||||
"production": Object {
|
||||
"production": {
|
||||
"browserTarget": "my-dir-my-app:build:production",
|
||||
},
|
||||
},
|
||||
"defaultConfiguration": "development",
|
||||
"executor": "@angular-devkit/build-angular:dev-server",
|
||||
},
|
||||
"serve-static": Object {
|
||||
"serve-static": {
|
||||
"executor": "@nrwl/web:file-server",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"buildTarget": "my-dir-my-app:build",
|
||||
},
|
||||
},
|
||||
"test": Object {
|
||||
"configurations": Object {
|
||||
"ci": Object {
|
||||
"test": {
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"ci": true,
|
||||
"codeCoverage": true,
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/jest:jest",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"jestConfig": "apps/my-dir/my-app/jest.config.ts",
|
||||
"passWithNoTests": true,
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{workspaceRoot}/coverage/{projectRoot}",
|
||||
],
|
||||
},
|
||||
@ -513,41 +513,41 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`app nested should create project configs 2`] = `
|
||||
Object {
|
||||
{
|
||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||
"implicitDependencies": Array [
|
||||
"implicitDependencies": [
|
||||
"my-dir-my-app",
|
||||
],
|
||||
"name": "my-dir-my-app-e2e",
|
||||
"projectType": "application",
|
||||
"root": "apps/my-dir/my-app-e2e",
|
||||
"sourceRoot": "apps/my-dir/my-app-e2e/src",
|
||||
"tags": Array [],
|
||||
"targets": Object {
|
||||
"e2e": Object {
|
||||
"configurations": Object {
|
||||
"ci": Object {
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"e2e": {
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"devServerTarget": "my-dir-my-app:serve-static",
|
||||
},
|
||||
"production": Object {
|
||||
"production": {
|
||||
"devServerTarget": "my-dir-my-app:serve:production",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/my-dir/my-app-e2e/cypress.config.ts",
|
||||
"devServerTarget": "my-dir-my-app:serve:development",
|
||||
"testingType": "e2e",
|
||||
},
|
||||
},
|
||||
"lint": Object {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-dir/my-app-e2e/**/*.{js,ts}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
@ -556,18 +556,18 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`app not nested should create project configs 1`] = `
|
||||
Object {
|
||||
{
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "my-app",
|
||||
"prefix": "proj",
|
||||
"projectType": "application",
|
||||
"root": "apps/my-app",
|
||||
"sourceRoot": "apps/my-app/src",
|
||||
"tags": Array [],
|
||||
"targets": Object {
|
||||
"build": Object {
|
||||
"configurations": Object {
|
||||
"development": Object {
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"configurations": {
|
||||
"development": {
|
||||
"buildOptimizer": false,
|
||||
"extractLicenses": false,
|
||||
"namedChunks": true,
|
||||
@ -575,14 +575,14 @@ Object {
|
||||
"sourceMap": true,
|
||||
"vendorChunk": true,
|
||||
},
|
||||
"production": Object {
|
||||
"budgets": Array [
|
||||
Object {
|
||||
"production": {
|
||||
"budgets": [
|
||||
{
|
||||
"maximumError": "1mb",
|
||||
"maximumWarning": "500kb",
|
||||
"type": "initial",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"maximumError": "4kb",
|
||||
"maximumWarning": "2kb",
|
||||
"type": "anyComponentStyle",
|
||||
@ -593,76 +593,76 @@ Object {
|
||||
},
|
||||
"defaultConfiguration": "production",
|
||||
"executor": "@angular-devkit/build-angular:browser",
|
||||
"options": Object {
|
||||
"assets": Array [
|
||||
"options": {
|
||||
"assets": [
|
||||
"apps/my-app/src/favicon.ico",
|
||||
"apps/my-app/src/assets",
|
||||
],
|
||||
"index": "apps/my-app/src/index.html",
|
||||
"main": "apps/my-app/src/main.ts",
|
||||
"outputPath": "dist/apps/my-app",
|
||||
"polyfills": Array [
|
||||
"polyfills": [
|
||||
"zone.js",
|
||||
],
|
||||
"scripts": Array [],
|
||||
"styles": Array [
|
||||
"scripts": [],
|
||||
"styles": [
|
||||
"apps/my-app/src/styles.css",
|
||||
],
|
||||
"tsConfig": "apps/my-app/tsconfig.app.json",
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputPath}",
|
||||
],
|
||||
},
|
||||
"extract-i18n": Object {
|
||||
"extract-i18n": {
|
||||
"executor": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"browserTarget": "my-app:build",
|
||||
},
|
||||
},
|
||||
"lint": Object {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-app/**/*.ts",
|
||||
"apps/my-app/**/*.html",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
"serve": Object {
|
||||
"configurations": Object {
|
||||
"development": Object {
|
||||
"serve": {
|
||||
"configurations": {
|
||||
"development": {
|
||||
"browserTarget": "my-app:build:development",
|
||||
},
|
||||
"production": Object {
|
||||
"production": {
|
||||
"browserTarget": "my-app:build:production",
|
||||
},
|
||||
},
|
||||
"defaultConfiguration": "development",
|
||||
"executor": "@angular-devkit/build-angular:dev-server",
|
||||
},
|
||||
"serve-static": Object {
|
||||
"serve-static": {
|
||||
"executor": "@nrwl/web:file-server",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"buildTarget": "my-app:build",
|
||||
},
|
||||
},
|
||||
"test": Object {
|
||||
"configurations": Object {
|
||||
"ci": Object {
|
||||
"test": {
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"ci": true,
|
||||
"codeCoverage": true,
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/jest:jest",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"jestConfig": "apps/my-app/jest.config.ts",
|
||||
"passWithNoTests": true,
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{workspaceRoot}/coverage/{projectRoot}",
|
||||
],
|
||||
},
|
||||
@ -671,41 +671,41 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`app not nested should create project configs 2`] = `
|
||||
Object {
|
||||
{
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"implicitDependencies": Array [
|
||||
"implicitDependencies": [
|
||||
"my-app",
|
||||
],
|
||||
"name": "my-app-e2e",
|
||||
"projectType": "application",
|
||||
"root": "apps/my-app-e2e",
|
||||
"sourceRoot": "apps/my-app-e2e/src",
|
||||
"tags": Array [],
|
||||
"targets": Object {
|
||||
"e2e": Object {
|
||||
"configurations": Object {
|
||||
"ci": Object {
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"e2e": {
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"devServerTarget": "my-app:serve-static",
|
||||
},
|
||||
"production": Object {
|
||||
"production": {
|
||||
"devServerTarget": "my-app:serve:production",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/my-app-e2e/cypress.config.ts",
|
||||
"devServerTarget": "my-app:serve:development",
|
||||
"testingType": "e2e",
|
||||
},
|
||||
},
|
||||
"lint": Object {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-app-e2e/**/*.{js,ts}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
@ -714,8 +714,8 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`app not nested should generate files: e2e tsconfig.json 1`] = `
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
@ -725,13 +725,13 @@ Object {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"sourceMap": false,
|
||||
"strict": true,
|
||||
"types": Array [
|
||||
"types": [
|
||||
"cypress",
|
||||
"node",
|
||||
],
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"include": Array [
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.js",
|
||||
"cypress.config.ts",
|
||||
@ -740,35 +740,35 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`app not nested should generate files: tsconfig.app.json 1`] = `
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"types": Array [],
|
||||
"types": [],
|
||||
},
|
||||
"exclude": Array [
|
||||
"exclude": [
|
||||
"jest.config.ts",
|
||||
"src/**/*.test.ts",
|
||||
"src/**/*.spec.ts",
|
||||
],
|
||||
"extends": "./tsconfig.json",
|
||||
"files": Array [
|
||||
"files": [
|
||||
"src/main.ts",
|
||||
],
|
||||
"include": Array [
|
||||
"include": [
|
||||
"src/**/*.d.ts",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`app not nested should generate files: tsconfig.json 1`] = `
|
||||
Object {
|
||||
"angularCompilerOptions": Object {
|
||||
{
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true,
|
||||
},
|
||||
"compilerOptions": Object {
|
||||
"compilerOptions": {
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitOverride": true,
|
||||
@ -779,16 +779,16 @@ Object {
|
||||
"useDefineForClassFields": false,
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": Array [],
|
||||
"include": Array [],
|
||||
"references": Array [
|
||||
Object {
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.app.json",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"path": "./tsconfig.editor.json",
|
||||
},
|
||||
],
|
||||
|
||||
@ -462,29 +462,29 @@ describe('app', () => {
|
||||
await generateApp(appTree, 'myApp', { linter: Linter.EsLint });
|
||||
expect(readProjectConfiguration(appTree, 'my-app').targets.lint)
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-app/**/*.ts",
|
||||
"apps/my-app/**/*.html",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
}
|
||||
`);
|
||||
expect(readProjectConfiguration(appTree, 'my-app-e2e').targets.lint)
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-app-e2e/**/*.{js,ts}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
}
|
||||
@ -496,34 +496,34 @@ describe('app', () => {
|
||||
|
||||
const eslintConfig = readJson(appTree, 'apps/my-app/.eslintrc.json');
|
||||
expect(eslintConfig).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"extends": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular",
|
||||
"plugin:@angular-eslint/template/process-inline-templates",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.ts",
|
||||
],
|
||||
"rules": Object {
|
||||
"@angular-eslint/component-selector": Array [
|
||||
"rules": {
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "proj",
|
||||
"style": "kebab-case",
|
||||
"type": "element",
|
||||
},
|
||||
],
|
||||
"@angular-eslint/directive-selector": Array [
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "proj",
|
||||
"style": "camelCase",
|
||||
"type": "attribute",
|
||||
@ -531,14 +531,14 @@ describe('app', () => {
|
||||
],
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular-template",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.html",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`writeNewWebpackConfig should convert config that is both remote and host correctly 1`] = `
|
||||
Array [
|
||||
[
|
||||
"const { withModuleFederation } = require('@nrwl/angular/module-federation');
|
||||
const config = require('./module-federation.config');
|
||||
module.exports = withModuleFederation(config);",
|
||||
@ -17,7 +17,7 @@ Array [
|
||||
`;
|
||||
|
||||
exports[`writeNewWebpackConfig should convert config that is neither remote and host correctly 1`] = `
|
||||
Array [
|
||||
[
|
||||
"const { withModuleFederation } = require('@nrwl/angular/module-federation');
|
||||
const config = require('./module-federation.config');
|
||||
module.exports = withModuleFederation(config);",
|
||||
@ -29,7 +29,7 @@ Array [
|
||||
`;
|
||||
|
||||
exports[`writeNewWebpackConfig should convert host config correctly 1`] = `
|
||||
Array [
|
||||
[
|
||||
"const { withModuleFederation } = require('@nrwl/angular/module-federation');
|
||||
const config = require('./module-federation.config');
|
||||
module.exports = withModuleFederation(config);",
|
||||
@ -42,7 +42,7 @@ Array [
|
||||
`;
|
||||
|
||||
exports[`writeNewWebpackConfig should convert remote config correctly 1`] = `
|
||||
Array [
|
||||
[
|
||||
"const { withModuleFederation } = require('@nrwl/angular/module-federation');
|
||||
const config = require('./module-federation.config');
|
||||
module.exports = withModuleFederation(config);",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -161,24 +161,24 @@ export const appRoutes: Route[] = [
|
||||
`;
|
||||
|
||||
exports[`Host App Generator --ssr should generate the correct files 9`] = `
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"development": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"development": {
|
||||
"extractLicenses": false,
|
||||
"optimization": false,
|
||||
"sourceMap": true,
|
||||
},
|
||||
"production": Object {
|
||||
"production": {
|
||||
"outputHashing": "media",
|
||||
},
|
||||
},
|
||||
"defaultConfiguration": "production",
|
||||
"dependsOn": Array [
|
||||
"dependsOn": [
|
||||
"build",
|
||||
],
|
||||
"executor": "@nrwl/angular:webpack-server",
|
||||
"options": Object {
|
||||
"customWebpackConfig": Object {
|
||||
"options": {
|
||||
"customWebpackConfig": {
|
||||
"path": "apps/test/webpack.server.config.js",
|
||||
},
|
||||
"main": "apps/test/server.ts",
|
||||
@ -189,13 +189,13 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`Host App Generator --ssr should generate the correct files 10`] = `
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"development": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"development": {
|
||||
"browserTarget": "test:build:development",
|
||||
"serverTarget": "test:server:development",
|
||||
},
|
||||
"production": Object {
|
||||
"production": {
|
||||
"browserTarget": "test:build:production",
|
||||
"serverTarget": "test:server:production",
|
||||
},
|
||||
|
||||
@ -64,10 +64,10 @@ describe('Host App Generator', () => {
|
||||
).toContain(`'remote1', 'remote2'`);
|
||||
expect(tree.read('apps/host-app/src/app/app.component.html', 'utf-8'))
|
||||
.toMatchInlineSnapshot(`
|
||||
"<ul class=\\"remote-menu\\">
|
||||
<li><a routerLink=\\"/\\">Home</a></li>
|
||||
<li><a routerLink=\\"remote1\\">Remote1</a></li>
|
||||
<li><a routerLink=\\"remote2\\">Remote2</a></li>
|
||||
"<ul class="remote-menu">
|
||||
<li><a routerLink="/">Home</a></li>
|
||||
<li><a routerLink="remote1">Remote1</a></li>
|
||||
<li><a routerLink="remote2">Remote2</a></li>
|
||||
</ul>
|
||||
<router-outlet></router-outlet>
|
||||
"
|
||||
|
||||
@ -1107,15 +1107,15 @@ describe('lib', () => {
|
||||
expect(tree.exists('libs/my-lib/tslint.json')).toBe(false);
|
||||
expect(readProjectConfiguration(tree, 'my-lib').targets['lint'])
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"libs/my-lib/**/*.ts",
|
||||
"libs/my-lib/**/*.html",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
}
|
||||
@ -1130,34 +1130,34 @@ describe('lib', () => {
|
||||
|
||||
const eslintConfig = readJson(tree, 'libs/my-lib/.eslintrc.json');
|
||||
expect(eslintConfig).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"extends": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular",
|
||||
"plugin:@angular-eslint/template/process-inline-templates",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.ts",
|
||||
],
|
||||
"rules": Object {
|
||||
"@angular-eslint/component-selector": Array [
|
||||
"rules": {
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "proj",
|
||||
"style": "kebab-case",
|
||||
"type": "element",
|
||||
},
|
||||
],
|
||||
"@angular-eslint/directive-selector": Array [
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "proj",
|
||||
"style": "camelCase",
|
||||
"type": "attribute",
|
||||
@ -1165,14 +1165,14 @@ describe('lib', () => {
|
||||
],
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular-template",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.html",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
@ -1369,7 +1369,7 @@ describe('lib', () => {
|
||||
tree.read('libs/my-lib/src/lib/lib.routes.ts', 'utf-8')
|
||||
).toMatchSnapshot();
|
||||
expect(tree.children('libs/my-lib/src/lib')).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
[
|
||||
"lib.routes.ts",
|
||||
"my-lib.component.css",
|
||||
"my-lib.component.html",
|
||||
@ -1378,7 +1378,7 @@ describe('lib', () => {
|
||||
]
|
||||
`);
|
||||
expect(tree.children('libs/my-lib/src')).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
[
|
||||
"index.ts",
|
||||
"lib",
|
||||
"test-setup.ts",
|
||||
|
||||
@ -1,34 +1,34 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`workspace move to nx layout should create a root eslint config 1`] = `
|
||||
Object {
|
||||
"ignorePatterns": Array [
|
||||
{
|
||||
"ignorePatterns": [
|
||||
"**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"extends": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@angular-eslint/recommended",
|
||||
"plugin:@angular-eslint/template/process-inline-templates",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.ts",
|
||||
],
|
||||
"parserOptions": Object {
|
||||
"parserOptions": {
|
||||
"createDefaultProgram": true,
|
||||
},
|
||||
"rules": Object {
|
||||
"@angular-eslint/component-selector": Array [
|
||||
"rules": {
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "app",
|
||||
"style": "kebab-case",
|
||||
"type": "element",
|
||||
},
|
||||
],
|
||||
"@angular-eslint/directive-selector": Array [
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "app",
|
||||
"style": "camelCase",
|
||||
"type": "attribute",
|
||||
@ -36,30 +36,30 @@ Object {
|
||||
],
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@angular-eslint/template/recommended",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.html",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {
|
||||
"@nrwl/nx/enforce-module-boundaries": Array [
|
||||
"rules": {
|
||||
"@nrwl/nx/enforce-module-boundaries": [
|
||||
"error",
|
||||
Object {
|
||||
"allow": Array [],
|
||||
"depConstraints": Array [
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"allow": [],
|
||||
"depConstraints": [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"*",
|
||||
],
|
||||
"sourceTag": "*",
|
||||
@ -71,7 +71,7 @@ Object {
|
||||
},
|
||||
},
|
||||
],
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"@nrwl/nx",
|
||||
],
|
||||
"root": true,
|
||||
@ -79,60 +79,60 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`workspace move to nx layout should create nx.json 1`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"defaultProject": "myApp",
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
"!{projectRoot}/tsconfig.spec.json",
|
||||
"!{projectRoot}/**/*.spec.[jt]s",
|
||||
"!{projectRoot}/karma.conf.js",
|
||||
"!{projectRoot}/.eslintrc.json",
|
||||
],
|
||||
"sharedGlobals": Array [],
|
||||
"sharedGlobals": [],
|
||||
},
|
||||
"npmScope": "my-org",
|
||||
"targetDefaults": Object {
|
||||
"build": Object {
|
||||
"dependsOn": Array [
|
||||
"targetDefaults": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build",
|
||||
],
|
||||
"inputs": Array [
|
||||
"inputs": [
|
||||
"production",
|
||||
"^production",
|
||||
],
|
||||
},
|
||||
"e2e": Object {
|
||||
"inputs": Array [
|
||||
"e2e": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
],
|
||||
},
|
||||
"lint": Object {
|
||||
"inputs": Array [
|
||||
"lint": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"{workspaceRoot}/.eslintrc.json",
|
||||
],
|
||||
},
|
||||
"test": Object {
|
||||
"inputs": Array [
|
||||
"test": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"{workspaceRoot}/karma.conf.js",
|
||||
],
|
||||
},
|
||||
},
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"test",
|
||||
"lint",
|
||||
@ -146,13 +146,13 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`workspace move to nx layout should update tsconfig.base.json if present 1`] = `
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": Object {},
|
||||
"paths": {},
|
||||
"rootDir": ".",
|
||||
},
|
||||
"exclude": Array [
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"tmp",
|
||||
],
|
||||
@ -160,13 +160,13 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`workspace move to nx layout should work if angular-cli workspace had tsconfig.base.json 1`] = `
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": Object {},
|
||||
"paths": {},
|
||||
"rootDir": ".",
|
||||
},
|
||||
"exclude": Array [
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"tmp",
|
||||
],
|
||||
|
||||
@ -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.`,
|
||||
]);
|
||||
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.`,
|
||||
]);
|
||||
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.`,
|
||||
]);
|
||||
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."`
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@ -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.`,
|
||||
]);
|
||||
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.`,
|
||||
]);
|
||||
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.`,
|
||||
]);
|
||||
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."`
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@ -252,13 +252,13 @@ describe('SuperUsers Selectors', () => {
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
expect(result).toBe(ERROR_MSG);
|
||||
|
||||
@ -190,24 +190,24 @@ export const remoteRoutes: Route[] = [
|
||||
`;
|
||||
|
||||
exports[`MF Remote App Generator --ssr should generate the correct files 11`] = `
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"development": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"development": {
|
||||
"extractLicenses": false,
|
||||
"optimization": false,
|
||||
"sourceMap": true,
|
||||
},
|
||||
"production": Object {
|
||||
"production": {
|
||||
"outputHashing": "media",
|
||||
},
|
||||
},
|
||||
"defaultConfiguration": "production",
|
||||
"dependsOn": Array [
|
||||
"dependsOn": [
|
||||
"build",
|
||||
],
|
||||
"executor": "@nrwl/angular:webpack-server",
|
||||
"options": Object {
|
||||
"customWebpackConfig": Object {
|
||||
"options": {
|
||||
"customWebpackConfig": {
|
||||
"path": "apps/test/webpack.server.config.js",
|
||||
},
|
||||
"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`] = `
|
||||
Object {
|
||||
"dependsOn": Array [
|
||||
{
|
||||
"dependsOn": [
|
||||
"build",
|
||||
"server",
|
||||
],
|
||||
"executor": "nx:run-commands",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"command": "PORT=4201 node dist/apps/test/server/main.js",
|
||||
},
|
||||
}
|
||||
|
||||
@ -1,23 +1,23 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`setupSSR should create the files correctly for ssr 1`] = `
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"development": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"development": {
|
||||
"extractLicenses": false,
|
||||
"optimization": false,
|
||||
"sourceMap": true,
|
||||
},
|
||||
"production": Object {
|
||||
"production": {
|
||||
"outputHashing": "media",
|
||||
},
|
||||
},
|
||||
"defaultConfiguration": "production",
|
||||
"dependsOn": Array [
|
||||
"dependsOn": [
|
||||
"build",
|
||||
],
|
||||
"executor": "@angular-devkit/build-angular:server",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"main": "apps/app1/server.ts",
|
||||
"outputPath": "dist/apps/app1/server",
|
||||
"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`] = `
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"development": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"development": {
|
||||
"extractLicenses": false,
|
||||
"optimization": false,
|
||||
"sourceMap": true,
|
||||
},
|
||||
"production": Object {
|
||||
"fileReplacements": Array [
|
||||
Object {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "apps/app1/src/environments/environment.ts",
|
||||
"with": "apps/app1/src/environments/environment.prod.ts",
|
||||
},
|
||||
@ -119,11 +119,11 @@ Object {
|
||||
},
|
||||
},
|
||||
"defaultConfiguration": "production",
|
||||
"dependsOn": Array [
|
||||
"dependsOn": [
|
||||
"build",
|
||||
],
|
||||
"executor": "@angular-devkit/build-angular:server",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"main": "apps/app1/server.ts",
|
||||
"outputPath": "dist/apps/app1/server",
|
||||
"tsConfig": "apps/app1/tsconfig.server.json",
|
||||
|
||||
@ -65,13 +65,13 @@ describe('setupSSR', () => {
|
||||
.toMatchInlineSnapshot(`
|
||||
"/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
\\"extends\\": \\"./tsconfig.app.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"outDir\\": \\"../../out-tsc/server\\",
|
||||
\\"target\\": \\"es2019\\",
|
||||
\\"types\\": [\\"node\\"]
|
||||
"extends": "./tsconfig.app.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/server",
|
||||
"target": "es2019",
|
||||
"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');
|
||||
expect(nxJson.tasksRunnerOptions).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
{
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"test",
|
||||
|
||||
@ -14,7 +14,7 @@ exports[`StorybookConfiguration generator should configure storybook to use webp
|
||||
`;
|
||||
|
||||
exports[`StorybookConfiguration generator should generate in the correct folder 1`] = `
|
||||
Array [
|
||||
[
|
||||
".eslintignore",
|
||||
".eslintrc.json",
|
||||
".gitignore",
|
||||
@ -146,7 +146,7 @@ Array [
|
||||
`;
|
||||
|
||||
exports[`StorybookConfiguration generator should generate the right files 1`] = `
|
||||
Array [
|
||||
[
|
||||
".eslintignore",
|
||||
".eslintrc.json",
|
||||
".gitignore",
|
||||
|
||||
@ -48,7 +48,7 @@ describe('exportScam', () => {
|
||||
// ASSERT
|
||||
const entryPointSource = tree.read(`libs/lib1/src/index.ts`, 'utf-8');
|
||||
expect(entryPointSource).toMatchInlineSnapshot(
|
||||
`"export * from \\"./lib/example/example.component\\";"`
|
||||
`"export * from "./lib/example/example.component";"`
|
||||
);
|
||||
});
|
||||
|
||||
@ -75,8 +75,8 @@ describe('exportScam', () => {
|
||||
// ASSERT
|
||||
const entryPointSource = tree.read(`libs/lib1/src/index.ts`, 'utf-8');
|
||||
expect(entryPointSource).toMatchInlineSnapshot(`
|
||||
"export * from \\"./lib/example/example.component\\";
|
||||
export * from \\"./lib/example/example.module\\";"
|
||||
"export * from "./lib/example/example.component";
|
||||
export * from "./lib/example/example.module";"
|
||||
`);
|
||||
});
|
||||
|
||||
@ -110,7 +110,7 @@ describe('exportScam', () => {
|
||||
'utf-8'
|
||||
);
|
||||
expect(entryPointSource).toMatchInlineSnapshot(
|
||||
`"export * from \\"./lib/example/example.component\\";"`
|
||||
`"export * from "./lib/example/example.component";"`
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -88,7 +88,7 @@ describe('webWorker generator', () => {
|
||||
`);
|
||||
expect(tree.read(`apps/${appName}/src/app/test-worker.worker.ts`, 'utf-8'))
|
||||
.toMatchInlineSnapshot(`
|
||||
"/// <reference lib=\\"webworker\\" />
|
||||
"/// <reference lib="webworker" />
|
||||
|
||||
addEventListener('message', ({ data }) => {
|
||||
const response = \`worker response to \${data}\`;
|
||||
|
||||
@ -21,18 +21,18 @@ describe('renameWebpackServer', () => {
|
||||
const serveTarget = readJson(tree, 'apps/remote/project.json').targets
|
||||
.serve;
|
||||
expect(serveTarget).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"development": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"development": {
|
||||
"browserTarget": "remote:build:development",
|
||||
},
|
||||
"production": Object {
|
||||
"production": {
|
||||
"browserTarget": "remote:build:production",
|
||||
},
|
||||
},
|
||||
"defaultConfiguration": "development",
|
||||
"executor": "@nrwl/angular:webpack-dev-server",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"port": 4201,
|
||||
"publicHost": "http://localhost:4201",
|
||||
},
|
||||
|
||||
@ -44,30 +44,30 @@ describe('15.0.0 migration (add-karma-inputs)', () => {
|
||||
|
||||
const updated = readNxJson(tree);
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
"!{projectRoot}/**/*.spec.[jt]s",
|
||||
"!{projectRoot}/tsconfig.spec.json",
|
||||
"!{projectRoot}/karma.conf.js",
|
||||
],
|
||||
"sharedGlobals": Array [],
|
||||
"sharedGlobals": [],
|
||||
},
|
||||
"targetDefaults": Object {
|
||||
"test": Object {
|
||||
"inputs": Array [
|
||||
"targetDefaults": {
|
||||
"test": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"{workspaceRoot}/karma.conf.js",
|
||||
],
|
||||
},
|
||||
"test2": Object {
|
||||
"inputs": Array [
|
||||
"test2": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"{workspaceRoot}/karma.conf.js",
|
||||
|
||||
@ -55,7 +55,7 @@ describe('Migration to update target and add useDefineForClassFields', () => {
|
||||
'tsconfig.base.json'
|
||||
).compilerOptions;
|
||||
expect(compilerOptions).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"module": "es2020",
|
||||
"target": "es2015",
|
||||
}
|
||||
@ -85,7 +85,7 @@ describe('Migration to update target and add useDefineForClassFields', () => {
|
||||
'apps/karma/tsconfig.spec.json'
|
||||
).compilerOptions;
|
||||
expect(compilerOptions).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"module": "es2020",
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": false,
|
||||
|
||||
@ -30,12 +30,12 @@ describe('installed-required-packages', () => {
|
||||
// ASSERT
|
||||
const pkgJson = readJson(tree, 'package.json');
|
||||
expect(pkgJson.dependencies).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"@angular/core": "~15.0.0",
|
||||
}
|
||||
`);
|
||||
expect(pkgJson.devDependencies).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"@angular-devkit/build-angular": "~15.0.0",
|
||||
"@angular-devkit/core": "~15.0.0",
|
||||
"@angular-devkit/schematics": "~15.0.0",
|
||||
@ -63,12 +63,12 @@ describe('installed-required-packages', () => {
|
||||
// ASSERT
|
||||
const pkgJson = readJson(tree, 'package.json');
|
||||
expect(pkgJson.dependencies).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"@angular/core": "~14.0.0",
|
||||
}
|
||||
`);
|
||||
expect(pkgJson.devDependencies).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"@angular-devkit/build-angular": "~14.0.0",
|
||||
"@angular-devkit/core": "~14.0.0",
|
||||
"@angular-devkit/schematics": "~14.0.0",
|
||||
@ -99,12 +99,12 @@ describe('installed-required-packages', () => {
|
||||
// ASSERT
|
||||
const pkgJson = readJson(tree, 'package.json');
|
||||
expect(pkgJson.dependencies).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"@angular/core": "~15.0.0",
|
||||
}
|
||||
`);
|
||||
expect(pkgJson.devDependencies).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"@angular-devkit/build-angular": "~15.0.0",
|
||||
"@angular-devkit/core": "~15.0.0",
|
||||
"@angular-devkit/schematics": "~15.0.0",
|
||||
@ -135,12 +135,12 @@ describe('installed-required-packages', () => {
|
||||
// ASSERT
|
||||
const pkgJson = readJson(tree, 'package.json');
|
||||
expect(pkgJson.dependencies).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"@angular/core": "~14.0.0",
|
||||
}
|
||||
`);
|
||||
expect(pkgJson.devDependencies).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"@angular-devkit/build-angular": "~14.0.0",
|
||||
"@angular-devkit/core": "~14.0.0",
|
||||
"@angular-devkit/schematics": "~14.0.0",
|
||||
@ -170,12 +170,12 @@ describe('installed-required-packages', () => {
|
||||
// ASSERT
|
||||
const pkgJson = readJson(tree, 'package.json');
|
||||
expect(pkgJson.dependencies).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"@angular/core": "~15.0.0",
|
||||
}
|
||||
`);
|
||||
expect(pkgJson.devDependencies).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"@angular-devkit/build-angular": "~15.0.0",
|
||||
"@angular-devkit/core": "~15.0.0",
|
||||
"@angular-devkit/schematics": "~15.0.0",
|
||||
@ -205,12 +205,12 @@ describe('installed-required-packages', () => {
|
||||
// ASSERT
|
||||
const pkgJson = readJson(tree, 'package.json');
|
||||
expect(pkgJson.dependencies).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"@angular/core": "~14.0.0",
|
||||
}
|
||||
`);
|
||||
expect(pkgJson.devDependencies).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"@angular-devkit/build-angular": "~14.0.0",
|
||||
"@angular-devkit/core": "~14.0.0",
|
||||
"@angular-devkit/schematics": "~14.0.0",
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`convert-tslint-to-eslint should work for Cypress applications 1`] = `
|
||||
Object {
|
||||
"dependencies": Object {},
|
||||
"devDependencies": Object {
|
||||
{
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@nrwl/eslint-plugin-nx": "0.0.1",
|
||||
"@nrwl/linter": "0.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
||||
@ -18,20 +18,20 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`convert-tslint-to-eslint should work for Cypress applications 2`] = `
|
||||
Object {
|
||||
{
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "e2e-app-1",
|
||||
"projectType": "application",
|
||||
"root": "apps/e2e-app-1",
|
||||
"targets": Object {
|
||||
"lint": Object {
|
||||
"targets": {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/e2e-app-1/**/*.{js,ts}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
@ -40,35 +40,35 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`convert-tslint-to-eslint should work for Cypress applications 3`] = `
|
||||
Object {
|
||||
"ignorePatterns": Array [
|
||||
{
|
||||
"ignorePatterns": [
|
||||
"**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {
|
||||
"@nrwl/nx/enforce-module-boundaries": Array [
|
||||
"rules": {
|
||||
"@nrwl/nx/enforce-module-boundaries": [
|
||||
"error",
|
||||
Object {
|
||||
"allow": Array [
|
||||
{
|
||||
"allow": [
|
||||
"@nx-example/shared/product/data/testing",
|
||||
],
|
||||
"depConstraints": Array [
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
"depConstraints": [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:feature",
|
||||
"type:ui",
|
||||
],
|
||||
"sourceTag": "type:app",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:ui",
|
||||
"type:data",
|
||||
"type:types",
|
||||
@ -76,48 +76,48 @@ Object {
|
||||
],
|
||||
"sourceTag": "type:feature",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:types",
|
||||
],
|
||||
"sourceTag": "type:types",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:state",
|
||||
"type:types",
|
||||
"type:data",
|
||||
],
|
||||
"sourceTag": "type:state",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:types",
|
||||
],
|
||||
"sourceTag": "type:data",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:e2e-utils",
|
||||
],
|
||||
"sourceTag": "type:e2e",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:types",
|
||||
"type:ui",
|
||||
],
|
||||
"sourceTag": "type:ui",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"scope:products",
|
||||
"scope:shared",
|
||||
],
|
||||
"sourceTag": "scope:products",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"scope:cart",
|
||||
"scope:shared",
|
||||
],
|
||||
@ -129,49 +129,49 @@ Object {
|
||||
],
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/typescript",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/javascript",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
],
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"eslint-plugin-import",
|
||||
"@typescript-eslint",
|
||||
],
|
||||
"root": true,
|
||||
"rules": Object {
|
||||
"rules": {
|
||||
"@typescript-eslint/consistent-type-definitions": "error",
|
||||
"@typescript-eslint/dot-notation": "off",
|
||||
"@typescript-eslint/explicit-member-accessibility": Array [
|
||||
"@typescript-eslint/explicit-member-accessibility": [
|
||||
"off",
|
||||
Object {
|
||||
{
|
||||
"accessibility": "explicit",
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/member-ordering": "error",
|
||||
"@typescript-eslint/naming-convention": Array [
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"error",
|
||||
Object {
|
||||
"format": Array [
|
||||
{
|
||||
"format": [
|
||||
"camelCase",
|
||||
"UPPER_CASE",
|
||||
],
|
||||
@ -182,17 +182,17 @@ Object {
|
||||
],
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
"@typescript-eslint/no-inferrable-types": Array [
|
||||
"@typescript-eslint/no-inferrable-types": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"ignoreParameters": true,
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": "error",
|
||||
"@typescript-eslint/no-shadow": Array [
|
||||
"@typescript-eslint/no-shadow": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"hoist": "all",
|
||||
},
|
||||
],
|
||||
@ -202,7 +202,7 @@ Object {
|
||||
"arrow-body-style": "error",
|
||||
"constructor-super": "error",
|
||||
"dot-notation": "off",
|
||||
"eqeqeq": Array [
|
||||
"eqeqeq": [
|
||||
"error",
|
||||
"smart",
|
||||
],
|
||||
@ -212,9 +212,9 @@ Object {
|
||||
"import/no-deprecated": "warn",
|
||||
"no-bitwise": "error",
|
||||
"no-caller": "error",
|
||||
"no-console": Array [
|
||||
"no-console": [
|
||||
"error",
|
||||
Object {},
|
||||
{},
|
||||
],
|
||||
"no-debugger": "error",
|
||||
"no-empty": "off",
|
||||
@ -222,7 +222,7 @@ Object {
|
||||
"no-eval": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-restricted-imports": Array [
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
"rxjs/Rx",
|
||||
],
|
||||
@ -237,7 +237,7 @@ Object {
|
||||
},
|
||||
},
|
||||
],
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"@nrwl/nx",
|
||||
],
|
||||
"root": true,
|
||||
@ -245,29 +245,29 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`convert-tslint-to-eslint should work for Cypress applications 4`] = `
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:cypress/recommended",
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
],
|
||||
"rules": Object {
|
||||
"rules": {
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
},
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Cypress Component Project should add base cypress component testing config 1`] = `
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "libs/cool-lib/cypress.config.ts",
|
||||
"testingType": "component",
|
||||
},
|
||||
@ -11,9 +11,9 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`Cypress Component Project should not error when rerunning on an existing project 1`] = `
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "libs/cool-lib/cypress.config.ts",
|
||||
"testingType": "component",
|
||||
},
|
||||
|
||||
@ -1,35 +1,35 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Cypress e2e configuration v10+ should not override eslint settings if preset 1`] = `
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:cypress/recommended",
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"extends": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular",
|
||||
"plugin:@angular-eslint/template/process-inline-templates",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.ts",
|
||||
],
|
||||
"rules": Object {
|
||||
"@angular-eslint/component-selector": Array [
|
||||
"rules": {
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "cy-port-test",
|
||||
"style": "kebab-case",
|
||||
"type": "element",
|
||||
},
|
||||
],
|
||||
"@angular-eslint/directive-selector": Array [
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "cyPortTest",
|
||||
"style": "camelCase",
|
||||
"type": "attribute",
|
||||
@ -37,21 +37,21 @@ Object {
|
||||
],
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular-template",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.html",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.cy.{ts,js,tsx,jsx}",
|
||||
"cypress/**/*.{ts,js,tsx,jsx}",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@ -51,14 +51,14 @@ describe('Cypress e2e configuration', () => {
|
||||
`);
|
||||
expect(readProjectConfiguration(tree, 'my-app').targets.e2e)
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"production": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "my-app:serve:production",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/my-app/cypress.config.ts",
|
||||
"devServerTarget": "my-app:serve",
|
||||
"testingType": "e2e",
|
||||
@ -68,18 +68,18 @@ describe('Cypress e2e configuration', () => {
|
||||
|
||||
expect(readJson(tree, 'apps/my-app/tsconfig.json'))
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"sourceMap": false,
|
||||
"types": Array [
|
||||
"types": [
|
||||
"cypress",
|
||||
"node",
|
||||
],
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"include": Array [
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.js",
|
||||
"cypress.config.ts",
|
||||
@ -187,18 +187,18 @@ describe('Cypress e2e configuration', () => {
|
||||
assertCypressFiles(tree, 'apps/my-app/e2e/something');
|
||||
expect(readJson(tree, 'apps/my-app/tsconfig.cy.json'))
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"sourceMap": false,
|
||||
"types": Array [
|
||||
"types": [
|
||||
"cypress",
|
||||
"node",
|
||||
],
|
||||
},
|
||||
"extends": "./tsconfig.json",
|
||||
"include": Array [
|
||||
"include": [
|
||||
"e2e/something/**/*.ts",
|
||||
"e2e/something/**/*.js",
|
||||
"cypress.config.ts",
|
||||
@ -291,7 +291,7 @@ describe('Cypress e2e configuration', () => {
|
||||
readProjectConfiguration(tree, 'my-lib').targets['e2e'].configurations
|
||||
.ci
|
||||
).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"devServerTarget": "my-app:serve-static",
|
||||
}
|
||||
`);
|
||||
@ -306,7 +306,7 @@ describe('Cypress e2e configuration', () => {
|
||||
|
||||
expect(readProjectConfiguration(tree, 'my-app').targets['e2e'].options)
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"cypressConfig": "apps/my-app/cypress.config.ts",
|
||||
"devServerTarget": "my-app:serve",
|
||||
"port": 0,
|
||||
|
||||
@ -1,29 +1,29 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Cypress Project < v7 --linter eslint should add eslint-plugin-cypress 1`] = `
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:cypress/recommended",
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"src/plugins/index.js",
|
||||
],
|
||||
"rules": Object {
|
||||
"rules": {
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
"no-undef": "off",
|
||||
},
|
||||
@ -33,29 +33,29 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`Cypress Project < v7 nested should update configuration 1`] = `
|
||||
Object {
|
||||
"e2e": Object {
|
||||
"configurations": Object {
|
||||
"production": Object {
|
||||
{
|
||||
"e2e": {
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "my-dir-my-app:serve:production",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/my-dir/my-app-e2e/cypress.json",
|
||||
"devServerTarget": "my-dir-my-app:serve",
|
||||
"testingType": "e2e",
|
||||
"tsConfig": "apps/my-dir/my-app-e2e/tsconfig.json",
|
||||
},
|
||||
},
|
||||
"lint": Object {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-dir/my-app-e2e/**/*.{js,ts}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{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`] = `
|
||||
"{
|
||||
\\"fileServerFolder\\": \\".\\",
|
||||
\\"fixturesFolder\\": \\"./src/fixtures\\",
|
||||
\\"integrationFolder\\": \\"./src/integration\\",
|
||||
\\"modifyObstructiveCode\\": false,
|
||||
\\"supportFile\\": \\"./src/support/index.ts\\",
|
||||
\\"pluginsFile\\": \\"./src/plugins/index\\",
|
||||
\\"video\\": true,
|
||||
\\"videosFolder\\": \\"../../../dist/cypress/apps/my-dir/my-app-e2e/videos\\",
|
||||
\\"screenshotsFolder\\": \\"../../../dist/cypress/apps/my-dir/my-app-e2e/screenshots\\",
|
||||
\\"chromeWebSecurity\\": false
|
||||
"fileServerFolder": ".",
|
||||
"fixturesFolder": "./src/fixtures",
|
||||
"integrationFolder": "./src/integration",
|
||||
"modifyObstructiveCode": false,
|
||||
"supportFile": "./src/support/index.ts",
|
||||
"pluginsFile": "./src/plugins/index",
|
||||
"video": true,
|
||||
"videosFolder": "../../../dist/cypress/apps/my-dir/my-app-e2e/videos",
|
||||
"screenshotsFolder": "../../../dist/cypress/apps/my-dir/my-app-e2e/screenshots",
|
||||
"chromeWebSecurity": false
|
||||
}
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Cypress Project < v7 project with directory in its name should update configuration 1`] = `
|
||||
Object {
|
||||
"e2e": Object {
|
||||
"configurations": Object {
|
||||
"production": Object {
|
||||
{
|
||||
"e2e": {
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "my-dir-my-app:serve:production",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/my-dir/my-app-e2e/cypress.json",
|
||||
"devServerTarget": "my-dir-my-app:serve",
|
||||
"testingType": "e2e",
|
||||
"tsConfig": "apps/my-dir/my-app-e2e/tsconfig.json",
|
||||
},
|
||||
},
|
||||
"lint": Object {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-dir/my-app-e2e/**/*.{js,ts}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
@ -109,24 +109,24 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`Cypress Project < v7 should update configuration (baseUrl) 1`] = `
|
||||
Object {
|
||||
"e2e": Object {
|
||||
{
|
||||
"e2e": {
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"baseUrl": "http://localhost:3000",
|
||||
"cypressConfig": "apps/my-app-e2e/cypress.json",
|
||||
"testingType": "e2e",
|
||||
"tsConfig": "apps/my-app-e2e/tsconfig.json",
|
||||
},
|
||||
},
|
||||
"lint": Object {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-app-e2e/**/*.{js,ts}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
@ -134,29 +134,29 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`Cypress Project < v7 should update configuration 1`] = `
|
||||
Object {
|
||||
"e2e": Object {
|
||||
"configurations": Object {
|
||||
"production": Object {
|
||||
{
|
||||
"e2e": {
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "my-app:serve:production",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/my-app-e2e/cypress.json",
|
||||
"devServerTarget": "my-app:serve",
|
||||
"testingType": "e2e",
|
||||
"tsConfig": "apps/my-app-e2e/tsconfig.json",
|
||||
},
|
||||
},
|
||||
"lint": Object {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-app-e2e/**/*.{js,ts}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
@ -164,29 +164,29 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`Cypress Project < v7 should update configuration 2`] = `
|
||||
Object {
|
||||
"e2e": Object {
|
||||
"configurations": Object {
|
||||
"production": Object {
|
||||
{
|
||||
"e2e": {
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "my-app:serve:production",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/my-app-e2e/cypress.json",
|
||||
"devServerTarget": "my-app:serve:development",
|
||||
"testingType": "e2e",
|
||||
"tsConfig": "apps/my-app-e2e/tsconfig.json",
|
||||
},
|
||||
},
|
||||
"lint": Object {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-app-e2e/**/*.{js,ts}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
@ -216,18 +216,18 @@ export default defineConfig({
|
||||
`;
|
||||
|
||||
exports[`Cypress Project > v10 nested should set right path names in \`tsconfig.e2e.json\` 1`] = `
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"outDir": "../../../dist/out-tsc",
|
||||
"sourceMap": false,
|
||||
"types": Array [
|
||||
"types": [
|
||||
"cypress",
|
||||
"node",
|
||||
],
|
||||
},
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"include": Array [
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.js",
|
||||
"cypress.config.ts",
|
||||
@ -246,18 +246,18 @@ export default defineConfig({
|
||||
`;
|
||||
|
||||
exports[`Cypress Project > v10 should set right path names in \`tsconfig.e2e.json\` 1`] = `
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"sourceMap": false,
|
||||
"types": Array [
|
||||
"types": [
|
||||
"cypress",
|
||||
"node",
|
||||
],
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"include": Array [
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.js",
|
||||
"cypress.config.ts",
|
||||
@ -266,14 +266,14 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`Cypress Project > v10 should update configuration when eslint is passed 1`] = `
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-app-e2e/**/*.{js,ts}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
}
|
||||
|
||||
@ -47,17 +47,17 @@ export default defineConfig({
|
||||
`;
|
||||
|
||||
exports[`convertToCypressTen convertCypressProject should handle multiple configurations 2`] = `
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"production": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "target:serve:production",
|
||||
},
|
||||
"static": Object {
|
||||
"static": {
|
||||
"baseUrl": "http://localhost:3000",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/app-e2e/cypress.config.ts",
|
||||
"devServerTarget": "app:serve",
|
||||
"testingType": "e2e",
|
||||
@ -89,19 +89,19 @@ export default defineConfig({
|
||||
`;
|
||||
|
||||
exports[`convertToCypressTen convertCypressProject should handle multiple configurations with no default cypressConfig option 2`] = `
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"production": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"production": {
|
||||
"cypressConfig": "apps/app-e2e/cypress.production.config.ts",
|
||||
"devServerTarget": "target:serve:production",
|
||||
},
|
||||
"static": Object {
|
||||
"static": {
|
||||
"baseUrl": "http://localhost:3000",
|
||||
"cypressConfig": "apps/app-e2e/cypress.config.ts",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"baseUrl": "http://localhost:4200",
|
||||
"testingType": "e2e",
|
||||
},
|
||||
@ -153,41 +153,41 @@ export default defineConfig({
|
||||
`;
|
||||
|
||||
exports[`convertToCypressTen convertCypressProject should infer targets with --all flag 2`] = `
|
||||
Object {
|
||||
"e2e": Object {
|
||||
"configurations": Object {
|
||||
"production": Object {
|
||||
{
|
||||
"e2e": {
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "app:serve:production",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/app-e2e/cypress.config.ts",
|
||||
"devServerTarget": "app:serve",
|
||||
"testingType": "e2e",
|
||||
},
|
||||
},
|
||||
"e2e-custom": Object {
|
||||
"configurations": Object {
|
||||
"production": Object {
|
||||
"e2e-custom": {
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "app:serve:production",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/app-e2e/cypress.config.ts",
|
||||
"devServerTarget": "app:serve",
|
||||
"testingType": "e2e",
|
||||
},
|
||||
},
|
||||
"lint": Object {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/app-e2e/**/*.{js,ts}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
@ -218,41 +218,41 @@ export default defineConfig({
|
||||
`;
|
||||
|
||||
exports[`convertToCypressTen convertCypressProject should not break when an invalid target is passed in 2`] = `
|
||||
Object {
|
||||
"e2e": Object {
|
||||
"configurations": Object {
|
||||
"production": Object {
|
||||
{
|
||||
"e2e": {
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "app:serve:production",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/app-e2e/cypress.config.ts",
|
||||
"devServerTarget": "app:serve",
|
||||
"testingType": "e2e",
|
||||
},
|
||||
},
|
||||
"e2e-custom": Object {
|
||||
"configurations": Object {
|
||||
"production": Object {
|
||||
"e2e-custom": {
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "app:serve:production",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/app-e2e/cypress.config.ts",
|
||||
"devServerTarget": "app:serve",
|
||||
"testingType": "e2e",
|
||||
},
|
||||
},
|
||||
"lint": Object {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/app-e2e/**/*.{js,ts}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
@ -326,10 +326,10 @@ describe('a', () => {
|
||||
});
|
||||
|
||||
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');
|
||||
|
||||
// Function helper example, see \\\\\`../support/app.po.ts\\\\\` file
|
||||
// Function helper example, see \\\`../support/app.po.ts\\\` file
|
||||
getGreeting().contains('Welcome a');
|
||||
});
|
||||
});
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
exports[`update cy.mount usage should add the mount command 1`] = `
|
||||
"import { mount } from 'cypress/angular'
|
||||
/// <reference types=\\"cypress\\" />
|
||||
/// <reference types="cypress" />
|
||||
|
||||
// ***********************************************
|
||||
// This example commands.ts shows you how to
|
||||
@ -32,15 +32,15 @@ Cypress.Commands.add('login', (email, password) => {
|
||||
});
|
||||
//
|
||||
// -- 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 --
|
||||
// Cypress.Commands.add(\\"dismiss\\", { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- 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);"
|
||||
`;
|
||||
@ -71,7 +71,7 @@ exports[`update cy.mount usage should update angular react test file 1`] = `
|
||||
});
|
||||
|
||||
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', () => {
|
||||
cy.mount(<MyComponent title={\\"blah\\"}/>);
|
||||
cy.mount(<MyComponent title={"blah"}/>);
|
||||
});
|
||||
});
|
||||
"
|
||||
|
||||
@ -44,26 +44,26 @@ describe('15.0.0 migration (add-cypress-inputs)', () => {
|
||||
|
||||
const updated = readNxJson(tree);
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
],
|
||||
"sharedGlobals": Array [],
|
||||
"sharedGlobals": [],
|
||||
},
|
||||
"targetDefaults": Object {
|
||||
"e2e": Object {
|
||||
"inputs": Array [
|
||||
"targetDefaults": {
|
||||
"e2e": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
],
|
||||
},
|
||||
"e2e2": Object {
|
||||
"inputs": Array [
|
||||
"e2e2": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
],
|
||||
@ -107,29 +107,29 @@ describe('15.0.0 migration (add-cypress-inputs)', () => {
|
||||
|
||||
const updated = readNxJson(tree);
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
"!{projectRoot}/cypress/**/*",
|
||||
"!{projectRoot}/**/*.cy.[jt]s?(x)",
|
||||
"!{projectRoot}/cypress.config.[jt]s",
|
||||
],
|
||||
"sharedGlobals": Array [],
|
||||
"sharedGlobals": [],
|
||||
},
|
||||
"targetDefaults": Object {
|
||||
"e2e": Object {
|
||||
"inputs": Array [
|
||||
"targetDefaults": {
|
||||
"e2e": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
],
|
||||
},
|
||||
"e2e2": Object {
|
||||
"inputs": Array [
|
||||
"e2e2": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
],
|
||||
|
||||
@ -98,7 +98,7 @@ describe('Cypress 12 Migration', () => {
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.should(($s) => {
|
||||
cy.task(\\"\\");
|
||||
cy.task("");
|
||||
})
|
||||
/**
|
||||
* 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
|
||||
**/
|
||||
cy.should(function($el) {
|
||||
cy.task(\\"\\");
|
||||
cy.task("");
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -20,18 +20,18 @@ describe('app', () => {
|
||||
|
||||
const tsconfig = readJson(appTree, 'apps/my-node-app/tsconfig.json');
|
||||
expect(tsconfig).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true,
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": Array [],
|
||||
"include": Array [],
|
||||
"references": Array [
|
||||
Object {
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.app.json",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
],
|
||||
@ -40,36 +40,36 @@ describe('app', () => {
|
||||
|
||||
const eslintrcJson = readJson(appTree, 'apps/my-node-app/.eslintrc.json');
|
||||
expect(eslintrcJson).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
@ -83,26 +83,26 @@ describe('app', () => {
|
||||
const tsconfig = readJson(appTree, 'apps/my-node-app/tsconfig.app.json');
|
||||
expect(tsconfig.compilerOptions.types).toContain('express');
|
||||
expect(tsconfig).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
"module": "commonjs",
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"types": Array [
|
||||
"node",
|
||||
"express",
|
||||
],
|
||||
},
|
||||
"exclude": Array [
|
||||
"jest.config.ts",
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.test.ts",
|
||||
],
|
||||
"extends": "./tsconfig.json",
|
||||
"include": Array [
|
||||
"src/**/*.ts",
|
||||
],
|
||||
}
|
||||
`);
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"types": [
|
||||
"node",
|
||||
"express",
|
||||
],
|
||||
},
|
||||
"exclude": [
|
||||
"jest.config.ts",
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.test.ts",
|
||||
],
|
||||
"extends": "./tsconfig.json",
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
],
|
||||
}
|
||||
`);
|
||||
});
|
||||
|
||||
describe('--js flag', () => {
|
||||
|
||||
@ -246,9 +246,9 @@ projects: getJestProjects()
|
||||
};`);
|
||||
expect(readProjectConfiguration(tree, 'my-project').targets.test)
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/jest:jest",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"jestConfig": "jest.config.app.ts",
|
||||
},
|
||||
}
|
||||
@ -312,8 +312,8 @@ projects: getJestProjects()
|
||||
await jestInitGenerator(tree, {});
|
||||
const extensionsJson = readJson(tree, '.vscode/extensions.json');
|
||||
expect(extensionsJson).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"recommendations": Array [
|
||||
{
|
||||
"recommendations": [
|
||||
"nrwl.angular-console",
|
||||
"angular.ng-template",
|
||||
"dbaeumer.vscode-eslint",
|
||||
|
||||
@ -6,7 +6,7 @@ export default {
|
||||
displayName: 'lib1',
|
||||
preset: '../../jest.preset.js',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'@swc/jest',
|
||||
{ jsc: { transform: { react: { runtime: 'automatic' } } } },
|
||||
],
|
||||
@ -23,7 +23,7 @@ export default {
|
||||
displayName: 'lib1',
|
||||
preset: '../../jest.preset.js',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest',
|
||||
'^.+\\\\.[tj]sx?$': 'babel-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
coverageDirectory: '../../coverage/libs/lib1',
|
||||
@ -37,7 +37,7 @@ export default {
|
||||
displayName: 'lib1',
|
||||
preset: '../../jest.preset.js',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]s$': 'babel-jest',
|
||||
'^.+\\\\.[tj]s$': 'babel-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/libs/lib1',
|
||||
@ -53,15 +53,15 @@ export default {
|
||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||
coverageDirectory: '../../coverage/libs/lib1',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.(ts|mjs|js|html)$': [
|
||||
'^.+\\\\.(ts|mjs|js|html)$': [
|
||||
'jest-preset-angular',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\\\\\\\.(html|svg)$',
|
||||
stringifyContentPathRegex: '\\\\.(html|svg)$',
|
||||
},
|
||||
],
|
||||
},
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\\\\\\\.mjs$)'],
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\\\.mjs$)'],
|
||||
snapshotSerializers: [
|
||||
'jest-preset-angular/build/serializers/no-ng-attributes',
|
||||
'jest-preset-angular/build/serializers/ng-snapshot',
|
||||
@ -89,15 +89,15 @@ export default {
|
||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||
coverageDirectory: '../../coverage/libs/lib1',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.(ts|mjs|js|html)$': [
|
||||
'^.+\\\\.(ts|mjs|js|html)$': [
|
||||
'jest-preset-angular',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\\\\\\\.(html|svg)$',
|
||||
stringifyContentPathRegex: '\\\\.(html|svg)$',
|
||||
},
|
||||
],
|
||||
},
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\\\\\\\.mjs$)'],
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\\\.mjs$)'],
|
||||
snapshotSerializers: [
|
||||
'jest-preset-angular/build/serializers/no-ng-attributes',
|
||||
'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`] = `
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"ci": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"ci": true,
|
||||
"codeCoverage": true,
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/jest:jest",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"jestConfig": "libs/lib1/jest.config.js",
|
||||
"passWithNoTests": true,
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{workspaceRoot}/coverage/{projectRoot}",
|
||||
],
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': 'ts-jest',
|
||||
'^.+\\\\.[tj]sx?$': 'ts-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
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`] = `
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"parserOptions": Object {
|
||||
"project": Array [
|
||||
"parserOptions": {
|
||||
"project": [
|
||||
"libs/my-next-proj/tsconfig.*?.json",
|
||||
],
|
||||
},
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
}
|
||||
`;
|
||||
|
||||
@ -48,7 +48,7 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': 'ts-jest',
|
||||
'^.+\\\\.[tj]sx?$': 'ts-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
coverageDirectory: '../../coverage/libs/lib-one',
|
||||
@ -68,7 +68,7 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': 'ts-jest',
|
||||
'^.+\\\\.[tj]sx?$': 'ts-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
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`] = `
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"parserOptions": Object {
|
||||
"project": Array [
|
||||
"parserOptions": {
|
||||
"project": [
|
||||
"libs/lib-one/tsconfig.*?.json",
|
||||
],
|
||||
},
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
}
|
||||
`;
|
||||
|
||||
@ -28,14 +28,14 @@ export default {
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\\\\\\\.(html|svg)$',
|
||||
stringifyContentPathRegex: '\\\\.(html|svg)$',
|
||||
},
|
||||
},
|
||||
coverageDirectory: '../../coverage/apps/lib-one',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.(ts|mjs|js|html)$': 'jest-preset-angular',
|
||||
'^.+\\\\.(ts|mjs|js|html)$': 'jest-preset-angular',
|
||||
},
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\\\\\\\.mjs$)'],
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\\\.mjs$)'],
|
||||
snapshotSerializers: [
|
||||
'jest-preset-angular/build/serializers/no-ng-attributes',
|
||||
'jest-preset-angular/build/serializers/ng-snapshot',
|
||||
@ -58,14 +58,14 @@ export default {
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\\\\\\\.(html|svg)$',
|
||||
stringifyContentPathRegex: '\\\\.(html|svg)$',
|
||||
},
|
||||
},
|
||||
coverageDirectory: '../../coverage/apps/lib-one',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.(ts|mjs|js|html)$': 'jest-preset-angular',
|
||||
'^.+\\\\.(ts|mjs|js|html)$': 'jest-preset-angular',
|
||||
},
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\\\\\\\.mjs$)'],
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\\\.mjs$)'],
|
||||
snapshotSerializers: [
|
||||
'jest-preset-angular/build/serializers/no-ng-attributes',
|
||||
'jest-preset-angular/build/serializers/ng-snapshot',
|
||||
|
||||
@ -44,30 +44,30 @@ describe('15.0.0 migration (add-jest-inputs)', () => {
|
||||
|
||||
const updated = readNxJson(tree);
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
|
||||
"!{projectRoot}/tsconfig.spec.json",
|
||||
"!{projectRoot}/jest.config.[jt]s",
|
||||
],
|
||||
"sharedGlobals": Array [],
|
||||
"sharedGlobals": [],
|
||||
},
|
||||
"targetDefaults": Object {
|
||||
"test": Object {
|
||||
"inputs": Array [
|
||||
"targetDefaults": {
|
||||
"test": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"{workspaceRoot}/jest.preset.js",
|
||||
],
|
||||
},
|
||||
"test2": Object {
|
||||
"inputs": Array [
|
||||
"test2": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"{workspaceRoot}/jest.preset.js",
|
||||
|
||||
@ -17,7 +17,7 @@ module.exports = {
|
||||
* It's recommend you update to the latest format.
|
||||
* You can do this by removing snapshotFormat property
|
||||
* and running tests with --update-snapshot flag.
|
||||
* Example: \\"nx affected --targets=test --update-snapshot\\"
|
||||
* Example: "nx affected --targets=test --update-snapshot"
|
||||
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
|
||||
*/
|
||||
snapshotFormat: { escapeString: true, printBasicPrototype: true },
|
||||
@ -32,7 +32,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -47,7 +47,7 @@ export default {
|
||||
* 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\\"
|
||||
* 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 },
|
||||
@ -58,7 +58,7 @@ export default {
|
||||
exports[`Jest Migration - jest 29 update configs should add snapshot config with no root preset 2`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
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.
|
||||
* 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\\"
|
||||
* 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 },
|
||||
@ -95,7 +95,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -111,7 +111,7 @@ export default {
|
||||
exports[`Jest Migration - jest 29 update configs should be idempotent 2`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -189,7 +189,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -205,7 +205,7 @@ export default {
|
||||
exports[`Jest Migration - jest 29 update configs should update jest.config.ts 2`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -236,7 +236,7 @@ module.exports = {
|
||||
* It's recommend you update to the latest format.
|
||||
* You can do this by removing snapshotFormat property
|
||||
* and running tests with --update-snapshot flag.
|
||||
* Example: \\"nx affected --targets=test --update-snapshot\\"
|
||||
* Example: "nx affected --targets=test --update-snapshot"
|
||||
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
|
||||
*/
|
||||
snapshotFormat: { escapeString: true, printBasicPrototype: true },
|
||||
@ -251,7 +251,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -267,7 +267,7 @@ export default {
|
||||
exports[`Jest Migration - jest 29 update configs should update root preset 3`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -310,7 +310,7 @@ module.exports = {
|
||||
* It's recommend you update to the latest format.
|
||||
* You can do this by removing snapshotFormat property
|
||||
* and running tests with --update-snapshot flag.
|
||||
* Example: \\"nx affected --targets=test --update-snapshot\\"
|
||||
* Example: "nx affected --targets=test --update-snapshot"
|
||||
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
|
||||
*/
|
||||
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`] = `
|
||||
"export default {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest',
|
||||
'^.+\\\\.[tj]sx?$': 'babel-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
|
||||
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`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest',
|
||||
'^.+\\\\.[tj]sx?$': 'babel-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
|
||||
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`] = `
|
||||
"export default {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest',
|
||||
'^.+\\\\.[tj]sx?$': 'babel-jest',
|
||||
},
|
||||
globals: { something: 'else',
|
||||
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`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': ['ts-jest', {
|
||||
'^.+\\\\.[tj]sx?$': ['ts-jest', {
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json'
|
||||
}],
|
||||
},
|
||||
@ -380,7 +380,7 @@ exports[`Jest Migration - jest 29 update configs should work with jest-preset-an
|
||||
transform: {
|
||||
'^.+.(ts|mjs|js|html)$': ['jest-preset-angular', {
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\\\.(html|svg)$',
|
||||
stringifyContentPathRegex: '\\.(html|svg)$',
|
||||
}],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
|
||||
@ -396,7 +396,7 @@ exports[`Jest Migration - jest 29 update configs should work with jest-preset-an
|
||||
transform: {
|
||||
'^.+.(ts|mjs|js|html)$': ['jest-preset-angular', {
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\\\.(html|svg)$',
|
||||
stringifyContentPathRegex: '\\.(html|svg)$',
|
||||
}],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
|
||||
@ -413,7 +413,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
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`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -456,7 +456,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
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`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
exports[`Jest AST Utils addTransformerToConfig should add transformer to export default config 1`] = `
|
||||
"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'],
|
||||
displayName: 'blah',
|
||||
preset: '../../jest.preset.js'
|
||||
@ -14,13 +14,13 @@ exports[`Jest AST Utils addTransformerToConfig should add transformer to export
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
|
||||
displayName: 'blah',
|
||||
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`] = `
|
||||
"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'],
|
||||
displayName: 'blah',
|
||||
preset: '../../jest.preset.js'
|
||||
@ -32,6 +32,6 @@ exports[`Jest AST Utils addTransformerToConfig should add transformer to module.
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
|
||||
displayName: 'blah',
|
||||
preset: '../../jest.preset.js',
|
||||
transform: { '^.+\\\\\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.spec.json'}] }
|
||||
transform: { '^.+\\\\.[tj]sx?$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.spec.json'}] }
|
||||
};"
|
||||
`;
|
||||
|
||||
@ -4,14 +4,14 @@ exports[`lib --unit-test-runner jest should generate test configuration with swc
|
||||
"/* eslint-disable */
|
||||
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
|
||||
const { exclude: _, ...swcJestConfig } = JSON.parse(
|
||||
readFileSync(\`\${__dirname}/.swcrc\`, 'utf-8')
|
||||
);
|
||||
|
||||
// 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) {
|
||||
swcJestConfig.swcrc = false;
|
||||
}
|
||||
@ -20,7 +20,7 @@ module.exports = {
|
||||
displayName: 'my-lib',
|
||||
preset: '../../jest.preset.js',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]s$': ['@swc/jest', swcJestConfig],
|
||||
'^.+\\\\.[tj]s$': ['@swc/jest', swcJestConfig],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/libs/my-lib',
|
||||
|
||||
@ -128,29 +128,29 @@ describe('lib', () => {
|
||||
await libraryGenerator(tree, { ...defaultOptions, name: 'myLib' });
|
||||
const tsconfigJson = readJson(tree, 'libs/my-lib/tsconfig.json');
|
||||
expect(tsconfigJson).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"module": "commonjs",
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitOverride": true,
|
||||
"noImplicitReturns": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"strict": true,
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": Array [],
|
||||
"include": Array [],
|
||||
"references": Array [
|
||||
Object {
|
||||
"path": "./tsconfig.lib.json",
|
||||
},
|
||||
Object {
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
],
|
||||
}
|
||||
`);
|
||||
{
|
||||
"compilerOptions": {
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"module": "commonjs",
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitOverride": true,
|
||||
"noImplicitReturns": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"strict": true,
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json",
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
],
|
||||
}
|
||||
`);
|
||||
});
|
||||
|
||||
it('should extend from root tsconfig.json when no tsconfig.base.json', async () => {
|
||||
@ -451,40 +451,40 @@ describe('lib', () => {
|
||||
|
||||
const eslintJson = readJson(tree, 'libs/my-lib/.eslintrc.json');
|
||||
expect(eslintJson).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"extends": Array [
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
},
|
||||
],
|
||||
}
|
||||
`);
|
||||
{
|
||||
"extends": [
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": {},
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": {},
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
`);
|
||||
});
|
||||
});
|
||||
|
||||
@ -516,40 +516,40 @@ describe('lib', () => {
|
||||
|
||||
const eslintJson = readJson(tree, 'libs/my-dir/my-lib/.eslintrc.json');
|
||||
expect(eslintJson).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"extends": Array [
|
||||
"../../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
},
|
||||
],
|
||||
}
|
||||
`);
|
||||
{
|
||||
"extends": [
|
||||
"../../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": {},
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": {},
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
`);
|
||||
});
|
||||
});
|
||||
|
||||
@ -631,40 +631,40 @@ describe('lib', () => {
|
||||
).toEqual(['libs/my-dir/my-lib/**/*.js']);
|
||||
expect(readJson(tree, 'libs/my-dir/my-lib/.eslintrc.json'))
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"extends": Array [
|
||||
"../../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
},
|
||||
],
|
||||
}
|
||||
`);
|
||||
{
|
||||
"extends": [
|
||||
"../../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": {},
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": {},
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
`);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -692,7 +692,7 @@ describe('lib', () => {
|
||||
displayName: 'my-lib',
|
||||
preset: '../../jest.preset.js',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
||||
'^.+\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/libs/my-lib',
|
||||
@ -1029,11 +1029,11 @@ describe('lib', () => {
|
||||
|
||||
const babelRc = readJson(tree, 'libs/my-lib/.babelrc');
|
||||
expect(babelRc).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"presets": Array [
|
||||
Array [
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@nrwl/js/babel",
|
||||
Object {
|
||||
{
|
||||
"useBuiltIns": "usage",
|
||||
},
|
||||
],
|
||||
|
||||
@ -2,34 +2,34 @@
|
||||
|
||||
exports[`Update .lib.swcrc exclude should update the exclude pattern 1`] = `
|
||||
"{
|
||||
\\"jsc\\": {
|
||||
\\"target\\": \\"es2017\\",
|
||||
\\"parser\\": {
|
||||
\\"syntax\\": \\"typescript\\",
|
||||
\\"decorators\\": true,
|
||||
\\"dynamicImport\\": true
|
||||
"jsc": {
|
||||
"target": "es2017",
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"decorators": true,
|
||||
"dynamicImport": true
|
||||
},
|
||||
\\"transform\\": {
|
||||
\\"decoratorMetadata\\": true,
|
||||
\\"legacyDecorator\\": true
|
||||
"transform": {
|
||||
"decoratorMetadata": true,
|
||||
"legacyDecorator": true
|
||||
},
|
||||
\\"keepClassNames\\": true,
|
||||
\\"externalHelpers\\": true,
|
||||
\\"loose\\": true
|
||||
"keepClassNames": true,
|
||||
"externalHelpers": true,
|
||||
"loose": true
|
||||
},
|
||||
\\"module\\": {
|
||||
\\"type\\": \\"commonjs\\",
|
||||
\\"strict\\": true,
|
||||
\\"noInterop\\": true
|
||||
"module": {
|
||||
"type": "commonjs",
|
||||
"strict": true,
|
||||
"noInterop": true
|
||||
},
|
||||
\\"sourceMaps\\": true,
|
||||
\\"exclude\\": [
|
||||
\\"jest.config.ts\\",
|
||||
\\".*\\\\\\\\.spec.tsx?$\\",
|
||||
\\".*\\\\\\\\.test.tsx?$\\",
|
||||
\\"./src/jest-setup.ts$\\",
|
||||
\\"./**/jest-setup.ts$\\",
|
||||
\\".*.js$\\"
|
||||
"sourceMaps": true,
|
||||
"exclude": [
|
||||
"jest.config.ts",
|
||||
".*\\\\.spec.tsx?$",
|
||||
".*\\\\.test.tsx?$",
|
||||
"./src/jest-setup.ts$",
|
||||
"./**/jest-setup.ts$",
|
||||
".*.js$"
|
||||
]
|
||||
}
|
||||
"
|
||||
|
||||
@ -2,34 +2,34 @@
|
||||
|
||||
exports[`JS Migration (v14.0.0) should update the exclude pattern 1`] = `
|
||||
"{
|
||||
\\"jsc\\": {
|
||||
\\"target\\": \\"es2017\\",
|
||||
\\"parser\\": {
|
||||
\\"syntax\\": \\"typescript\\",
|
||||
\\"decorators\\": true,
|
||||
\\"dynamicImport\\": true
|
||||
"jsc": {
|
||||
"target": "es2017",
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"decorators": true,
|
||||
"dynamicImport": true
|
||||
},
|
||||
\\"transform\\": {
|
||||
\\"decoratorMetadata\\": true,
|
||||
\\"legacyDecorator\\": true
|
||||
"transform": {
|
||||
"decoratorMetadata": true,
|
||||
"legacyDecorator": true
|
||||
},
|
||||
\\"keepClassNames\\": true,
|
||||
\\"externalHelpers\\": true,
|
||||
\\"loose\\": true
|
||||
"keepClassNames": true,
|
||||
"externalHelpers": true,
|
||||
"loose": true
|
||||
},
|
||||
\\"module\\": {
|
||||
\\"type\\": \\"commonjs\\",
|
||||
\\"strict\\": true,
|
||||
\\"noInterop\\": true
|
||||
"module": {
|
||||
"type": "commonjs",
|
||||
"strict": true,
|
||||
"noInterop": true
|
||||
},
|
||||
\\"sourceMaps\\": true,
|
||||
\\"exclude\\": [
|
||||
\\"jest.config.js\\",
|
||||
\\".*.spec.tsx?$\\",
|
||||
\\".*.test.tsx?$\\",
|
||||
\\"./src/jest-setup.ts$\\",
|
||||
\\"./**/jest-setup.ts$\\",
|
||||
\\".*.js$\\"
|
||||
"sourceMaps": true,
|
||||
"exclude": [
|
||||
"jest.config.js",
|
||||
".*.spec.tsx?$",
|
||||
".*.test.tsx?$",
|
||||
"./src/jest-setup.ts$",
|
||||
"./**/jest-setup.ts$",
|
||||
".*.js$"
|
||||
]
|
||||
}
|
||||
"
|
||||
|
||||
@ -385,7 +385,7 @@ describe('updatePackageJson', () => {
|
||||
vol.readFileSync('dist/libs/lib1/package.json', 'utf-8').toString()
|
||||
);
|
||||
expect(distPackageJson).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"main": "./main.js",
|
||||
"name": "@org/lib1",
|
||||
"types": "./main.d.ts",
|
||||
@ -438,8 +438,8 @@ describe('updatePackageJson', () => {
|
||||
vol.readFileSync('dist/libs/lib1/package.json', 'utf-8').toString()
|
||||
);
|
||||
expect(distPackageJson).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"dependencies": Object {
|
||||
{
|
||||
"dependencies": {
|
||||
"external1": "1.0.0",
|
||||
"external2": "4.5.6",
|
||||
},
|
||||
|
||||
@ -2,32 +2,32 @@
|
||||
|
||||
exports[`@nrwl/linter:init --linter eslint should generate the global eslint config 1`] = `
|
||||
"{
|
||||
\\"root\\": true,
|
||||
\\"ignorePatterns\\": [
|
||||
\\"**/*\\"
|
||||
"root": true,
|
||||
"ignorePatterns": [
|
||||
"**/*"
|
||||
],
|
||||
\\"plugins\\": [
|
||||
\\"@nrwl/nx\\"
|
||||
"plugins": [
|
||||
"@nrwl/nx"
|
||||
],
|
||||
\\"overrides\\": [
|
||||
"overrides": [
|
||||
{
|
||||
\\"files\\": [
|
||||
\\"*.ts\\",
|
||||
\\"*.tsx\\",
|
||||
\\"*.js\\",
|
||||
\\"*.jsx\\"
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
\\"rules\\": {
|
||||
\\"@nrwl/nx/enforce-module-boundaries\\": [
|
||||
\\"error\\",
|
||||
"rules": {
|
||||
"@nrwl/nx/enforce-module-boundaries": [
|
||||
"error",
|
||||
{
|
||||
\\"enforceBuildableLibDependency\\": true,
|
||||
\\"allow\\": [],
|
||||
\\"depConstraints\\": [
|
||||
"enforceBuildableLibDependency": true,
|
||||
"allow": [],
|
||||
"depConstraints": [
|
||||
{
|
||||
\\"sourceTag\\": \\"*\\",
|
||||
\\"onlyDependOnLibsWithTags\\": [
|
||||
\\"*\\"
|
||||
"sourceTag": "*",
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"*"
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -36,24 +36,24 @@ exports[`@nrwl/linter:init --linter eslint should generate the global eslint con
|
||||
}
|
||||
},
|
||||
{
|
||||
\\"files\\": [
|
||||
\\"*.ts\\",
|
||||
\\"*.tsx\\"
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx"
|
||||
],
|
||||
\\"extends\\": [
|
||||
\\"plugin:@nrwl/nx/typescript\\"
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/typescript"
|
||||
],
|
||||
\\"rules\\": {}
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
\\"files\\": [
|
||||
\\"*.js\\",
|
||||
\\"*.jsx\\"
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
\\"extends\\": [
|
||||
\\"plugin:@nrwl/nx/javascript\\"
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/javascript"
|
||||
],
|
||||
\\"rules\\": {}
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -2,20 +2,20 @@
|
||||
|
||||
exports[`@nrwl/linter:lint-project --linter eslint should extend to .eslintrc.js when an .eslintrc.js already exist 1`] = `
|
||||
"{
|
||||
\\"extends\\": [\\"../../.eslintrc.js\\"],
|
||||
\\"ignorePatterns\\": [\\"!**/*\\"],
|
||||
\\"overrides\\": [
|
||||
"extends": ["../../.eslintrc.js"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
\\"files\\": [\\"*.ts\\", \\"*.tsx\\", \\"*.js\\", \\"*.jsx\\"],
|
||||
\\"rules\\": {}
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
\\"files\\": [\\"*.ts\\", \\"*.tsx\\"],
|
||||
\\"rules\\": {}
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
\\"files\\": [\\"*.js\\", \\"*.jsx\\"],
|
||||
\\"rules\\": {}
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"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`] = `
|
||||
"{
|
||||
\\"extends\\": [\\"../../.eslintrc.json\\"],
|
||||
\\"ignorePatterns\\": [\\"!**/*\\"],
|
||||
\\"overrides\\": [
|
||||
"extends": ["../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
\\"files\\": [\\"*.ts\\", \\"*.tsx\\", \\"*.js\\", \\"*.jsx\\"],
|
||||
\\"rules\\": {}
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
\\"files\\": [\\"*.ts\\", \\"*.tsx\\"],
|
||||
\\"rules\\": {}
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
\\"files\\": [\\"*.js\\", \\"*.jsx\\"],
|
||||
\\"rules\\": {}
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -50,14 +50,14 @@ describe('@nrwl/linter:lint-project', () => {
|
||||
|
||||
const projectConfig = readProjectConfiguration(tree, 'test-lib');
|
||||
expect(projectConfig.targets.lint).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"**/*.ts",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ exports[`@nrwl/linter:workspace-rule --dir should support creating the rule in a
|
||||
|
||||
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 = 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';
|
||||
|
||||
// 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 = ESLintUtils.RuleCreator(() => __filename)({
|
||||
@ -131,7 +131,7 @@ exports[`@nrwl/linter:workspace-rule should generate the required files 1`] = `
|
||||
|
||||
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 = ESLintUtils.RuleCreator(() => __filename)({
|
||||
|
||||
@ -33,18 +33,18 @@ module.exports = {
|
||||
|
||||
exports[`@nrwl/linter:workspace-rules-project should generate the required files 2`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../../tsconfig.base.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"module\\": \\"commonjs\\"
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs"
|
||||
},
|
||||
\\"files\\": [],
|
||||
\\"include\\": [],
|
||||
\\"references\\": [
|
||||
"files": [],
|
||||
"include": [],
|
||||
"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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"./tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"outDir\\": \\"../../dist/out-tsc\\",
|
||||
\\"types\\": [\\"node\\"]
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"types": ["node"]
|
||||
},
|
||||
\\"exclude\\": [\\"**/*.spec.ts\\"],
|
||||
\\"include\\": [\\"**/*.ts\\"]
|
||||
"exclude": ["**/*.spec.ts"],
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`@nrwl/linter:workspace-rules-project should generate the required files 4`] = `
|
||||
"{
|
||||
\\"extends\\": \\"./tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"outDir\\": \\"../../dist/out-tsc\\",
|
||||
\\"module\\": \\"commonjs\\",
|
||||
\\"types\\": [\\"jest\\", \\"node\\"]
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"module": "commonjs",
|
||||
"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',
|
||||
preset: '../../jest.preset.js',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
||||
'^.+\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/tools/eslint-rules',
|
||||
|
||||
@ -74,25 +74,25 @@ describe('@nrwl/linter:workspace-rules-project', () => {
|
||||
|
||||
expect(readProjectConfiguration(tree, WORKSPACE_RULES_PROJECT_NAME))
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "eslint-rules",
|
||||
"root": "tools/eslint-rules",
|
||||
"sourceRoot": "tools/eslint-rules",
|
||||
"targets": Object {
|
||||
"test": Object {
|
||||
"configurations": Object {
|
||||
"ci": Object {
|
||||
"targets": {
|
||||
"test": {
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"ci": true,
|
||||
"codeCoverage": true,
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/jest:jest",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"jestConfig": "tools/eslint-rules/jest.config.ts",
|
||||
"passWithNoTests": true,
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{workspaceRoot}/coverage/{projectRoot}",
|
||||
],
|
||||
},
|
||||
|
||||
@ -190,18 +190,18 @@ describe('Remove ESLint parserOptions.project config if no rules requiring type-
|
||||
// Updated - no more parserOptions.project
|
||||
expect(readJson(tree, 'libs/workspace-lib/.eslintrc.json'))
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"extends": "../../../.eslintrc.json",
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
@ -210,18 +210,18 @@ describe('Remove ESLint parserOptions.project config if no rules requiring type-
|
||||
// Updated - no more parserOptions.project
|
||||
expect(readJson(tree, 'libs/another-lib/.eslintrc.json'))
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"extends": "../../../.eslintrc.json",
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {
|
||||
"rules": {
|
||||
"@typescript-eslint/await-thenable": "off",
|
||||
},
|
||||
},
|
||||
|
||||
@ -41,28 +41,28 @@ describe('addOutputs', () => {
|
||||
await addOutputs(tree);
|
||||
|
||||
expect(readProjectConfiguration(tree, 'proj')).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"$schema": "../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "proj",
|
||||
"root": "proj",
|
||||
"targets": Object {
|
||||
"lintWithOutputs": Object {
|
||||
"targets": {
|
||||
"lintWithOutputs": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {},
|
||||
"outputs": Array [
|
||||
"options": {},
|
||||
"outputs": [
|
||||
"dist",
|
||||
],
|
||||
},
|
||||
"lintWithoutOutputs": Object {
|
||||
"lintWithoutOutputs": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {},
|
||||
"outputs": Array [
|
||||
"options": {},
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
"notLint": Object {
|
||||
"notLint": {
|
||||
"executor": "@nrwl/node:build",
|
||||
"options": Object {},
|
||||
"options": {},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ describe('eslint8Updates()', () => {
|
||||
).toMatchInlineSnapshot(`
|
||||
"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 = ESLintUtils.RuleCreator(() => __filename)({
|
||||
|
||||
@ -2,23 +2,23 @@
|
||||
|
||||
exports[`addTypescriptEslintUtilsIfNeeded() should add @typescript-eslint/utils if plugins folder exists 1`] = `
|
||||
"{
|
||||
\\"name\\": \\"test-name\\",
|
||||
\\"dependencies\\": {},
|
||||
\\"devDependencies\\": {
|
||||
\\"@typescript-eslint/utils\\": \\"^5.58.0\\"
|
||||
"name": "test-name",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@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`] = `
|
||||
"{
|
||||
\\"name\\": \\"test-name\\",
|
||||
\\"dependencies\\": {},
|
||||
\\"devDependencies\\": {
|
||||
\\"@typescript-eslint/utils\\": \\"^5.58.0\\"
|
||||
"name": "test-name",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@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`] = `
|
||||
"{
|
||||
\\"name\\": \\"test-name\\",
|
||||
\\"dependencies\\": {},
|
||||
\\"devDependencies\\": {
|
||||
\\"@typescript-eslint/utils\\": \\"^5.58.0\\"
|
||||
"name": "test-name",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/utils": "^5.58.0"
|
||||
}
|
||||
}
|
||||
"
|
||||
|
||||
@ -73,7 +73,7 @@ describe('experimentalToUtilsUpdate()', () => {
|
||||
"import { ESLintUtils } from '@typescript-eslint/utils';
|
||||
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 = ESLintUtils.RuleCreator(() => __filename)({
|
||||
|
||||
@ -84,15 +84,15 @@ describe('15.7.1 migration (add-eslintignore)', () => {
|
||||
|
||||
expect(tree.exists('.eslintignore')).toBeTruthy();
|
||||
expect(readJson(tree, 'nx.json').targetDefaults).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"lint": Object {
|
||||
"inputs": Array [
|
||||
{
|
||||
"lint": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"{workspaceRoot}/.eslintrc.json",
|
||||
],
|
||||
},
|
||||
"lint2": Object {
|
||||
"inputs": Array [
|
||||
"lint2": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"{workspaceRoot}/.eslintrc.json",
|
||||
],
|
||||
|
||||
@ -22,58 +22,58 @@ exports[`convertTSLintDisableCommentsForProject should replace tslint:disable co
|
||||
`;
|
||||
|
||||
exports[`convertToESLintConfig() should work for a non-Angular project tslint.json file 1`] = `
|
||||
Object {
|
||||
"convertedESLintConfig": Object {
|
||||
"env": Object {
|
||||
{
|
||||
"convertedESLintConfig": {
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"node": true,
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": Object {
|
||||
"parserOptions": {
|
||||
"project": "tsconfig.json",
|
||||
"sourceType": "module",
|
||||
},
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
],
|
||||
"root": true,
|
||||
},
|
||||
"ensureESLintPlugins": Array [],
|
||||
"unconvertedTSLintRules": Array [],
|
||||
"ensureESLintPlugins": [],
|
||||
"unconvertedTSLintRules": [],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`convertToESLintConfig() should work for a project tslint.json file 1`] = `
|
||||
Object {
|
||||
"convertedESLintConfig": Object {
|
||||
"env": Object {
|
||||
{
|
||||
"convertedESLintConfig": {
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"node": true,
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": Object {
|
||||
"parserOptions": {
|
||||
"project": "tsconfig.json",
|
||||
"sourceType": "module",
|
||||
},
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"@angular-eslint/eslint-plugin",
|
||||
"@typescript-eslint",
|
||||
],
|
||||
"root": true,
|
||||
"rules": Object {
|
||||
"@angular-eslint/component-selector": Array [
|
||||
"rules": {
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "angular-app",
|
||||
"style": "kebab-case",
|
||||
"type": "element",
|
||||
},
|
||||
],
|
||||
"@angular-eslint/directive-selector": Array [
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "angular-app",
|
||||
"style": "camelCase",
|
||||
"type": "attribute",
|
||||
@ -81,43 +81,43 @@ Object {
|
||||
],
|
||||
},
|
||||
},
|
||||
"ensureESLintPlugins": Array [],
|
||||
"unconvertedTSLintRules": Array [],
|
||||
"ensureESLintPlugins": [],
|
||||
"unconvertedTSLintRules": [],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`convertToESLintConfig() should work for a root tslint.json file 1`] = `
|
||||
Object {
|
||||
"convertedESLintConfig": Object {
|
||||
"env": Object {
|
||||
{
|
||||
"convertedESLintConfig": {
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"node": true,
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": Object {
|
||||
"parserOptions": {
|
||||
"project": "tsconfig.json",
|
||||
"sourceType": "module",
|
||||
},
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"eslint-plugin-import",
|
||||
"@angular-eslint/eslint-plugin",
|
||||
"@angular-eslint/eslint-plugin-template",
|
||||
"@typescript-eslint",
|
||||
],
|
||||
"root": true,
|
||||
"rules": Object {
|
||||
"@angular-eslint/component-selector": Array [
|
||||
"rules": {
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "app",
|
||||
"style": "kebab-case",
|
||||
"type": "element",
|
||||
},
|
||||
],
|
||||
"@angular-eslint/directive-selector": Array [
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"prefix": "app",
|
||||
"style": "camelCase",
|
||||
"type": "attribute",
|
||||
@ -138,17 +138,17 @@ Object {
|
||||
"@angular-eslint/use-pipe-transform-interface": "error",
|
||||
"@typescript-eslint/consistent-type-definitions": "error",
|
||||
"@typescript-eslint/dot-notation": "off",
|
||||
"@typescript-eslint/explicit-member-accessibility": Array [
|
||||
"@typescript-eslint/explicit-member-accessibility": [
|
||||
"off",
|
||||
Object {
|
||||
{
|
||||
"accessibility": "explicit",
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/member-ordering": "error",
|
||||
"@typescript-eslint/naming-convention": Array [
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"error",
|
||||
Object {
|
||||
"format": Array [
|
||||
{
|
||||
"format": [
|
||||
"camelCase",
|
||||
"UPPER_CASE",
|
||||
],
|
||||
@ -159,17 +159,17 @@ Object {
|
||||
],
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
"@typescript-eslint/no-inferrable-types": Array [
|
||||
"@typescript-eslint/no-inferrable-types": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"ignoreParameters": true,
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": "error",
|
||||
"@typescript-eslint/no-shadow": Array [
|
||||
"@typescript-eslint/no-shadow": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"hoist": "all",
|
||||
},
|
||||
],
|
||||
@ -179,7 +179,7 @@ Object {
|
||||
"arrow-body-style": "error",
|
||||
"constructor-super": "error",
|
||||
"dot-notation": "off",
|
||||
"eqeqeq": Array [
|
||||
"eqeqeq": [
|
||||
"error",
|
||||
"smart",
|
||||
],
|
||||
@ -189,9 +189,9 @@ Object {
|
||||
"import/no-deprecated": "warn",
|
||||
"no-bitwise": "error",
|
||||
"no-caller": "error",
|
||||
"no-console": Array [
|
||||
"no-console": [
|
||||
"error",
|
||||
Object {},
|
||||
{},
|
||||
],
|
||||
"no-debugger": "error",
|
||||
"no-empty": "off",
|
||||
@ -199,7 +199,7 @@ Object {
|
||||
"no-eval": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-restricted-imports": Array [
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
"rxjs/Rx",
|
||||
],
|
||||
@ -213,32 +213,32 @@ Object {
|
||||
"radix": "error",
|
||||
},
|
||||
},
|
||||
"ensureESLintPlugins": Array [
|
||||
"ensureESLintPlugins": [
|
||||
"eslint-plugin-import",
|
||||
],
|
||||
"unconvertedTSLintRules": Array [],
|
||||
"unconvertedTSLintRules": [],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`convertToESLintConfig() should work for an e2e project tslint.json file 1`] = `
|
||||
Object {
|
||||
"convertedESLintConfig": Object {
|
||||
"env": Object {
|
||||
{
|
||||
"convertedESLintConfig": {
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"node": true,
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": Object {
|
||||
"parserOptions": {
|
||||
"project": "tsconfig.json",
|
||||
"sourceType": "module",
|
||||
},
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
],
|
||||
"root": true,
|
||||
},
|
||||
"ensureESLintPlugins": Array [],
|
||||
"unconvertedTSLintRules": Array [],
|
||||
"ensureESLintPlugins": [],
|
||||
"unconvertedTSLintRules": [],
|
||||
}
|
||||
`;
|
||||
|
||||
@ -1,26 +1,26 @@
|
||||
// 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`] = `
|
||||
Object {
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
],
|
||||
"rules": Object {
|
||||
"rules": {
|
||||
"some-converted-rule": "error",
|
||||
},
|
||||
},
|
||||
],
|
||||
"rules": Object {
|
||||
"rules": {
|
||||
"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`] = `
|
||||
Object {
|
||||
"rules": Object {
|
||||
{
|
||||
"rules": {
|
||||
"some-converted-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`] = `
|
||||
Object {
|
||||
"rules": Object {
|
||||
{
|
||||
"rules": {
|
||||
"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`] = `
|
||||
Object {
|
||||
"rules": Object {
|
||||
{
|
||||
"rules": {
|
||||
"some-recommended-project-eslint-rule": "error",
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 1`] = `
|
||||
Object {
|
||||
"dependencies": Object {},
|
||||
"devDependencies": Object {
|
||||
{
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"codelyzer": "latest",
|
||||
"tslint": "latest",
|
||||
},
|
||||
@ -55,25 +55,25 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 2`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"generators": Object {
|
||||
"@nrwl/angular": Object {
|
||||
"application": Object {
|
||||
"generators": {
|
||||
"@nrwl/angular": {
|
||||
"application": {
|
||||
"linter": "tslint",
|
||||
},
|
||||
"library": Object {
|
||||
"library": {
|
||||
"linter": "tslint",
|
||||
},
|
||||
},
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"test",
|
||||
@ -87,30 +87,30 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 3`] = `
|
||||
Object {
|
||||
{
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"generators": Object {
|
||||
"@nrwl/angular:application": Object {
|
||||
"generators": {
|
||||
"@nrwl/angular:application": {
|
||||
"e2eTestRunner": "cypress",
|
||||
"linter": "eslint",
|
||||
"unitTestRunner": "jest",
|
||||
},
|
||||
"@nrwl/angular:library": Object {
|
||||
"@nrwl/angular:library": {
|
||||
"linter": "tslint",
|
||||
},
|
||||
},
|
||||
"name": "foo",
|
||||
"projectType": "application",
|
||||
"root": "apps/foo",
|
||||
"targets": Object {
|
||||
"lint": Object {
|
||||
"targets": {
|
||||
"lint": {
|
||||
"executor": "@angular-devkit/build-angular:tslint",
|
||||
"options": Object {
|
||||
"exclude": Array [
|
||||
"options": {
|
||||
"exclude": [
|
||||
"**/node_modules/**",
|
||||
"!apps/foo/**/*",
|
||||
],
|
||||
"tsConfig": Array [
|
||||
"tsConfig": [
|
||||
"apps/foo/tsconfig.app.json",
|
||||
],
|
||||
},
|
||||
@ -120,23 +120,23 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 4`] = `
|
||||
Object {
|
||||
"dependencies": Object {},
|
||||
"devDependencies": Object {},
|
||||
{
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
"name": "test-name",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 5`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"test",
|
||||
@ -150,10 +150,10 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`ProjectConverter removeTSLintFromWorkspace() should remove all relevant traces of TSLint from the workspace 6`] = `
|
||||
Object {
|
||||
{
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"generators": Object {
|
||||
"@nrwl/angular:application": Object {
|
||||
"generators": {
|
||||
"@nrwl/angular:application": {
|
||||
"e2eTestRunner": "cypress",
|
||||
"unitTestRunner": "jest",
|
||||
},
|
||||
@ -161,15 +161,15 @@ Object {
|
||||
"name": "foo",
|
||||
"projectType": "application",
|
||||
"root": "apps/foo",
|
||||
"targets": Object {
|
||||
"lint": Object {
|
||||
"targets": {
|
||||
"lint": {
|
||||
"executor": "@angular-devkit/build-angular:tslint",
|
||||
"options": Object {
|
||||
"exclude": Array [
|
||||
"options": {
|
||||
"exclude": [
|
||||
"**/node_modules/**",
|
||||
"!apps/foo/**/*",
|
||||
],
|
||||
"tsConfig": Array [
|
||||
"tsConfig": [
|
||||
"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`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"generators": Object {
|
||||
"@nrwl/angular": Object {
|
||||
"convert-tslint-to-eslint": Object {
|
||||
"generators": {
|
||||
"@nrwl/angular": {
|
||||
"convert-tslint-to-eslint": {
|
||||
"removeTSLintIfNoMoreTSLintTargets": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"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`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"test",
|
||||
@ -230,25 +230,25 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`ProjectConverter setDefaults() should save in nx.json 1`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"generators": Object {
|
||||
"@nrwl/angular": Object {
|
||||
"application": Object {
|
||||
"generators": {
|
||||
"@nrwl/angular": {
|
||||
"application": {
|
||||
"linter": "tslint",
|
||||
},
|
||||
"library": Object {
|
||||
"library": {
|
||||
"linter": "tslint",
|
||||
},
|
||||
},
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"test",
|
||||
@ -262,29 +262,29 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`ProjectConverter setDefaults() should save in nx.json 2`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"generators": Object {
|
||||
"@nrwl/angular": Object {
|
||||
"application": Object {
|
||||
"generators": {
|
||||
"@nrwl/angular": {
|
||||
"application": {
|
||||
"linter": "tslint",
|
||||
},
|
||||
"convert-tslint-to-eslint": Object {
|
||||
"convert-tslint-to-eslint": {
|
||||
"ignoreExistingTslintConfig": true,
|
||||
"removeTSLintIfNoMoreTSLintTargets": true,
|
||||
},
|
||||
"library": Object {
|
||||
"library": {
|
||||
"linter": "tslint",
|
||||
},
|
||||
},
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"test",
|
||||
@ -298,29 +298,29 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`ProjectConverter setDefaults() should save in nx.json 3`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"generators": Object {
|
||||
"@nrwl/angular": Object {
|
||||
"application": Object {
|
||||
"generators": {
|
||||
"@nrwl/angular": {
|
||||
"application": {
|
||||
"linter": "tslint",
|
||||
},
|
||||
"convert-tslint-to-eslint": Object {
|
||||
"convert-tslint-to-eslint": {
|
||||
"ignoreExistingTslintConfig": false,
|
||||
"removeTSLintIfNoMoreTSLintTargets": false,
|
||||
},
|
||||
"library": Object {
|
||||
"library": {
|
||||
"linter": "tslint",
|
||||
},
|
||||
},
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"test",
|
||||
@ -334,17 +334,17 @@ Object {
|
||||
`;
|
||||
|
||||
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`] = `
|
||||
"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`] = `
|
||||
"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.
|
||||
"
|
||||
`;
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`convert-tslint-to-eslint should work for NestJS applications 1`] = `
|
||||
Object {
|
||||
"dependencies": Object {},
|
||||
"devDependencies": Object {
|
||||
{
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@nrwl/eslint-plugin-nx": "0.0.1",
|
||||
"@nrwl/linter": "0.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
||||
@ -17,20 +17,20 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`convert-tslint-to-eslint should work for NestJS applications 2`] = `
|
||||
Object {
|
||||
{
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "nest-app-1",
|
||||
"projectType": "application",
|
||||
"root": "apps/nest-app-1",
|
||||
"targets": Object {
|
||||
"lint": Object {
|
||||
"targets": {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/nest-app-1/**/*.ts",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
@ -39,35 +39,35 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`convert-tslint-to-eslint should work for NestJS applications 3`] = `
|
||||
Object {
|
||||
"ignorePatterns": Array [
|
||||
{
|
||||
"ignorePatterns": [
|
||||
"**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {
|
||||
"@nrwl/nx/enforce-module-boundaries": Array [
|
||||
"rules": {
|
||||
"@nrwl/nx/enforce-module-boundaries": [
|
||||
"error",
|
||||
Object {
|
||||
"allow": Array [
|
||||
{
|
||||
"allow": [
|
||||
"@nx-example/shared/product/data/testing",
|
||||
],
|
||||
"depConstraints": Array [
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
"depConstraints": [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:feature",
|
||||
"type:ui",
|
||||
],
|
||||
"sourceTag": "type:app",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:ui",
|
||||
"type:data",
|
||||
"type:types",
|
||||
@ -75,48 +75,48 @@ Object {
|
||||
],
|
||||
"sourceTag": "type:feature",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:types",
|
||||
],
|
||||
"sourceTag": "type:types",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:state",
|
||||
"type:types",
|
||||
"type:data",
|
||||
],
|
||||
"sourceTag": "type:state",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:types",
|
||||
],
|
||||
"sourceTag": "type:data",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:e2e-utils",
|
||||
],
|
||||
"sourceTag": "type:e2e",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:types",
|
||||
"type:ui",
|
||||
],
|
||||
"sourceTag": "type:ui",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"scope:products",
|
||||
"scope:shared",
|
||||
],
|
||||
"sourceTag": "scope:products",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"scope:cart",
|
||||
"scope:shared",
|
||||
],
|
||||
@ -128,49 +128,49 @@ Object {
|
||||
],
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/typescript",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/javascript",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
],
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"eslint-plugin-import",
|
||||
"@typescript-eslint",
|
||||
],
|
||||
"root": true,
|
||||
"rules": Object {
|
||||
"rules": {
|
||||
"@typescript-eslint/consistent-type-definitions": "error",
|
||||
"@typescript-eslint/dot-notation": "off",
|
||||
"@typescript-eslint/explicit-member-accessibility": Array [
|
||||
"@typescript-eslint/explicit-member-accessibility": [
|
||||
"off",
|
||||
Object {
|
||||
{
|
||||
"accessibility": "explicit",
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/member-ordering": "error",
|
||||
"@typescript-eslint/naming-convention": Array [
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"error",
|
||||
Object {
|
||||
"format": Array [
|
||||
{
|
||||
"format": [
|
||||
"camelCase",
|
||||
"UPPER_CASE",
|
||||
],
|
||||
@ -181,17 +181,17 @@ Object {
|
||||
],
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
"@typescript-eslint/no-inferrable-types": Array [
|
||||
"@typescript-eslint/no-inferrable-types": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"ignoreParameters": true,
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": "error",
|
||||
"@typescript-eslint/no-shadow": Array [
|
||||
"@typescript-eslint/no-shadow": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"hoist": "all",
|
||||
},
|
||||
],
|
||||
@ -201,7 +201,7 @@ Object {
|
||||
"arrow-body-style": "error",
|
||||
"constructor-super": "error",
|
||||
"dot-notation": "off",
|
||||
"eqeqeq": Array [
|
||||
"eqeqeq": [
|
||||
"error",
|
||||
"smart",
|
||||
],
|
||||
@ -211,9 +211,9 @@ Object {
|
||||
"import/no-deprecated": "warn",
|
||||
"no-bitwise": "error",
|
||||
"no-caller": "error",
|
||||
"no-console": Array [
|
||||
"no-console": [
|
||||
"error",
|
||||
Object {},
|
||||
{},
|
||||
],
|
||||
"no-debugger": "error",
|
||||
"no-empty": "off",
|
||||
@ -221,7 +221,7 @@ Object {
|
||||
"no-eval": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-restricted-imports": Array [
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
"rxjs/Rx",
|
||||
],
|
||||
@ -236,7 +236,7 @@ Object {
|
||||
},
|
||||
},
|
||||
],
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"@nrwl/nx",
|
||||
],
|
||||
"root": true,
|
||||
@ -244,51 +244,51 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`convert-tslint-to-eslint should work for NestJS applications 4`] = `
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
],
|
||||
"rules": Object {
|
||||
"rules": {
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`convert-tslint-to-eslint should work for NestJS libraries 1`] = `
|
||||
Object {
|
||||
"dependencies": Object {},
|
||||
"devDependencies": Object {
|
||||
{
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@nrwl/eslint-plugin-nx": "0.0.1",
|
||||
"@nrwl/linter": "0.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
||||
@ -302,20 +302,20 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`convert-tslint-to-eslint should work for NestJS libraries 2`] = `
|
||||
Object {
|
||||
{
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "nest-lib-1",
|
||||
"projectType": "library",
|
||||
"root": "libs/nest-lib-1",
|
||||
"targets": Object {
|
||||
"lint": Object {
|
||||
"targets": {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"libs/nest-lib-1/**/*.ts",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
},
|
||||
@ -324,35 +324,35 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`convert-tslint-to-eslint should work for NestJS libraries 3`] = `
|
||||
Object {
|
||||
"ignorePatterns": Array [
|
||||
{
|
||||
"ignorePatterns": [
|
||||
"**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {
|
||||
"@nrwl/nx/enforce-module-boundaries": Array [
|
||||
"rules": {
|
||||
"@nrwl/nx/enforce-module-boundaries": [
|
||||
"error",
|
||||
Object {
|
||||
"allow": Array [
|
||||
{
|
||||
"allow": [
|
||||
"@nx-example/shared/product/data/testing",
|
||||
],
|
||||
"depConstraints": Array [
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
"depConstraints": [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:feature",
|
||||
"type:ui",
|
||||
],
|
||||
"sourceTag": "type:app",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:ui",
|
||||
"type:data",
|
||||
"type:types",
|
||||
@ -360,48 +360,48 @@ Object {
|
||||
],
|
||||
"sourceTag": "type:feature",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:types",
|
||||
],
|
||||
"sourceTag": "type:types",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:state",
|
||||
"type:types",
|
||||
"type:data",
|
||||
],
|
||||
"sourceTag": "type:state",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:types",
|
||||
],
|
||||
"sourceTag": "type:data",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:e2e-utils",
|
||||
],
|
||||
"sourceTag": "type:e2e",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"type:types",
|
||||
"type:ui",
|
||||
],
|
||||
"sourceTag": "type:ui",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"scope:products",
|
||||
"scope:shared",
|
||||
],
|
||||
"sourceTag": "scope:products",
|
||||
},
|
||||
Object {
|
||||
"onlyDependOnLibsWithTags": Array [
|
||||
{
|
||||
"onlyDependOnLibsWithTags": [
|
||||
"scope:cart",
|
||||
"scope:shared",
|
||||
],
|
||||
@ -413,49 +413,49 @@ Object {
|
||||
],
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/typescript",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/javascript",
|
||||
],
|
||||
"files": Array [
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
],
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"eslint-plugin-import",
|
||||
"@typescript-eslint",
|
||||
],
|
||||
"root": true,
|
||||
"rules": Object {
|
||||
"rules": {
|
||||
"@typescript-eslint/consistent-type-definitions": "error",
|
||||
"@typescript-eslint/dot-notation": "off",
|
||||
"@typescript-eslint/explicit-member-accessibility": Array [
|
||||
"@typescript-eslint/explicit-member-accessibility": [
|
||||
"off",
|
||||
Object {
|
||||
{
|
||||
"accessibility": "explicit",
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/member-ordering": "error",
|
||||
"@typescript-eslint/naming-convention": Array [
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"error",
|
||||
Object {
|
||||
"format": Array [
|
||||
{
|
||||
"format": [
|
||||
"camelCase",
|
||||
"UPPER_CASE",
|
||||
],
|
||||
@ -466,17 +466,17 @@ Object {
|
||||
],
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
"@typescript-eslint/no-inferrable-types": Array [
|
||||
"@typescript-eslint/no-inferrable-types": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"ignoreParameters": true,
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": "error",
|
||||
"@typescript-eslint/no-shadow": Array [
|
||||
"@typescript-eslint/no-shadow": [
|
||||
"error",
|
||||
Object {
|
||||
{
|
||||
"hoist": "all",
|
||||
},
|
||||
],
|
||||
@ -486,7 +486,7 @@ Object {
|
||||
"arrow-body-style": "error",
|
||||
"constructor-super": "error",
|
||||
"dot-notation": "off",
|
||||
"eqeqeq": Array [
|
||||
"eqeqeq": [
|
||||
"error",
|
||||
"smart",
|
||||
],
|
||||
@ -496,9 +496,9 @@ Object {
|
||||
"import/no-deprecated": "warn",
|
||||
"no-bitwise": "error",
|
||||
"no-caller": "error",
|
||||
"no-console": Array [
|
||||
"no-console": [
|
||||
"error",
|
||||
Object {},
|
||||
{},
|
||||
],
|
||||
"no-debugger": "error",
|
||||
"no-empty": "off",
|
||||
@ -506,7 +506,7 @@ Object {
|
||||
"no-eval": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-restricted-imports": Array [
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
"rxjs/Rx",
|
||||
],
|
||||
@ -521,7 +521,7 @@ Object {
|
||||
},
|
||||
},
|
||||
],
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"@nrwl/nx",
|
||||
],
|
||||
"root": true,
|
||||
@ -529,42 +529,42 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`convert-tslint-to-eslint should work for NestJS libraries 4`] = `
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
"plugins": Array [
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
],
|
||||
"rules": Object {
|
||||
"rules": {
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
},
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ export default {
|
||||
displayName: 'my-lib',
|
||||
preset: '../../jest.preset.js',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
||||
'^.+\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/libs/my-lib',
|
||||
@ -21,7 +21,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
testEnvironment: 'node',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
||||
'^.+\\\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/libs/my-lib',
|
||||
@ -30,15 +30,15 @@ export default {
|
||||
`;
|
||||
|
||||
exports[`lib --unit-test-runner none should not generate test configuration 1`] = `
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": Array [],
|
||||
"include": Array [],
|
||||
"references": Array [
|
||||
Object {
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json",
|
||||
},
|
||||
],
|
||||
@ -46,32 +46,32 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`lib --unit-test-runner none should not generate test configuration 2`] = `
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"libs/my-lib/**/*.ts",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`lib nested should create a local tsconfig.json 1`] = `
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
},
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"files": Array [],
|
||||
"include": Array [],
|
||||
"references": Array [
|
||||
Object {
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
],
|
||||
@ -92,18 +92,18 @@ export class MyLibModule {}
|
||||
`;
|
||||
|
||||
exports[`lib not nested should create a local tsconfig.json 1`] = `
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": Array [],
|
||||
"include": Array [],
|
||||
"references": Array [
|
||||
Object {
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
],
|
||||
@ -111,36 +111,36 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`lib not nested should generate files 1`] = `
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@ -14,67 +14,67 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
|
||||
}
|
||||
\`}</style>
|
||||
|
||||
<div className=\\"wrapper\\">
|
||||
<div className=\\"container\\">
|
||||
<div id=\\"welcome\\">
|
||||
<div className="wrapper">
|
||||
<div className="container">
|
||||
<div id="welcome">
|
||||
<h1>
|
||||
<span> Hello there, </span>
|
||||
Welcome my-app 👋
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div id=\\"hero\\" className=\\"rounded\\">
|
||||
<div className=\\"text-container\\">
|
||||
<div id="hero" className="rounded">
|
||||
<div className="text-container">
|
||||
<h2>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
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\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
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"
|
||||
/>
|
||||
</svg>
|
||||
<span>You're up and running</span>
|
||||
</h2>
|
||||
<a href=\\"#commands\\"> What's next? </a>
|
||||
<a href="#commands"> What's next? </a>
|
||||
</div>
|
||||
<div className=\\"logo-container\\">
|
||||
<div className="logo-container">
|
||||
<svg
|
||||
fill=\\"currentColor\\"
|
||||
role=\\"img\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="currentColor"
|
||||
role="img"
|
||||
viewBox="0 0 24 24"
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id=\\"middle-content\\">
|
||||
<div id=\\"learning-materials\\" className=\\"rounded shadow\\">
|
||||
<div id="middle-content">
|
||||
<div id="learning-materials" className="rounded shadow">
|
||||
<h2>Learning materials</h2>
|
||||
<a
|
||||
href=\\"https://nx.dev/getting-started/intro?utm_source=nx-project\\"
|
||||
target=\\"_blank\\"
|
||||
rel=\\"noreferrer\\"
|
||||
className=\\"list-item-link\\"
|
||||
href="https://nx.dev/getting-started/intro?utm_source=nx-project"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="list-item-link"
|
||||
>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
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\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
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"
|
||||
/>
|
||||
</svg>
|
||||
<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>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
strokeWidth=\\"2\\"
|
||||
d=\\"M9 5l7 7-7 7\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth="2"
|
||||
d="M9 5l7 7-7 7"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
<a
|
||||
href=\\"https://blog.nrwl.io/?utm_source=nx-project\\"
|
||||
target=\\"_blank\\"
|
||||
rel=\\"noreferrer\\"
|
||||
className=\\"list-item-link\\"
|
||||
href="https://blog.nrwl.io/?utm_source=nx-project"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="list-item-link"
|
||||
>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
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\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
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"
|
||||
/>
|
||||
</svg>
|
||||
<span>
|
||||
@ -119,69 +119,69 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
|
||||
<span> Changelog, features & events </span>
|
||||
</span>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
strokeWidth=\\"2\\"
|
||||
d=\\"M9 5l7 7-7 7\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth="2"
|
||||
d="M9 5l7 7-7 7"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
<a
|
||||
href=\\"https://www.youtube.com/@NxDevtools/videos?utm_source=nx-project&sub_confirmation=1\\"
|
||||
target=\\"_blank\\"
|
||||
rel=\\"noreferrer\\"
|
||||
className=\\"list-item-link\\"
|
||||
href="https://www.youtube.com/@NxDevtools/videos?utm_source=nx-project&sub_confirmation=1"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="list-item-link"
|
||||
>
|
||||
<svg
|
||||
role=\\"img\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
fill=\\"currentColor\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
role="img"
|
||||
viewBox="0 0 24 24"
|
||||
fill="currentColor"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<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>
|
||||
<span>
|
||||
YouTube channel
|
||||
<span> Nx Show, talks & tutorials </span>
|
||||
</span>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
strokeWidth=\\"2\\"
|
||||
d=\\"M9 5l7 7-7 7\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth="2"
|
||||
d="M9 5l7 7-7 7"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
<a
|
||||
href=\\"https://nx.dev/react-tutorial/1-code-generation?utm_source=nx-project\\"
|
||||
target=\\"_blank\\"
|
||||
rel=\\"noreferrer\\"
|
||||
className=\\"list-item-link\\"
|
||||
href="https://nx.dev/react-tutorial/1-code-generation?utm_source=nx-project"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="list-item-link"
|
||||
>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
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\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
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"
|
||||
/>
|
||||
</svg>
|
||||
<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>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
strokeWidth=\\"2\\"
|
||||
d=\\"M9 5l7 7-7 7\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth="2"
|
||||
d="M9 5l7 7-7 7"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
<a
|
||||
href=\\"https://nxplaybook.com/?utm_source=nx-project\\"
|
||||
target=\\"_blank\\"
|
||||
rel=\\"noreferrer\\"
|
||||
className=\\"list-item-link\\"
|
||||
href="https://nxplaybook.com/?utm_source=nx-project"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="list-item-link"
|
||||
>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<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 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
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
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\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
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"
|
||||
/>
|
||||
</svg>
|
||||
<span>
|
||||
@ -228,59 +228,59 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
|
||||
<span> Nx custom courses </span>
|
||||
</span>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
strokeWidth=\\"2\\"
|
||||
d=\\"M9 5l7 7-7 7\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth="2"
|
||||
d="M9 5l7 7-7 7"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<div id=\\"other-links\\">
|
||||
<div id="other-links">
|
||||
<a
|
||||
id=\\"nx-console\\"
|
||||
className=\\"button-pill rounded shadow\\"
|
||||
href=\\"https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console&utm_source=nx-project\\"
|
||||
target=\\"_blank\\"
|
||||
rel=\\"noreferrer\\"
|
||||
id="nx-console"
|
||||
className="button-pill rounded shadow"
|
||||
href="https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console&utm_source=nx-project"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<svg
|
||||
fill=\\"currentColor\\"
|
||||
role=\\"img\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="currentColor"
|
||||
role="img"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<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>
|
||||
<span>
|
||||
Install Nx Console
|
||||
<span>Plugin for VSCode</span>
|
||||
</span>
|
||||
</a>
|
||||
<div id=\\"nx-cloud\\" className=\\"rounded shadow\\">
|
||||
<div id="nx-cloud" className="rounded shadow">
|
||||
<div>
|
||||
<svg
|
||||
id=\\"nx-cloud-logo\\"
|
||||
role=\\"img\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
stroke=\\"currentColor\\"
|
||||
fill=\\"transparent\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
id="nx-cloud-logo"
|
||||
role="img"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
stroke="currentColor"
|
||||
fill="transparent"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
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\\"
|
||||
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"
|
||||
/>
|
||||
<path
|
||||
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\\"
|
||||
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"
|
||||
/>
|
||||
</svg>
|
||||
<h2>
|
||||
@ -294,28 +294,28 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
|
||||
</p>
|
||||
<pre>nx connect-to-nx-cloud</pre>
|
||||
<a
|
||||
href=\\"https://nx.app/?utm_source=nx-project\\"
|
||||
target=\\"_blank\\"
|
||||
rel=\\"noreferrer\\"
|
||||
href="https://nx.app/?utm_source=nx-project"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
{' '}
|
||||
What is Nx Cloud?{' '}
|
||||
</a>
|
||||
</div>
|
||||
<a
|
||||
id=\\"nx-repo\\"
|
||||
className=\\"button-pill rounded shadow\\"
|
||||
href=\\"https://github.com/nrwl/nx?utm_source=nx-project\\"
|
||||
target=\\"_blank\\"
|
||||
rel=\\"noreferrer\\"
|
||||
id="nx-repo"
|
||||
className="button-pill rounded shadow"
|
||||
href="https://github.com/nrwl/nx?utm_source=nx-project"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<svg
|
||||
fill=\\"currentColor\\"
|
||||
role=\\"img\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="currentColor"
|
||||
role="img"
|
||||
viewBox="0 0 24 24"
|
||||
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>
|
||||
<span>
|
||||
Nx is open source
|
||||
@ -325,22 +325,22 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id=\\"commands\\" className=\\"rounded shadow\\">
|
||||
<div id="commands" className="rounded shadow">
|
||||
<h2>Next steps</h2>
|
||||
<p>Here are some things you can do with Nx:</p>
|
||||
<details>
|
||||
<summary>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
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\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
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"
|
||||
/>
|
||||
</svg>
|
||||
Add UI library
|
||||
@ -355,16 +355,16 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
|
||||
<details>
|
||||
<summary>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
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\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
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"
|
||||
/>
|
||||
</svg>
|
||||
View interactive project graph
|
||||
@ -374,16 +374,16 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
|
||||
<details>
|
||||
<summary>
|
||||
<svg
|
||||
fill=\\"none\\"
|
||||
stroke=\\"currentColor\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
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\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
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"
|
||||
/>
|
||||
</svg>
|
||||
Run affected commands
|
||||
@ -399,19 +399,19 @@ exports[`app --style styled-jsx should use <style jsx> in index page 1`] = `
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<p id=\\"love\\">
|
||||
<p id="love">
|
||||
Carefully crafted with
|
||||
<svg
|
||||
fill=\\"currentColor\\"
|
||||
stroke=\\"none\\"
|
||||
viewBox=\\"0 0 24 24\\"
|
||||
xmlns=\\"http://www.w3.org/2000/svg\\"
|
||||
fill="currentColor"
|
||||
stroke="none"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
strokeLinecap=\\"round\\"
|
||||
strokeLinejoin=\\"round\\"
|
||||
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\\"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
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"
|
||||
/>
|
||||
</svg>
|
||||
</p>
|
||||
|
||||
@ -334,51 +334,51 @@ describe('app', () => {
|
||||
|
||||
const eslintJson = readJson(tree, '/apps/my-app/.eslintrc.json');
|
||||
expect(eslintJson).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"env": Object {
|
||||
{
|
||||
"env": {
|
||||
"jest": true,
|
||||
},
|
||||
"extends": Array [
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/react-typescript",
|
||||
"next",
|
||||
"next/core-web-vitals",
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
".next/**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {
|
||||
"@next/next/no-html-link-for-pages": Array [
|
||||
"rules": {
|
||||
"@next/next/no-html-link-for-pages": [
|
||||
"error",
|
||||
"apps/my-app/pages",
|
||||
],
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
"rules": Object {
|
||||
"rules": {
|
||||
"@next/next/no-html-link-for-pages": "off",
|
||||
},
|
||||
}
|
||||
|
||||
@ -116,18 +116,18 @@ describe('app', () => {
|
||||
|
||||
const tsconfig = readJson(tree, 'my-node-app/tsconfig.json');
|
||||
expect(tsconfig).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true,
|
||||
},
|
||||
"extends": "../tsconfig.base.json",
|
||||
"files": Array [],
|
||||
"include": Array [],
|
||||
"references": Array [
|
||||
Object {
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.app.json",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
],
|
||||
@ -144,36 +144,36 @@ describe('app', () => {
|
||||
]);
|
||||
const eslintrc = readJson(tree, 'my-node-app/.eslintrc.json');
|
||||
expect(eslintrc).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
@ -292,14 +292,14 @@ describe('app', () => {
|
||||
const project = readProjectConfiguration(tree, 'my-node-app');
|
||||
expect(project.targets.test).toBeUndefined();
|
||||
expect(project.targets.lint).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"my-node-app/**/*.ts",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
}
|
||||
@ -374,7 +374,7 @@ describe('app', () => {
|
||||
preset: '../jest.preset.js',
|
||||
testEnvironment: 'node',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]s$': 'babel-jest',
|
||||
'^.+\\\\.[tj]s$': 'babel-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../coverage/my-node-app',
|
||||
|
||||
@ -93,18 +93,18 @@ describe('lib', () => {
|
||||
await libraryGenerator(tree, baseLibraryConfig);
|
||||
const tsconfigJson = readJson(tree, 'libs/my-lib/tsconfig.json');
|
||||
expect(tsconfigJson).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": Array [],
|
||||
"include": Array [],
|
||||
"references": Array [
|
||||
Object {
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
],
|
||||
@ -142,36 +142,36 @@ describe('lib', () => {
|
||||
|
||||
const eslintrc = readJson(tree, 'libs/my-lib/.eslintrc.json');
|
||||
expect(eslintrc).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
@ -360,10 +360,10 @@ describe('lib', () => {
|
||||
expect(projectConfiguration.root).toEqual('libs/my-lib');
|
||||
|
||||
expect(projectConfiguration.targets.build).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/js:tsc",
|
||||
"options": Object {
|
||||
"assets": Array [
|
||||
"options": {
|
||||
"assets": [
|
||||
"libs/my-lib/*.md",
|
||||
],
|
||||
"main": "libs/my-lib/src/index.ts",
|
||||
@ -371,7 +371,7 @@ describe('lib', () => {
|
||||
"packageJson": "libs/my-lib/package.json",
|
||||
"tsConfig": "libs/my-lib/tsconfig.lib.json",
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputPath}",
|
||||
],
|
||||
}
|
||||
@ -463,7 +463,7 @@ describe('lib', () => {
|
||||
preset: '../../jest.preset.js',
|
||||
testEnvironment: 'node',
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]s$': 'babel-jest',
|
||||
'^.+\\\\.[tj]s$': 'babel-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/libs/my-lib',
|
||||
|
||||
@ -17,7 +17,7 @@ module.exports = {
|
||||
* It's recommend you update to the latest format.
|
||||
* You can do this by removing snapshotFormat property
|
||||
* and running tests with --update-snapshot flag.
|
||||
* Example: \\"nx affected --targets=test --update-snapshot\\"
|
||||
* Example: "nx affected --targets=test --update-snapshot"
|
||||
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
|
||||
*/
|
||||
snapshotFormat: { escapeString: true, printBasicPrototype: true },
|
||||
@ -32,7 +32,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -47,7 +47,7 @@ export default {
|
||||
* 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\\"
|
||||
* 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 },
|
||||
@ -58,7 +58,7 @@ export default {
|
||||
exports[`Nx Plugin Migration - jest 29 update configs should add snapshot config with no root preset 2`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
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.
|
||||
* 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\\"
|
||||
* 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 },
|
||||
@ -95,7 +95,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -111,7 +111,7 @@ export default {
|
||||
exports[`Nx Plugin Migration - jest 29 update configs should be idempotent 2`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -189,7 +189,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
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`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -236,7 +236,7 @@ module.exports = {
|
||||
* It's recommend you update to the latest format.
|
||||
* You can do this by removing snapshotFormat property
|
||||
* and running tests with --update-snapshot flag.
|
||||
* Example: \\"nx affected --targets=test --update-snapshot\\"
|
||||
* Example: "nx affected --targets=test --update-snapshot"
|
||||
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
|
||||
*/
|
||||
snapshotFormat: { escapeString: true, printBasicPrototype: true },
|
||||
@ -251,7 +251,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -267,7 +267,7 @@ export default {
|
||||
exports[`Nx Plugin Migration - jest 29 update configs should update root preset 3`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -310,7 +310,7 @@ module.exports = {
|
||||
* It's recommend you update to the latest format.
|
||||
* You can do this by removing snapshotFormat property
|
||||
* and running tests with --update-snapshot flag.
|
||||
* Example: \\"nx affected --targets=test --update-snapshot\\"
|
||||
* Example: "nx affected --targets=test --update-snapshot"
|
||||
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
|
||||
*/
|
||||
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`] = `
|
||||
"export default {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest',
|
||||
'^.+\\\\.[tj]sx?$': 'babel-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
|
||||
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`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest',
|
||||
'^.+\\\\.[tj]sx?$': 'babel-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
|
||||
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`] = `
|
||||
"export default {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': 'babel-jest',
|
||||
'^.+\\\\.[tj]sx?$': 'babel-jest',
|
||||
},
|
||||
globals: { something: 'else',
|
||||
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`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': ['ts-jest', {
|
||||
'^.+\\\\.[tj]sx?$': ['ts-jest', {
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json'
|
||||
}],
|
||||
},
|
||||
@ -380,7 +380,7 @@ exports[`Nx Plugin Migration - jest 29 update configs should work with jest-pres
|
||||
transform: {
|
||||
'^.+.(ts|mjs|js|html)$': ['jest-preset-angular', {
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\\\.(html|svg)$',
|
||||
stringifyContentPathRegex: '\\.(html|svg)$',
|
||||
}],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
|
||||
@ -396,7 +396,7 @@ exports[`Nx Plugin Migration - jest 29 update configs should work with jest-pres
|
||||
transform: {
|
||||
'^.+.(ts|mjs|js|html)$': ['jest-preset-angular', {
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\\\.(html|svg)$',
|
||||
stringifyContentPathRegex: '\\.(html|svg)$',
|
||||
}],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html']
|
||||
@ -413,7 +413,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
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`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
@ -456,7 +456,7 @@ export default {
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
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`] = `
|
||||
"module.exports = {
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]sx?$': [
|
||||
'^.+\\\\.[tj]sx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
|
||||
@ -34,14 +34,14 @@ describe('project configuration', () => {
|
||||
addProjectConfiguration(tree, 'test', projectConfiguration);
|
||||
|
||||
expect(readProjectConfiguration(tree, 'test')).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "test",
|
||||
"root": "libs/test",
|
||||
"sourceRoot": "libs/test/src",
|
||||
"targets": Object {},
|
||||
}
|
||||
`);
|
||||
{
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "test",
|
||||
"root": "libs/test",
|
||||
"sourceRoot": "libs/test/src",
|
||||
"targets": {},
|
||||
}
|
||||
`);
|
||||
expect(tree.exists('libs/test/project.json')).toBeTruthy();
|
||||
});
|
||||
|
||||
|
||||
@ -43,23 +43,23 @@ describe('15.0.0 migration (migrate-to-inputs)', () => {
|
||||
|
||||
expect(updated.implicitDependencies).toBeUndefined();
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
],
|
||||
"sharedGlobals": Array [],
|
||||
"sharedGlobals": [],
|
||||
},
|
||||
"targetDefaults": Object {
|
||||
"build": Object {
|
||||
"dependsOn": Array [
|
||||
"targetDefaults": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build",
|
||||
],
|
||||
"inputs": Array [
|
||||
"inputs": [
|
||||
"production",
|
||||
"^production",
|
||||
],
|
||||
@ -95,20 +95,20 @@ describe('15.0.0 migration (migrate-to-inputs)', () => {
|
||||
|
||||
expect(updated.implicitDependencies).toBeUndefined();
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
],
|
||||
"sharedGlobals": Array [],
|
||||
"sharedGlobals": [],
|
||||
},
|
||||
"targetDefaults": Object {
|
||||
"prepare": Object {
|
||||
"dependsOn": Array [
|
||||
"targetDefaults": {
|
||||
"prepare": {
|
||||
"dependsOn": [
|
||||
"^prepare",
|
||||
],
|
||||
},
|
||||
@ -307,20 +307,20 @@ describe('15.0.0 migration (migrate-to-inputs)', () => {
|
||||
|
||||
expect(updated.implicitDependencies).toBeUndefined();
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
|
||||
"!{projectRoot}/tsconfig.spec.json",
|
||||
"!{projectRoot}/jest.config.[jt]s",
|
||||
"!{projectRoot}/.eslintrc.json",
|
||||
],
|
||||
"sharedGlobals": Array [
|
||||
"sharedGlobals": [
|
||||
"{workspaceRoot}/nx.json",
|
||||
],
|
||||
},
|
||||
@ -350,20 +350,20 @@ describe('15.0.0 migration (migrate-to-inputs)', () => {
|
||||
|
||||
expect(updated.implicitDependencies).toBeUndefined();
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
|
||||
"!{projectRoot}/tsconfig.spec.json",
|
||||
"!{projectRoot}/jest.config.[jt]s",
|
||||
"!{projectRoot}/.eslintrc.json",
|
||||
],
|
||||
"sharedGlobals": Array [
|
||||
"sharedGlobals": [
|
||||
"{workspaceRoot}/nx.json",
|
||||
],
|
||||
},
|
||||
@ -392,15 +392,15 @@ describe('15.0.0 migration (migrate-to-inputs)', () => {
|
||||
|
||||
expect(updated.implicitDependencies).toBeUndefined();
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"production": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"production": [
|
||||
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
|
||||
"!{projectRoot}/tsconfig.spec.json",
|
||||
"!{projectRoot}/jest.config.[jt]s",
|
||||
"!{projectRoot}/.eslintrc.json",
|
||||
],
|
||||
"sharedGlobals": Array [
|
||||
"sharedGlobals": [
|
||||
"{workspaceRoot}/nx.json",
|
||||
],
|
||||
},
|
||||
|
||||
@ -70,9 +70,9 @@ describe('15.0.0 migration (prefix-outputs)', () => {
|
||||
const updated = readNxJson(tree);
|
||||
|
||||
expect(updated.targetDefaults).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"build": Object {
|
||||
"outputs": Array [
|
||||
{
|
||||
"build": {
|
||||
"outputs": [
|
||||
"{workspaceRoot}/dist",
|
||||
"{projectRoot}/build",
|
||||
"{options.outputPath}",
|
||||
|
||||
@ -96,8 +96,8 @@ describe('NPM lock file utility', () => {
|
||||
expect(Object.keys(graph.externalNodes).length).toEqual(212); // 202
|
||||
|
||||
expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"packageName": "minimatch",
|
||||
"version": "3.1.2",
|
||||
@ -107,8 +107,8 @@ describe('NPM lock file utility', () => {
|
||||
}
|
||||
`);
|
||||
expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
|
||||
"packageName": "minimatch",
|
||||
"version": "5.1.1",
|
||||
@ -118,8 +118,8 @@ describe('NPM lock file utility', () => {
|
||||
}
|
||||
`);
|
||||
expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-M7i4XVjrrReHG+IjWEeDSfBnyNg2Q5OQpxrr3dqCGpleYx0FyUpMQZfk8zb6yyPrn6ut3KbrkYfnAf+TG6DPLQ==",
|
||||
"packageName": "postgres",
|
||||
"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'])
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-zYDdpaj+1Al8Ki3WpY2I9bOAd8NSgFWGT7yR6KemSi25qWwDMNArnR2q6gDEDKSw+KuYY4shFxkY/JpoNF64tg==",
|
||||
"packageName": "eslint-plugin-disable-autofix",
|
||||
"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(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"packageName": "minimatch",
|
||||
"version": "3.1.2",
|
||||
@ -165,8 +165,8 @@ describe('NPM lock file utility', () => {
|
||||
}
|
||||
`);
|
||||
expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
|
||||
"packageName": "minimatch",
|
||||
"version": "5.1.1",
|
||||
@ -176,8 +176,8 @@ describe('NPM lock file utility', () => {
|
||||
}
|
||||
`);
|
||||
expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-M7i4XVjrrReHG+IjWEeDSfBnyNg2Q5OQpxrr3dqCGpleYx0FyUpMQZfk8zb6yyPrn6ut3KbrkYfnAf+TG6DPLQ==",
|
||||
"packageName": "postgres",
|
||||
"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'])
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-zYDdpaj+1Al8Ki3WpY2I9bOAd8NSgFWGT7yR6KemSi25qWwDMNArnR2q6gDEDKSw+KuYY4shFxkY/JpoNF64tg==",
|
||||
"packageName": "eslint-plugin-disable-autofix",
|
||||
"version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0",
|
||||
|
||||
@ -230,8 +230,8 @@ describe('pnpm LockFile utility', () => {
|
||||
expect(Object.keys(graph.externalNodes).length).toEqual(213);
|
||||
|
||||
expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"packageName": "minimatch",
|
||||
"version": "3.1.2",
|
||||
@ -241,8 +241,8 @@ describe('pnpm LockFile utility', () => {
|
||||
}
|
||||
`);
|
||||
expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
|
||||
"packageName": "minimatch",
|
||||
"version": "5.1.1",
|
||||
@ -252,8 +252,8 @@ describe('pnpm LockFile utility', () => {
|
||||
}
|
||||
`);
|
||||
expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "e33995295353137d0e2a79cad3efec01f9bae57a41f44a882c3eb57212cad3d3",
|
||||
"packageName": "postgres",
|
||||
"version": "github.com/charsleysa/postgres/3b1a01b2da3e2fafb1a79006f838eff11a8de3cb",
|
||||
@ -264,8 +264,8 @@ describe('pnpm LockFile utility', () => {
|
||||
`);
|
||||
expect(graph.externalNodes['npm:eslint-plugin-disable-autofix'])
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-zYDdpaj+1Al8Ki3WpY2I9bOAd8NSgFWGT7yR6KemSi25qWwDMNArnR2q6gDEDKSw+KuYY4shFxkY/JpoNF64tg==",
|
||||
"packageName": "eslint-plugin-disable-autofix",
|
||||
"version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0",
|
||||
|
||||
@ -234,8 +234,8 @@ describe('yarn LockFile utility', () => {
|
||||
expect(Object.keys(graph.externalNodes).length).toEqual(127);
|
||||
|
||||
expect(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"packageName": "minimatch",
|
||||
"version": "3.1.2",
|
||||
@ -245,8 +245,8 @@ describe('yarn LockFile utility', () => {
|
||||
}
|
||||
`);
|
||||
expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
|
||||
"packageName": "minimatch",
|
||||
"version": "5.1.1",
|
||||
@ -256,8 +256,8 @@ describe('yarn LockFile utility', () => {
|
||||
}
|
||||
`);
|
||||
expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "89b0967274cbe05ffc81fee9ce2f0e58aac96f15cf97e916258044ed9a2e6f61",
|
||||
"packageName": "postgres",
|
||||
"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'])
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-zYDdpaj+1Al8Ki3WpY2I9bOAd8NSgFWGT7yR6KemSi25qWwDMNArnR2q6gDEDKSw+KuYY4shFxkY/JpoNF64tg==",
|
||||
"packageName": "eslint-plugin-disable-autofix",
|
||||
"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(graph.externalNodes['npm:minimatch']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "c154e566406683e7bcb746e000b84d74465b3a832c45d59912b9b55cd50dee66e5c4b1e5566dba26154040e51672f9aa450a9aef0c97cfc7336b78b7afb9540a",
|
||||
"packageName": "minimatch",
|
||||
"version": "3.1.2",
|
||||
@ -383,8 +383,8 @@ describe('yarn LockFile utility', () => {
|
||||
}
|
||||
`);
|
||||
expect(graph.externalNodes['npm:minimatch@5.1.1']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "215edd0978320a3354188f84a537d45841f2449af4df4379f79b9b777e71aa4f5722cc9d1717eabd2a70d38ef76ab7b708d24d83ea6a6c909dfd8833de98b437",
|
||||
"packageName": "minimatch",
|
||||
"version": "5.1.1",
|
||||
@ -394,8 +394,8 @@ describe('yarn LockFile utility', () => {
|
||||
}
|
||||
`);
|
||||
expect(graph.externalNodes['npm:postgres']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "521660853e0c9f1c604cf43d32c75e2b4675e2d912eaec7bb6749716539dd53f1dfaf575a422087f6a53362f5162f9a4b8a88cc1dadf9d7580423fc05137767a",
|
||||
"packageName": "postgres",
|
||||
"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'])
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "fb7272c37e5701df14a79d0f8a9d6a0cb521972011ba91d70290eefc33fca589307908a6fb63e2985257b1c7cc3839c076d1c8def0caabddf21a91f13d7c8fc1",
|
||||
"packageName": "eslint-plugin-disable-autofix",
|
||||
"version": "npm:@mattlewis92/eslint-plugin-disable-autofix@3.0.0",
|
||||
@ -830,8 +830,8 @@ type-fest@^0.20.2:
|
||||
parseYarnLockfile(lockFile, builder);
|
||||
const graph = builder.getUpdatedProjectGraph();
|
||||
expect(graph.externalNodes['npm:tslib']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==",
|
||||
"packageName": "tslib",
|
||||
"version": "2.5.0",
|
||||
@ -842,8 +842,8 @@ type-fest@^0.20.2:
|
||||
`);
|
||||
expect(graph.externalNodes['npm:@gitlab-examples/semantic-release-npm'])
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "sha1-kjNFw/3FHGzfkh58DptD6ZnKpho=",
|
||||
"packageName": "@gitlab-examples/semantic-release-npm",
|
||||
"version": "2.0.1",
|
||||
@ -859,14 +859,14 @@ type-fest@^0.20.2:
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
\\"@gitlab-examples/semantic-release-npm@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\\"
|
||||
"@gitlab-examples/semantic-release-npm@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"
|
||||
integrity sha1-kjNFw/3FHGzfkh58DptD6ZnKpho=
|
||||
|
||||
tslib@2.5.0:
|
||||
version \\"2.5.0\\"
|
||||
resolved \\"https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf\\"
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
|
||||
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
|
||||
"
|
||||
`);
|
||||
@ -905,8 +905,8 @@ __metadata:
|
||||
parseYarnLockfile(lockFile, builder);
|
||||
const graph = builder.getUpdatedProjectGraph();
|
||||
expect(graph.externalNodes['npm:tslib']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1",
|
||||
"packageName": "tslib",
|
||||
"version": "2.5.0",
|
||||
@ -917,8 +917,8 @@ __metadata:
|
||||
`);
|
||||
expect(graph.externalNodes['npm:@gitlab-examples/semantic-release-npm'])
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"hash": "1944ac24ebb3e7c30db4fe743b75f0bb3b82a0c142c9ba435aa8224005fcc2bc709e21cec109c6f67d6290e0abb6032a55eaca38ca950711bf03317d128db30a",
|
||||
"packageName": "@gitlab-examples/semantic-release-npm",
|
||||
"version": "2.0.1",
|
||||
@ -931,33 +931,33 @@ __metadata:
|
||||
const prunedGraph = pruneProjectGraph(graph, prunedPackageJson);
|
||||
expect(stringifyYarnLockfile(prunedGraph, lockFile, prunedPackageJson))
|
||||
.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!
|
||||
|
||||
__metadata:
|
||||
version: 6
|
||||
cacheKey: 8
|
||||
|
||||
\\"@gitlab-examples/semantic-release-npm@npm:2.0.1\\":
|
||||
"@gitlab-examples/semantic-release-npm@npm: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
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
\\"@my-ns/example@workspace:.\\":
|
||||
"@my-ns/example@workspace:.":
|
||||
version: 0.0.0-use.local
|
||||
resolution: \\"@my-ns/example@workspace:.\\"
|
||||
resolution: "@my-ns/example@workspace:."
|
||||
dependencies:
|
||||
\\"@gitlab-examples/semantic-release-npm\\": 2.0.1
|
||||
"@gitlab-examples/semantic-release-npm": 2.0.1
|
||||
peerDependencies:
|
||||
tslib: 2.5.0
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
\\"tslib@npm:2.5.0\\":
|
||||
"tslib@npm:2.5.0":
|
||||
version: 2.5.0
|
||||
resolution: \\"tslib@npm:2.5.0\\"
|
||||
resolution: "tslib@npm:2.5.0"
|
||||
checksum: ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -41,15 +41,15 @@ describe('StoreRunInformationLifeCycle', () => {
|
||||
|
||||
store.endCommand();
|
||||
expect(runDetails).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"run": Object {
|
||||
{
|
||||
"run": {
|
||||
"command": "nx run-many --target=test",
|
||||
"endTime": "DATE",
|
||||
"inner": false,
|
||||
"startTime": "DATE",
|
||||
},
|
||||
"tasks": Array [
|
||||
Object {
|
||||
"tasks": [
|
||||
{
|
||||
"cacheStatus": "cache-miss",
|
||||
"endTime": "DATE",
|
||||
"hash": "hash1",
|
||||
@ -60,7 +60,7 @@ describe('StoreRunInformationLifeCycle', () => {
|
||||
"target": "test",
|
||||
"taskId": "proj1:test",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"cacheStatus": "cache-miss",
|
||||
"endTime": "DATE",
|
||||
"hash": "hash2",
|
||||
|
||||
@ -61,10 +61,10 @@ describe('parseJson', () => {
|
||||
).toThrowErrorMatchingInlineSnapshot(`
|
||||
"InvalidCommentToken in JSON at 2:7
|
||||
[0m [90m 1 | [39m{[0m
|
||||
[0m[31m[1m>[22m[39m[90m 2 | [39m //\\"test\\": 123,[0m
|
||||
[0m[31m[1m>[22m[39m[90m 2 | [39m //"test": 123,[0m
|
||||
[0m [90m | [39m [31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[0m
|
||||
[0m [90m 3 | [39m \\"nested\\": {[0m
|
||||
[0m [90m 4 | [39m \\"test\\": 123[0m
|
||||
[0m [90m 3 | [39m "nested": {[0m
|
||||
[0m [90m 4 | [39m "test": 123[0m
|
||||
[0m [90m 5 | [39m /*[0m
|
||||
"
|
||||
`);
|
||||
@ -89,10 +89,10 @@ describe('parseJson', () => {
|
||||
).toThrowErrorMatchingInlineSnapshot(`
|
||||
"InvalidCommentToken in JSON at 2:7
|
||||
[0m [90m 1 | [39m{[0m
|
||||
[0m[31m[1m>[22m[39m[90m 2 | [39m //\\"test\\": 123,[0m
|
||||
[0m[31m[1m>[22m[39m[90m 2 | [39m //"test": 123,[0m
|
||||
[0m [90m | [39m [31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[0m
|
||||
[0m [90m 3 | [39m \\"nested\\": {[0m
|
||||
[0m [90m 4 | [39m \\"test\\": 123[0m
|
||||
[0m [90m 3 | [39m "nested": {[0m
|
||||
[0m [90m 4 | [39m "test": 123[0m
|
||||
[0m [90m 5 | [39m /*[0m
|
||||
"
|
||||
`);
|
||||
@ -128,11 +128,11 @@ describe('parseJson', () => {
|
||||
)
|
||||
).toThrowErrorMatchingInlineSnapshot(`
|
||||
"PropertyNameExpected in JSON at 6:6
|
||||
[0m [90m 4 | [39m \\"test\\": 123,[0m
|
||||
[0m [90m 5 | [39m \\"more\\": 456,[0m
|
||||
[0m [90m 4 | [39m "test": 123,[0m
|
||||
[0m [90m 5 | [39m "more": 456,[0m
|
||||
[0m[31m[1m>[22m[39m[90m 6 | [39m },[0m
|
||||
[0m [90m | [39m [31m[1m^[22m[39m[0m
|
||||
[0m [90m 7 | [39m \\"array\\": [1, 2, 3,][0m
|
||||
[0m [90m 7 | [39m "array": [1, 2, 3,][0m
|
||||
[0m [90m 8 | [39m }[0m
|
||||
"
|
||||
`);
|
||||
|
||||
@ -48,7 +48,7 @@ describe('printHelp', () => {
|
||||
.map((x) => x.replace('--', ''));
|
||||
|
||||
expect(flagsFromOutput).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
[
|
||||
"aReq",
|
||||
"bReq",
|
||||
"aImp",
|
||||
|
||||
@ -23,16 +23,16 @@ describe('15.0.0 migration (add-babel-inputs)', () => {
|
||||
|
||||
const updated = readNxJson(tree);
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
],
|
||||
"sharedGlobals": Array [
|
||||
"sharedGlobals": [
|
||||
"{workspaceRoot}/babel.config.json",
|
||||
],
|
||||
},
|
||||
@ -54,16 +54,16 @@ describe('15.0.0 migration (add-babel-inputs)', () => {
|
||||
|
||||
const updated = readNxJson(tree);
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
],
|
||||
"sharedGlobals": Array [
|
||||
"sharedGlobals": [
|
||||
"{workspaceRoot}/babel.config.js",
|
||||
],
|
||||
},
|
||||
|
||||
@ -52,7 +52,7 @@ import NxWelcome from './nx-welcome';
|
||||
export function App() {
|
||||
return (
|
||||
<>
|
||||
<NxWelcome title=\\"my-app\\" />
|
||||
<NxWelcome title="my-app" />
|
||||
|
||||
<div />
|
||||
</>
|
||||
@ -72,7 +72,7 @@ import NxWelcome from './nx-welcome';
|
||||
export function App() {
|
||||
return (
|
||||
<>
|
||||
<NxWelcome title=\\"my-dir-my-app\\" />
|
||||
<NxWelcome title="my-dir-my-app" />
|
||||
|
||||
<div />
|
||||
</>
|
||||
|
||||
@ -139,18 +139,18 @@ describe('app', () => {
|
||||
expect(appTree.exists('apps/my-app-e2e/cypress.config.ts')).toBeTruthy();
|
||||
const tsconfigE2E = readJson(appTree, 'apps/my-app-e2e/tsconfig.json');
|
||||
expect(tsconfigE2E).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"sourceMap": false,
|
||||
"types": Array [
|
||||
"types": [
|
||||
"cypress",
|
||||
"node",
|
||||
],
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"include": Array [
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.js",
|
||||
"cypress.config.ts",
|
||||
@ -446,14 +446,14 @@ describe('app', () => {
|
||||
expect(projectsConfigurations.get('my-app').targets.test).toBeUndefined();
|
||||
expect(projectsConfigurations.get('my-app').targets.lint)
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-app/**/*.{ts,tsx,js,jsx}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
}
|
||||
@ -531,37 +531,37 @@ describe('app', () => {
|
||||
|
||||
const eslintJson = readJson(appTree, '/apps/my-app/.eslintrc.json');
|
||||
expect(eslintJson).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/react",
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@ -192,37 +192,37 @@ describe('lib', () => {
|
||||
|
||||
const eslintJson = readJson(tree, 'libs/my-lib/.eslintrc.json');
|
||||
expect(eslintJson).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/react",
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
@ -396,14 +396,14 @@ describe('lib', () => {
|
||||
const config = readProjectConfiguration(tree, 'my-lib');
|
||||
expect(config.targets.test).toBeUndefined();
|
||||
expect(config.targets.lint).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"libs/my-lib/**/*.{ts,tsx,js,jsx}",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
}
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`webpack5ChangesUtils should get project name and storybook configuration for all react projects 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
[
|
||||
{
|
||||
"projectName": "test-one",
|
||||
"storybookConfigPath": "libs/test-one/.storybook",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"projectName": "test-two",
|
||||
"storybookConfigPath": "libs/test-two/.storybook",
|
||||
},
|
||||
|
||||
@ -23,16 +23,16 @@ describe('15.0.0 migration (add-babel-inputs)', () => {
|
||||
|
||||
const updated = readNxJson(tree);
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
],
|
||||
"sharedGlobals": Array [
|
||||
"sharedGlobals": [
|
||||
"{workspaceRoot}/babel.config.json",
|
||||
],
|
||||
},
|
||||
@ -54,16 +54,16 @@ describe('15.0.0 migration (add-babel-inputs)', () => {
|
||||
|
||||
const updated = readNxJson(tree);
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
],
|
||||
"sharedGlobals": Array [
|
||||
"sharedGlobals": [
|
||||
"{workspaceRoot}/babel.config.js",
|
||||
],
|
||||
},
|
||||
|
||||
@ -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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.ts\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.ts",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.ts\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.ts",
|
||||
"*.js"
|
||||
]
|
||||
}
|
||||
"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -14,12 +14,12 @@ exports[`@nrwl/storybook:configuration basic functionalities should generate a w
|
||||
`;
|
||||
|
||||
exports[`@nrwl/storybook:configuration basic functionalities should generate files 1`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"namedInputs": Object {
|
||||
"production": Array [
|
||||
"namedInputs": {
|
||||
"production": [
|
||||
"default",
|
||||
"!{projectRoot}/.eslintrc.json",
|
||||
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
|
||||
@ -30,39 +30,39 @@ Object {
|
||||
],
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"targetDefaults": Object {
|
||||
"build-storybook": Object {
|
||||
"inputs": Array [
|
||||
"targetDefaults": {
|
||||
"build-storybook": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"!{projectRoot}/.storybook/**/*",
|
||||
],
|
||||
},
|
||||
"e2e": Object {
|
||||
"inputs": Array [
|
||||
"e2e": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
],
|
||||
},
|
||||
"lint": Object {
|
||||
"inputs": Array [
|
||||
"lint": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"{workspaceRoot}/.eslintrc.json",
|
||||
"{workspaceRoot}/.eslintignore",
|
||||
],
|
||||
},
|
||||
"test": Object {
|
||||
"inputs": Array [
|
||||
"test": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"{workspaceRoot}/jest.preset.js",
|
||||
],
|
||||
},
|
||||
},
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"test",
|
||||
@ -77,7 +77,7 @@ Object {
|
||||
`;
|
||||
|
||||
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/cssmodule.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.ts\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.ts",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../components/**/*.stories.ts\\",
|
||||
\\"../components/**/*.stories.js\\",
|
||||
\\"../components/**/*.stories.jsx\\",
|
||||
\\"../components/**/*.stories.tsx\\",
|
||||
\\"../components/**/*.stories.mdx\\",
|
||||
\\"*.ts\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../components/**/*.stories.ts",
|
||||
"../components/**/*.stories.js",
|
||||
"../components/**/*.stories.jsx",
|
||||
"../components/**/*.stories.tsx",
|
||||
"../components/**/*.stories.mdx",
|
||||
"*.ts",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.ts\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.ts",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.ts\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.ts",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.ts\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.ts",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../components/**/*.stories.ts\\",
|
||||
\\"../components/**/*.stories.js\\",
|
||||
\\"../components/**/*.stories.jsx\\",
|
||||
\\"../components/**/*.stories.tsx\\",
|
||||
\\"../components/**/*.stories.mdx\\",
|
||||
\\"*.ts\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../components/**/*.stories.ts",
|
||||
"../components/**/*.stories.js",
|
||||
"../components/**/*.stories.jsx",
|
||||
"../components/**/*.stories.tsx",
|
||||
"../components/**/*.stories.mdx",
|
||||
"*.ts",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.ts\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.ts",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.ts\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.ts",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.ts\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.ts",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../components/**/*.stories.ts\\",
|
||||
\\"../components/**/*.stories.js\\",
|
||||
\\"../components/**/*.stories.jsx\\",
|
||||
\\"../components/**/*.stories.tsx\\",
|
||||
\\"../components/**/*.stories.mdx\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../components/**/*.stories.ts",
|
||||
"../components/**/*.stories.js",
|
||||
"../components/**/*.stories.jsx",
|
||||
"../components/**/*.stories.tsx",
|
||||
"../components/**/*.stories.mdx",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.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`] = `
|
||||
"{
|
||||
\\"extends\\": \\"../tsconfig.json\\",
|
||||
\\"compilerOptions\\": {
|
||||
\\"emitDecoratorMetadata\\": true,
|
||||
\\"outDir\\": \\"\\"
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": ""
|
||||
},
|
||||
\\"files\\": [
|
||||
\\"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts\\",
|
||||
\\"../../../node_modules/@nrwl/react/typings/image.d.ts\\"
|
||||
"files": [
|
||||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../../node_modules/@nrwl/react/typings/image.d.ts"
|
||||
],
|
||||
\\"exclude\\": [
|
||||
\\"../**/*.spec.ts\\",
|
||||
\\"../**/*.spec.js\\",
|
||||
\\"../**/*.spec.tsx\\",
|
||||
\\"../**/*.spec.jsx\\"
|
||||
"exclude": [
|
||||
"../**/*.spec.ts",
|
||||
"../**/*.spec.js",
|
||||
"../**/*.spec.tsx",
|
||||
"../**/*.spec.jsx"
|
||||
],
|
||||
\\"include\\": [
|
||||
\\"../src/**/*.stories.ts\\",
|
||||
\\"../src/**/*.stories.js\\",
|
||||
\\"../src/**/*.stories.jsx\\",
|
||||
\\"../src/**/*.stories.tsx\\",
|
||||
\\"../src/**/*.stories.mdx\\",
|
||||
\\"*.js\\"
|
||||
"include": [
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.tsx",
|
||||
"../src/**/*.stories.mdx",
|
||||
"*.js"
|
||||
]
|
||||
}
|
||||
"
|
||||
|
||||
@ -112,18 +112,18 @@ describe('@nrwl/storybook:configuration for Storybook v7', () => {
|
||||
);
|
||||
|
||||
expect(tsconfigJson.references).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Object {
|
||||
"path": "./tsconfig.lib.json",
|
||||
},
|
||||
Object {
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
Object {
|
||||
"path": "./.storybook/tsconfig.json",
|
||||
},
|
||||
]
|
||||
`);
|
||||
[
|
||||
{
|
||||
"path": "./tsconfig.lib.json",
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
{
|
||||
"path": "./.storybook/tsconfig.json",
|
||||
},
|
||||
]
|
||||
`);
|
||||
});
|
||||
|
||||
it("should update the project's .eslintrc.json if config exists", async () => {
|
||||
@ -147,12 +147,12 @@ describe('@nrwl/storybook:configuration for Storybook v7', () => {
|
||||
|
||||
expect(readJson(tree, 'libs/test-ui-lib2/.eslintrc.json').parserOptions)
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"project": Array [
|
||||
"libs/test-ui-lib2/.storybook/tsconfig.json",
|
||||
],
|
||||
}
|
||||
`);
|
||||
{
|
||||
"project": [
|
||||
"libs/test-ui-lib2/.storybook/tsconfig.json",
|
||||
],
|
||||
}
|
||||
`);
|
||||
});
|
||||
|
||||
it('should have the proper typings', async () => {
|
||||
|
||||
@ -280,18 +280,18 @@ describe('@nrwl/storybook:configuration', () => {
|
||||
|
||||
expect(enquirer.prompt).toHaveBeenCalled();
|
||||
expect(tsconfigJson.references).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Object {
|
||||
"path": "./tsconfig.lib.json",
|
||||
},
|
||||
Object {
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
Object {
|
||||
"path": "./.storybook/tsconfig.json",
|
||||
},
|
||||
]
|
||||
`);
|
||||
[
|
||||
{
|
||||
"path": "./tsconfig.lib.json",
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
{
|
||||
"path": "./.storybook/tsconfig.json",
|
||||
},
|
||||
]
|
||||
`);
|
||||
});
|
||||
|
||||
it("should update the project's .eslintrc.json if config exists", async () => {
|
||||
@ -321,12 +321,12 @@ describe('@nrwl/storybook:configuration', () => {
|
||||
expect(enquirer.prompt).toHaveBeenCalled();
|
||||
expect(readJson(tree, 'libs/test-ui-lib2/.eslintrc.json').parserOptions)
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"project": Array [
|
||||
"libs/test-ui-lib2/.storybook/tsconfig.json",
|
||||
],
|
||||
}
|
||||
`);
|
||||
{
|
||||
"project": [
|
||||
"libs/test-ui-lib2/.storybook/tsconfig.json",
|
||||
],
|
||||
}
|
||||
`);
|
||||
});
|
||||
|
||||
it('should have the proper typings', async () => {
|
||||
@ -408,14 +408,14 @@ describe('@nrwl/storybook:configuration', () => {
|
||||
'static-storybook'
|
||||
]
|
||||
).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"ci": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"buildTarget": "test-ui-lib:build-storybook:ci",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/web:file-server",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"buildTarget": "test-ui-lib:build-storybook",
|
||||
"staticFilePath": "dist/storybook/test-ui-lib",
|
||||
},
|
||||
@ -439,14 +439,14 @@ describe('@nrwl/storybook:configuration', () => {
|
||||
'static-storybook'
|
||||
]
|
||||
).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"ci": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"buildTarget": "test-ui-lib:build-storybook:ci",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/web:file-server",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"buildTarget": "test-ui-lib:build-storybook",
|
||||
"staticFilePath": "dist/storybook/test-ui-lib",
|
||||
},
|
||||
@ -454,14 +454,14 @@ describe('@nrwl/storybook:configuration', () => {
|
||||
`);
|
||||
expect(readProjectConfiguration(tree, 'test-ui-lib-e2e').targets.e2e)
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"configurations": Object {
|
||||
"ci": Object {
|
||||
{
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"devServerTarget": "test-ui-lib:static-storybook:ci",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/cypress:cypress",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"cypressConfig": "apps/test-ui-lib-e2e/cypress.config.ts",
|
||||
"devServerTarget": "test-ui-lib:storybook",
|
||||
"testingType": "e2e",
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
// 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`] = `
|
||||
Object {
|
||||
"dependencies": Object {
|
||||
{
|
||||
"dependencies": {
|
||||
"existing": "1.0.0",
|
||||
},
|
||||
"devDependencies": Object {
|
||||
"devDependencies": {
|
||||
"@angular/forms": "*",
|
||||
"@nrwl/js": "0.0.1",
|
||||
"@nrwl/storybook": "^6.5.15",
|
||||
|
||||
@ -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`] = `
|
||||
Object {
|
||||
"nextapp": Object {
|
||||
{
|
||||
"nextapp": {
|
||||
"configDir": "apps/nextapp/.storybook",
|
||||
"uiFramework": "@storybook/react",
|
||||
"viteConfigFilePath": undefined,
|
||||
},
|
||||
"nextapp-ts": Object {
|
||||
"nextapp-ts": {
|
||||
"configDir": "apps/nextapp-ts/.storybook",
|
||||
"uiFramework": "@storybook/react",
|
||||
"viteConfigFilePath": undefined,
|
||||
},
|
||||
"ngapp": Object {
|
||||
"ngapp": {
|
||||
"configDir": "apps/ngapp/.storybook",
|
||||
"uiFramework": "@storybook/angular",
|
||||
},
|
||||
"ngapp-ts": Object {
|
||||
"ngapp-ts": {
|
||||
"configDir": "apps/ngapp-ts/.storybook",
|
||||
"uiFramework": "@storybook/angular",
|
||||
},
|
||||
"rv1": Object {
|
||||
"rv1": {
|
||||
"configDir": "apps/rv1/.storybook",
|
||||
"uiFramework": "@storybook/react",
|
||||
"viteConfigFilePath": "apps/rv1/vite.config.js",
|
||||
},
|
||||
"rv2-ts": Object {
|
||||
"rv2-ts": {
|
||||
"configDir": "apps/rv2-ts/.storybook",
|
||||
"uiFramework": "@storybook/react",
|
||||
"viteConfigFilePath": "apps/rv2-ts/vite.config.ts",
|
||||
},
|
||||
"rw1": Object {
|
||||
"rw1": {
|
||||
"configDir": "apps/rw1/.storybook",
|
||||
"uiFramework": "@storybook/react",
|
||||
"viteConfigFilePath": undefined,
|
||||
},
|
||||
"wv1": Object {
|
||||
"wv1": {
|
||||
"configDir": "apps/wv1/.storybook",
|
||||
"uiFramework": "@storybook/web-components",
|
||||
"viteConfigFilePath": "apps/wv1/vite.config.ts",
|
||||
},
|
||||
"ww1": Object {
|
||||
"ww1": {
|
||||
"configDir": "apps/ww1/.storybook",
|
||||
"uiFramework": "@storybook/web-components",
|
||||
"viteConfigFilePath": undefined,
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
// 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`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"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`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"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`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"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`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"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`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"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`] = `
|
||||
Object {
|
||||
"affected": Object {
|
||||
{
|
||||
"affected": {
|
||||
"defaultBase": "main",
|
||||
},
|
||||
"npmScope": "proj",
|
||||
"tasksRunnerOptions": Object {
|
||||
"default": Object {
|
||||
"options": Object {
|
||||
"cacheableOperations": Array [
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"build",
|
||||
"lint",
|
||||
"test",
|
||||
|
||||
@ -44,29 +44,29 @@ describe('15.0.0 migration (add-storybook-inputs)', () => {
|
||||
|
||||
const updated = readNxJson(tree);
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
"!{projectRoot}/.storybook/**/*",
|
||||
"!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
|
||||
],
|
||||
"sharedGlobals": Array [],
|
||||
"sharedGlobals": [],
|
||||
},
|
||||
"targetDefaults": Object {
|
||||
"build-storybook": Object {
|
||||
"inputs": Array [
|
||||
"targetDefaults": {
|
||||
"build-storybook": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"{workspaceRoot}/.storybook/**/*",
|
||||
],
|
||||
},
|
||||
"build-storybook2": Object {
|
||||
"inputs": Array [
|
||||
"build-storybook2": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"{workspaceRoot}/.storybook/**/*",
|
||||
@ -107,29 +107,29 @@ describe('15.0.0 migration (add-storybook-inputs)', () => {
|
||||
|
||||
const updated = readNxJson(tree);
|
||||
expect(updated).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"namedInputs": Object {
|
||||
"default": Array [
|
||||
{
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals",
|
||||
],
|
||||
"production": Array [
|
||||
"production": [
|
||||
"default",
|
||||
"!{projectRoot}/.storybook/**/*",
|
||||
"!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
|
||||
],
|
||||
"sharedGlobals": Array [],
|
||||
"sharedGlobals": [],
|
||||
},
|
||||
"targetDefaults": Object {
|
||||
"build-storybook": Object {
|
||||
"inputs": Array [
|
||||
"targetDefaults": {
|
||||
"build-storybook": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"{workspaceRoot}/.storybook/**/*",
|
||||
],
|
||||
},
|
||||
"build-storybook2": Object {
|
||||
"inputs": Array [
|
||||
"build-storybook2": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"{workspaceRoot}/.storybook/**/*",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`@nrwl/vite:configuration library mode should add config for building library 1`] = `
|
||||
"/// <reference types=\\"vitest\\" />
|
||||
"/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
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`] = `
|
||||
"/// <reference types=\\"vitest\\" />
|
||||
"/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
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`] = `
|
||||
"{
|
||||
\\"projects\\": {
|
||||
\\"react-lib-nonb-jest\\": {
|
||||
\\"name\\": \\"react-lib-nonb-jest\\",
|
||||
\\"$schema\\": \\"../../node_modules/nx/schemas/project-schema.json\\",
|
||||
\\"root\\": \\"libs/react-lib-nonb-jest\\",
|
||||
\\"sourceRoot\\": \\"libs/react-lib-nonb-jest/src\\",
|
||||
\\"projectType\\": \\"library\\",
|
||||
\\"targets\\": {
|
||||
\\"lint\\": {
|
||||
\\"executor\\": \\"@nrwl/linter:eslint\\",
|
||||
\\"outputs\\": [\\"{options.outputFile}\\"],
|
||||
\\"options\\": {
|
||||
\\"lintFilePatterns\\": [
|
||||
\\"libs/react-lib-nonb-jest/**/*.{ts,tsx,js,jsx}\\"
|
||||
"projects": {
|
||||
"react-lib-nonb-jest": {
|
||||
"name": "react-lib-nonb-jest",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"root": "libs/react-lib-nonb-jest",
|
||||
"sourceRoot": "libs/react-lib-nonb-jest/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"libs/react-lib-nonb-jest/**/*.{ts,tsx,js,jsx}"
|
||||
]
|
||||
}
|
||||
},
|
||||
\\"test\\": {
|
||||
\\"executor\\": \\"@nrwl/jest:jest\\",
|
||||
\\"outputs\\": [\\"{workspaceRoot}/coverage/{projectRoot}\\"],
|
||||
\\"options\\": {
|
||||
\\"jestConfig\\": \\"libs/react-lib-nonb-jest/jest.config.ts\\",
|
||||
\\"passWithNoTests\\": true
|
||||
"test": {
|
||||
"executor": "@nrwl/jest:jest",
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
"options": {
|
||||
"jestConfig": "libs/react-lib-nonb-jest/jest.config.ts",
|
||||
"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`] = `
|
||||
"{
|
||||
\\"projects\\": {
|
||||
\\"react-lib-nonb-vitest\\": {
|
||||
\\"name\\": \\"react-lib-nonb-vitest\\",
|
||||
\\"$schema\\": \\"../../node_modules/nx/schemas/project-schema.json\\",
|
||||
\\"root\\": \\"libs/react-lib-nonb-vitest\\",
|
||||
\\"sourceRoot\\": \\"libs/react-lib-nonb-vitest/src\\",
|
||||
\\"projectType\\": \\"library\\",
|
||||
\\"targets\\": {
|
||||
\\"lint\\": {
|
||||
\\"executor\\": \\"@nrwl/linter:eslint\\",
|
||||
\\"outputs\\": [\\"{options.outputFile}\\"],
|
||||
\\"options\\": {
|
||||
\\"lintFilePatterns\\": [
|
||||
\\"libs/react-lib-nonb-vitest/**/*.{ts,tsx,js,jsx}\\"
|
||||
"projects": {
|
||||
"react-lib-nonb-vitest": {
|
||||
"name": "react-lib-nonb-vitest",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"root": "libs/react-lib-nonb-vitest",
|
||||
"sourceRoot": "libs/react-lib-nonb-vitest/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"libs/react-lib-nonb-vitest/**/*.{ts,tsx,js,jsx}"
|
||||
]
|
||||
}
|
||||
},
|
||||
\\"test\\": {
|
||||
\\"executor\\": \\"@nrwl/vite:test\\",
|
||||
\\"outputs\\": [\\"{projectRoot}/coverage\\"],
|
||||
\\"options\\": {
|
||||
\\"passWithNoTests\\": true,
|
||||
\\"reportsDirectory\\": \\"{workspaceRoot}/coverage/{projectRoot}\\"
|
||||
"test": {
|
||||
"executor": "@nrwl/vite:test",
|
||||
"outputs": ["{projectRoot}/coverage"],
|
||||
"options": {
|
||||
"passWithNoTests": true,
|
||||
"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`] = `
|
||||
"{
|
||||
\\"projects\\": {
|
||||
\\"my-test-mixed-react-app\\": {
|
||||
\\"name\\": \\"my-test-mixed-react-app\\",
|
||||
\\"$schema\\": \\"../../node_modules/nx/schemas/project-schema.json\\",
|
||||
\\"root\\": \\"apps/my-test-mixed-react-app\\",
|
||||
\\"sourceRoot\\": \\"apps/my-test-mixed-react-app/src\\",
|
||||
\\"projectType\\": \\"application\\",
|
||||
\\"targets\\": {
|
||||
\\"invalid-build\\": {
|
||||
\\"executor\\": \\"@nrwl/js:tsc\\",
|
||||
\\"outputs\\": [\\"{options.outputPath}\\"]
|
||||
"projects": {
|
||||
"my-test-mixed-react-app": {
|
||||
"name": "my-test-mixed-react-app",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"root": "apps/my-test-mixed-react-app",
|
||||
"sourceRoot": "apps/my-test-mixed-react-app/src",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"invalid-build": {
|
||||
"executor": "@nrwl/js:tsc",
|
||||
"outputs": ["{options.outputPath}"]
|
||||
},
|
||||
\\"valid-build\\": {
|
||||
\\"executor\\": \\"@nrwl/webpack:webpack\\",
|
||||
\\"outputs\\": [\\"{options.outputPath}\\"]
|
||||
"valid-build": {
|
||||
"executor": "@nrwl/webpack:webpack",
|
||||
"outputs": ["{options.outputPath}"]
|
||||
},
|
||||
\\"serve\\": {
|
||||
\\"executor\\": \\"@nrwl/webpack:dev-server\\",
|
||||
\\"defaultConfiguration\\": \\"development\\",
|
||||
\\"options\\": {
|
||||
\\"buildTarget\\": \\"my-test-mixed-react-app:build\\",
|
||||
\\"hmr\\": true
|
||||
"serve": {
|
||||
"executor": "@nrwl/webpack:dev-server",
|
||||
"defaultConfiguration": "development",
|
||||
"options": {
|
||||
"buildTarget": "my-test-mixed-react-app:build",
|
||||
"hmr": true
|
||||
},
|
||||
\\"configurations\\": {
|
||||
\\"development\\": {
|
||||
\\"buildTarget\\": \\"my-test-mixed-react-app:build:development\\"
|
||||
"configurations": {
|
||||
"development": {
|
||||
"buildTarget": "my-test-mixed-react-app:build:development"
|
||||
},
|
||||
\\"production\\": {
|
||||
\\"buildTarget\\": \\"my-test-mixed-react-app:build:production\\",
|
||||
\\"hmr\\": false
|
||||
"production": {
|
||||
"buildTarget": "my-test-mixed-react-app:build:production",
|
||||
"hmr": false
|
||||
}
|
||||
}
|
||||
},
|
||||
\\"lint\\": {
|
||||
\\"executor\\": \\"@nrwl/linter:eslint\\",
|
||||
\\"outputs\\": [\\"{options.outputFile}\\"],
|
||||
\\"options\\": {
|
||||
\\"lintFilePatterns\\": [
|
||||
\\"apps/my-test-mixed-react-app/**/*.{ts,tsx,js,jsx}\\"
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-test-mixed-react-app/**/*.{ts,tsx,js,jsx}"
|
||||
]
|
||||
}
|
||||
},
|
||||
\\"test\\": {
|
||||
\\"executor\\": \\"@nrwl/jest:jest\\",
|
||||
\\"outputs\\": [\\"{workspaceRoot}/coverage/{projectRoot}\\"],
|
||||
\\"options\\": {
|
||||
\\"jestConfig\\": \\"apps/my-test-mixed-react-app/jest.config.ts\\",
|
||||
\\"passWithNoTests\\": true
|
||||
"test": {
|
||||
"executor": "@nrwl/jest:jest",
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
"options": {
|
||||
"jestConfig": "apps/my-test-mixed-react-app/jest.config.ts",
|
||||
"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`] = `
|
||||
"/// <reference types=\\"vitest\\" />
|
||||
"/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
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`] = `
|
||||
"<!DOCTYPE html>
|
||||
<html lang=\\"en\\">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset=\\"utf-8\\" />
|
||||
<meta charset="utf-8" />
|
||||
<title>My Test React App</title>
|
||||
<base href=\\"/\\" />
|
||||
<base href="/" />
|
||||
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
|
||||
<link rel=\\"icon\\" type=\\"image/x-icon\\" href=\\"favicon.ico\\" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
<div id=\\"root\\"></div>
|
||||
<script type=\\"module\\" src=\\"/src/main.tsx\\"></script>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</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`] = `
|
||||
"{
|
||||
\\"projects\\": {
|
||||
\\"my-test-react-app\\": {
|
||||
\\"name\\": \\"my-test-react-app\\",
|
||||
\\"$schema\\": \\"../../node_modules/nx/schemas/project-schema.json\\",
|
||||
\\"root\\": \\"apps/my-test-react-app\\",
|
||||
\\"sourceRoot\\": \\"apps/my-test-react-app/src\\",
|
||||
\\"projectType\\": \\"application\\",
|
||||
\\"targets\\": {
|
||||
\\"build\\": {
|
||||
\\"executor\\": \\"@nrwl/webpack:webpack\\",
|
||||
\\"outputs\\": [\\"{options.outputPath}\\"],
|
||||
\\"defaultConfiguration\\": \\"production\\",
|
||||
\\"options\\": {
|
||||
\\"compiler\\": \\"babel\\",
|
||||
\\"outputPath\\": \\"dist/apps/my-test-react-app\\",
|
||||
\\"index\\": \\"apps/my-test-react-app/src/index.html\\",
|
||||
\\"baseHref\\": \\"/\\",
|
||||
\\"main\\": \\"apps/my-test-react-app/src/main.tsx\\",
|
||||
\\"polyfills\\": \\"apps/my-test-react-app/src/polyfills.ts\\",
|
||||
\\"tsConfig\\": \\"apps/my-test-react-app/tsconfig.app.json\\",
|
||||
\\"assets\\": [
|
||||
\\"apps/my-test-react-app/src/favicon.ico\\",
|
||||
\\"apps/my-test-react-app/src/assets\\"
|
||||
"projects": {
|
||||
"my-test-react-app": {
|
||||
"name": "my-test-react-app",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"root": "apps/my-test-react-app",
|
||||
"sourceRoot": "apps/my-test-react-app/src",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/webpack:webpack",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"defaultConfiguration": "production",
|
||||
"options": {
|
||||
"compiler": "babel",
|
||||
"outputPath": "dist/apps/my-test-react-app",
|
||||
"index": "apps/my-test-react-app/src/index.html",
|
||||
"baseHref": "/",
|
||||
"main": "apps/my-test-react-app/src/main.tsx",
|
||||
"polyfills": "apps/my-test-react-app/src/polyfills.ts",
|
||||
"tsConfig": "apps/my-test-react-app/tsconfig.app.json",
|
||||
"assets": [
|
||||
"apps/my-test-react-app/src/favicon.ico",
|
||||
"apps/my-test-react-app/src/assets"
|
||||
],
|
||||
\\"styles\\": [\\"apps/my-test-react-app/src/styles.css\\"],
|
||||
\\"scripts\\": [],
|
||||
\\"webpackConfig\\": \\"@nrwl/react/plugins/webpack\\"
|
||||
"styles": ["apps/my-test-react-app/src/styles.css"],
|
||||
"scripts": [],
|
||||
"webpackConfig": "@nrwl/react/plugins/webpack"
|
||||
},
|
||||
\\"configurations\\": {
|
||||
\\"development\\": {
|
||||
\\"extractLicenses\\": false,
|
||||
\\"optimization\\": false,
|
||||
\\"sourceMap\\": true,
|
||||
\\"vendorChunk\\": true
|
||||
"configurations": {
|
||||
"development": {
|
||||
"extractLicenses": false,
|
||||
"optimization": false,
|
||||
"sourceMap": true,
|
||||
"vendorChunk": true
|
||||
},
|
||||
\\"production\\": {
|
||||
\\"fileReplacements\\": [
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
\\"replace\\": \\"apps/my-test-react-app/src/environments/environment.ts\\",
|
||||
\\"with\\": \\"apps/my-test-react-app/src/environments/environment.prod.ts\\"
|
||||
"replace": "apps/my-test-react-app/src/environments/environment.ts",
|
||||
"with": "apps/my-test-react-app/src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
\\"optimization\\": true,
|
||||
\\"outputHashing\\": \\"all\\",
|
||||
\\"sourceMap\\": false,
|
||||
\\"namedChunks\\": false,
|
||||
\\"extractLicenses\\": true,
|
||||
\\"vendorChunk\\": false
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"namedChunks": false,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false
|
||||
}
|
||||
}
|
||||
},
|
||||
\\"serve\\": {
|
||||
\\"executor\\": \\"@nrwl/webpack:dev-server\\",
|
||||
\\"defaultConfiguration\\": \\"development\\",
|
||||
\\"options\\": {
|
||||
\\"buildTarget\\": \\"my-test-react-app:build\\",
|
||||
\\"hmr\\": true
|
||||
"serve": {
|
||||
"executor": "@nrwl/webpack:dev-server",
|
||||
"defaultConfiguration": "development",
|
||||
"options": {
|
||||
"buildTarget": "my-test-react-app:build",
|
||||
"hmr": true
|
||||
},
|
||||
\\"configurations\\": {
|
||||
\\"development\\": {
|
||||
\\"buildTarget\\": \\"my-test-react-app:build:development\\"
|
||||
"configurations": {
|
||||
"development": {
|
||||
"buildTarget": "my-test-react-app:build:development"
|
||||
},
|
||||
\\"production\\": {
|
||||
\\"buildTarget\\": \\"my-test-react-app:build:production\\",
|
||||
\\"hmr\\": false
|
||||
"production": {
|
||||
"buildTarget": "my-test-react-app:build:production",
|
||||
"hmr": false
|
||||
}
|
||||
}
|
||||
},
|
||||
\\"lint\\": {
|
||||
\\"executor\\": \\"@nrwl/linter:eslint\\",
|
||||
\\"outputs\\": [\\"{options.outputFile}\\"],
|
||||
\\"options\\": {
|
||||
\\"lintFilePatterns\\": [\\"apps/my-test-react-app/**/*.{ts,tsx,js,jsx}\\"]
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": ["apps/my-test-react-app/**/*.{ts,tsx,js,jsx}"]
|
||||
}
|
||||
},
|
||||
\\"test\\": {
|
||||
\\"executor\\": \\"@nrwl/jest:jest\\",
|
||||
\\"outputs\\": [\\"{workspaceRoot}/coverage/{projectRoot}\\"],
|
||||
\\"options\\": {
|
||||
\\"jestConfig\\": \\"apps/my-test-react-app/jest.config.ts\\",
|
||||
\\"passWithNoTests\\": true
|
||||
"test": {
|
||||
"executor": "@nrwl/jest:jest",
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
"options": {
|
||||
"jestConfig": "apps/my-test-react-app/jest.config.ts",
|
||||
"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`] = `
|
||||
"/// <reference types=\\"vitest\\" />
|
||||
"/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
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`] = `
|
||||
"<!DOCTYPE html>
|
||||
<html lang=\\"en\\">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset=\\"utf-8\\" />
|
||||
<meta charset="utf-8" />
|
||||
<title>WebappPure</title>
|
||||
<base href=\\"/\\" />
|
||||
<base href="/" />
|
||||
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1\\" />
|
||||
<link rel=\\"icon\\" type=\\"image/x-icon\\" href=\\"favicon.ico\\" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
<workspace-root></workspace-root>
|
||||
<script type=\\"module\\" src=\\"/src/main.ts\\"></script>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</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`] = `
|
||||
"{
|
||||
\\"projects\\": {
|
||||
\\"my-test-web-app\\": {
|
||||
\\"name\\": \\"my-test-web-app\\",
|
||||
\\"$schema\\": \\"../../node_modules/nx/schemas/project-schema.json\\",
|
||||
\\"projectType\\": \\"application\\",
|
||||
\\"root\\": \\"apps/my-test-web-app\\",
|
||||
\\"sourceRoot\\": \\"apps/my-test-web-app/src\\",
|
||||
\\"tags\\": [],
|
||||
\\"targets\\": {
|
||||
\\"build\\": {
|
||||
\\"executor\\": \\"@nrwl/webpack:webpack\\",
|
||||
\\"outputs\\": [\\"{options.outputPath}\\"],
|
||||
\\"defaultConfiguration\\": \\"production\\",
|
||||
\\"options\\": {
|
||||
\\"outputPath\\": \\"dist/apps/my-test-web-app\\",
|
||||
\\"compiler\\": \\"babel\\",
|
||||
\\"main\\": \\"apps/my-test-web-app/src/main.ts\\",
|
||||
\\"tsConfig\\": \\"apps/my-test-web-app/tsconfig.app.json\\",
|
||||
\\"assets\\": [
|
||||
\\"apps/my-test-web-app/src/favicon.ico\\",
|
||||
\\"apps/my-test-web-app/src/assets\\"
|
||||
"projects": {
|
||||
"my-test-web-app": {
|
||||
"name": "my-test-web-app",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "application",
|
||||
"root": "apps/my-test-web-app",
|
||||
"sourceRoot": "apps/my-test-web-app/src",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/webpack:webpack",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"defaultConfiguration": "production",
|
||||
"options": {
|
||||
"outputPath": "dist/apps/my-test-web-app",
|
||||
"compiler": "babel",
|
||||
"main": "apps/my-test-web-app/src/main.ts",
|
||||
"tsConfig": "apps/my-test-web-app/tsconfig.app.json",
|
||||
"assets": [
|
||||
"apps/my-test-web-app/src/favicon.ico",
|
||||
"apps/my-test-web-app/src/assets"
|
||||
],
|
||||
\\"index\\": \\"apps/my-test-web-app/src/index.html\\",
|
||||
\\"baseHref\\": \\"/\\",
|
||||
\\"polyfills\\": \\"apps/my-test-web-app/src/polyfills.ts\\",
|
||||
\\"styles\\": [\\"apps/my-test-web-app/src/styles.css\\"],
|
||||
\\"scripts\\": []
|
||||
"index": "apps/my-test-web-app/src/index.html",
|
||||
"baseHref": "/",
|
||||
"polyfills": "apps/my-test-web-app/src/polyfills.ts",
|
||||
"styles": ["apps/my-test-web-app/src/styles.css"],
|
||||
"scripts": []
|
||||
},
|
||||
\\"configurations\\": {
|
||||
\\"production\\": {
|
||||
\\"optimization\\": true,
|
||||
\\"outputHashing\\": \\"all\\",
|
||||
\\"sourceMap\\": false,
|
||||
\\"namedChunks\\": false,
|
||||
\\"extractLicenses\\": true,
|
||||
\\"vendorChunk\\": false,
|
||||
\\"fileReplacements\\": [
|
||||
"configurations": {
|
||||
"production": {
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"namedChunks": false,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"fileReplacements": [
|
||||
{
|
||||
\\"replace\\": \\"apps/my-test-web-app/src/environments/environment.ts\\",
|
||||
\\"with\\": \\"apps/my-test-web-app/src/environments/environment.prod.ts\\"
|
||||
"replace": "apps/my-test-web-app/src/environments/environment.ts",
|
||||
"with": "apps/my-test-web-app/src/environments/environment.prod.ts"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
\\"serve\\": {
|
||||
\\"executor\\": \\"@nrwl/webpack:dev-server\\",
|
||||
\\"options\\": {
|
||||
\\"buildTarget\\": \\"my-test-web-app:build\\"
|
||||
"serve": {
|
||||
"executor": "@nrwl/webpack:dev-server",
|
||||
"options": {
|
||||
"buildTarget": "my-test-web-app:build"
|
||||
},
|
||||
\\"configurations\\": {
|
||||
\\"production\\": {
|
||||
\\"buildTarget\\": \\"my-test-web-app:build:production\\"
|
||||
"configurations": {
|
||||
"production": {
|
||||
"buildTarget": "my-test-web-app:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
\\"lint\\": {
|
||||
\\"executor\\": \\"@nrwl/linter:eslint\\",
|
||||
\\"outputs\\": [\\"{options.outputFile}\\"],
|
||||
\\"options\\": {
|
||||
\\"lintFilePatterns\\": [\\"apps/my-test-web-app/**/*.ts\\"]
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": ["apps/my-test-web-app/**/*.ts"]
|
||||
}
|
||||
},
|
||||
\\"test\\": {
|
||||
\\"executor\\": \\"@nrwl/jest:jest\\",
|
||||
\\"outputs\\": [\\"{workspaceRoot}/coverage/{projectRoot}\\"],
|
||||
\\"options\\": {
|
||||
\\"jestConfig\\": \\"apps/my-test-web-app/jest.config.ts\\",
|
||||
\\"passWithNoTests\\": true
|
||||
"test": {
|
||||
"executor": "@nrwl/jest:jest",
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
"options": {
|
||||
"jestConfig": "apps/my-test-web-app/jest.config.ts",
|
||||
"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`] = `
|
||||
"/// <reference types=\\"vitest\\" />
|
||||
"/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import viteTsConfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
// 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`] = `
|
||||
Object {
|
||||
"dependencies": Object {
|
||||
{
|
||||
"dependencies": {
|
||||
"existing": "1.0.0",
|
||||
},
|
||||
"devDependencies": Object {
|
||||
"devDependencies": {
|
||||
"@nrwl/js": "0.0.1",
|
||||
"@nrwl/vite": "0.0.1",
|
||||
"@vitejs/plugin-react": "^3.0.0",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
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 react from '@vitejs/plugin-react';
|
||||
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`] = `
|
||||
"/// <reference types=\\"vitest\\" />
|
||||
"/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
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`] = `
|
||||
"/// <reference types=\\"vitest\\" />
|
||||
"/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import viteTsConfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
@ -29,12 +29,12 @@ describe('vitest generator', () => {
|
||||
await generator(appTree, options);
|
||||
const config = readProjectConfiguration(appTree, 'my-test-react-app');
|
||||
expect(config.targets['test']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/vite:test",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"passWithNoTests": true,
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{workspaceRoot}/coverage/{projectRoot}",
|
||||
],
|
||||
}
|
||||
@ -52,13 +52,13 @@ describe('vitest generator', () => {
|
||||
await generator(appTree, options);
|
||||
const config = readProjectConfiguration(appTree, 'my-test-react-app');
|
||||
expect(config.targets['test']).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/vite:test",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"passWithNoTests": true,
|
||||
"reportsDirectory": "../../coverage/apps/my-test-react-app",
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"coverage/apps/my-test-react-app",
|
||||
],
|
||||
}
|
||||
@ -73,25 +73,25 @@ describe('vitest generator', () => {
|
||||
appTree.read('apps/my-test-react-app/tsconfig.json')?.toString() ?? '{}'
|
||||
);
|
||||
expect(tsconfig.references).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Object {
|
||||
"path": "./tsconfig.app.json",
|
||||
},
|
||||
Object {
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
]
|
||||
`);
|
||||
[
|
||||
{
|
||||
"path": "./tsconfig.app.json",
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json",
|
||||
},
|
||||
]
|
||||
`);
|
||||
|
||||
const tsconfigSpec = JSON.parse(
|
||||
appTree.read('apps/my-test-react-app/tsconfig.spec.json')?.toString() ??
|
||||
'{}'
|
||||
);
|
||||
expect(tsconfigSpec).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"types": Array [
|
||||
"types": [
|
||||
"vitest/globals",
|
||||
"vitest/importMeta",
|
||||
"vite/client",
|
||||
@ -99,7 +99,7 @@ describe('vitest generator', () => {
|
||||
],
|
||||
},
|
||||
"extends": "./tsconfig.json",
|
||||
"include": Array [
|
||||
"include": [
|
||||
"vite.config.ts",
|
||||
"src/**/*.test.ts",
|
||||
"src/**/*.spec.ts",
|
||||
@ -123,7 +123,7 @@ describe('vitest generator', () => {
|
||||
'{}'
|
||||
);
|
||||
expect(tsconfig.compilerOptions.types).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
[
|
||||
"vitest/importMeta",
|
||||
]
|
||||
`);
|
||||
|
||||
@ -18,14 +18,14 @@ describe('Update Report Directory Vitest Migration', () => {
|
||||
updateReportDirectoryPlaceholders(tree);
|
||||
expect(readProjectConfiguration(tree, 'project-one').targets)
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"test": Object {
|
||||
{
|
||||
"test": {
|
||||
"executor": "@nrwl/vite:test",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"passWithNoTests": true,
|
||||
"reportsDirectory": "../../coverge/packages/project-one",
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"coverage/packages/project-one",
|
||||
],
|
||||
},
|
||||
@ -33,25 +33,25 @@ describe('Update Report Directory Vitest Migration', () => {
|
||||
`);
|
||||
expect(readProjectConfiguration(tree, 'project-two').targets)
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"custom-test": Object {
|
||||
"configurations": Object {
|
||||
"ci": Object {
|
||||
{
|
||||
"custom-test": {
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"reportsDirectory": "coverge/project-two",
|
||||
},
|
||||
},
|
||||
"executor": "@nrwl/vite:test",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"passWithNoTests": true,
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"coverage/project-two",
|
||||
"dist/coverage/else.txt",
|
||||
],
|
||||
},
|
||||
"test": Object {
|
||||
"test": {
|
||||
"executor": "@nrwl/vite:test",
|
||||
"options": Object {
|
||||
"options": {
|
||||
"passWithNoTests": true,
|
||||
"reportsDirectory": "coverge/project-two",
|
||||
},
|
||||
|
||||
@ -4,7 +4,7 @@ exports[`ensureViteConfigIsCorrect should add build and test options if defineCo
|
||||
"import dts from 'vite-plugin-dts';
|
||||
import { join } from 'path';
|
||||
|
||||
/// <reference types=\\"vitest\\" />
|
||||
/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import viteTsConfigPaths from 'vite-tsconfig-paths';
|
||||
@ -25,7 +25,7 @@ import { join } from 'path';
|
||||
},
|
||||
rollupOptions: {
|
||||
// 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: [
|
||||
dts({
|
||||
@ -72,7 +72,7 @@ import { defineConfig } from 'vite';
|
||||
},
|
||||
rollupOptions: {
|
||||
// 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: [
|
||||
...[
|
||||
@ -124,7 +124,7 @@ import { defineConfig } from 'vite';
|
||||
},
|
||||
rollupOptions: {
|
||||
// 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: [
|
||||
...[
|
||||
@ -175,7 +175,7 @@ import { defineConfig } from 'vite';
|
||||
},
|
||||
rollupOptions: {
|
||||
// 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: {
|
||||
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`] = `
|
||||
"
|
||||
/// <reference types=\\"vitest\\" />
|
||||
/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite';
|
||||
export default defineConfig(({ command, mode, ssrBuild }) => {
|
||||
if (command === 'serve') {
|
||||
@ -218,7 +218,7 @@ exports[`ensureViteConfigIsCorrect should add build options if it is using condi
|
||||
...{
|
||||
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',
|
||||
},
|
||||
...{\\"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`] = `
|
||||
"
|
||||
/// <reference types=\\"vitest\\" />
|
||||
/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import viteTsConfigPaths from 'vite-tsconfig-paths';
|
||||
@ -347,14 +347,14 @@ import { defineConfig } from 'vite';
|
||||
...{
|
||||
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: {
|
||||
...{
|
||||
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'"]}}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -78,18 +78,18 @@ describe('app', () => {
|
||||
expect(tree.exists('apps/my-app-e2e/cypress.config.ts')).toBeTruthy();
|
||||
const tsconfigE2E = readJson(tree, 'apps/my-app-e2e/tsconfig.json');
|
||||
expect(tsconfigE2E).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"compilerOptions": Object {
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"sourceMap": false,
|
||||
"types": Array [
|
||||
"types": [
|
||||
"cypress",
|
||||
"node",
|
||||
],
|
||||
},
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"include": Array [
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.js",
|
||||
"cypress.config.ts",
|
||||
@ -99,36 +99,36 @@ describe('app', () => {
|
||||
|
||||
const eslintJson = readJson(tree, '/apps/my-app/.eslintrc.json');
|
||||
expect(eslintJson).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"extends": Array [
|
||||
{
|
||||
"extends": [
|
||||
"../../.eslintrc.json",
|
||||
],
|
||||
"ignorePatterns": Array [
|
||||
"ignorePatterns": [
|
||||
"!**/*",
|
||||
],
|
||||
"overrides": Array [
|
||||
Object {
|
||||
"files": Array [
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
Object {
|
||||
"files": Array [
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
],
|
||||
"rules": Object {},
|
||||
"rules": {},
|
||||
},
|
||||
],
|
||||
}
|
||||
@ -437,14 +437,14 @@ describe('app', () => {
|
||||
const projectConfiguration = readProjectConfiguration(tree, 'my-app');
|
||||
expect(projectConfiguration.targets.test).toBeUndefined();
|
||||
expect(projectConfiguration.targets.lint).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
{
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": Object {
|
||||
"lintFilePatterns": Array [
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"apps/my-app/**/*.ts",
|
||||
],
|
||||
},
|
||||
"outputs": Array [
|
||||
"outputs": [
|
||||
"{options.outputFile}",
|
||||
],
|
||||
}
|
||||
@ -462,7 +462,7 @@ describe('app', () => {
|
||||
readJson(tree, 'apps/my-cool-app/tsconfig.spec.json').compilerOptions
|
||||
.types
|
||||
).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
[
|
||||
"jest",
|
||||
"node",
|
||||
]
|
||||
@ -488,7 +488,7 @@ describe('app', () => {
|
||||
readJson(tree, 'apps/my-vite-app/tsconfig.spec.json').compilerOptions
|
||||
.types
|
||||
).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
[
|
||||
"jest",
|
||||
"node",
|
||||
]
|
||||
@ -511,7 +511,7 @@ describe('app', () => {
|
||||
readJson(tree, 'apps/my-webpack-app/tsconfig.spec.json').compilerOptions
|
||||
.types
|
||||
).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
[
|
||||
"vitest/globals",
|
||||
"vitest/importMeta",
|
||||
"vite/client",
|
||||
@ -549,7 +549,7 @@ describe('app', () => {
|
||||
preset: '../../jest.preset.js',
|
||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]s$': 'babel-jest',
|
||||
'^.+\\\\.[tj]s$': 'babel-jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/apps/my-app',
|
||||
@ -572,7 +572,7 @@ describe('app', () => {
|
||||
preset: '../../jest.preset.js',
|
||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||
transform: {
|
||||
'^.+\\\\\\\\.[tj]s$': '@swc/jest',
|
||||
'^.+\\\\.[tj]s$': '@swc/jest',
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/apps/my-app',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user