From cc977f17f6510ef4db3c4a12304e7b1ac6bb8c35 Mon Sep 17 00:00:00 2001 From: Olivier Combe Date: Tue, 23 Apr 2024 15:55:46 +0200 Subject: [PATCH] fix test & lint --- .bitmap | 52 +++++++++---------- .../my-angular-env/config/jest.config.cjs | 2 +- .../my-angular-env/config/prettier.config.cjs | 2 +- .../my-angular-v13-env/config/jest.config.cjs | 2 +- .../config/prettier.config.cjs | 2 +- .../my-angular-v14-env/config/jest.config.cjs | 2 +- .../config/prettier.config.cjs | 2 +- .../my-angular-v15-env/config/jest.config.cjs | 2 +- .../config/prettier.config.cjs | 2 +- .../my-angular-v16-env/config/jest.config.cjs | 2 +- .../config/prettier.config.cjs | 2 +- .../my-angular-v17-env/config/jest.config.cjs | 2 +- .../config/prettier.config.cjs | 2 +- .../ng-env/files/config/jest.config.ts | 10 ++-- .../ng-env/files/config/prettier.config.ts | 2 +- 15 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.bitmap b/.bitmap index 4416eb3..e0f3459 100644 --- a/.bitmap +++ b/.bitmap @@ -12,56 +12,56 @@ "angular-env": { "name": "angular-env", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.5", "mainFile": "index.ts", "rootDir": "angular/envs/angular-env" }, "app-types/angular-app-type": { "name": "app-types/angular-app-type", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.1", "mainFile": "index.ts", "rootDir": "angular/app-types/angular-app-type" }, "dev-services/common": { "name": "dev-services/common", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.1", "mainFile": "index.ts", "rootDir": "angular/devkit/common" }, "dev-services/compiler/elements": { "name": "dev-services/compiler/elements", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.1", "mainFile": "index.ts", "rootDir": "angular/devkit/compiler/elements" }, "dev-services/compiler/multi-compiler": { "name": "dev-services/compiler/multi-compiler", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.1", "mainFile": "index.ts", "rootDir": "angular/devkit/compiler/multi-compiler" }, "dev-services/compiler/ng-packagr": { "name": "dev-services/compiler/ng-packagr", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.1", "mainFile": "index.ts", "rootDir": "angular/devkit/compiler/ng-packagr" }, "dev-services/linter/eslint": { "name": "dev-services/linter/eslint", "scope": "bitdev.angular", - "version": "3.0.0", + "version": "3.0.1", "mainFile": "index.js", "rootDir": "angular/devkit/linter/eslint" }, "dev-services/ng-compat": { "name": "dev-services/ng-compat", "scope": "bitdev.angular", - "version": "2.0.0", + "version": "2.0.1", "mainFile": "index.ts", "rootDir": "angular/devkit/ng-compat" }, @@ -75,14 +75,14 @@ "dev-services/preview/preview": { "name": "dev-services/preview/preview", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.1", "mainFile": "index.ts", "rootDir": "angular/devkit/preview/preview" }, "dev-services/preview/preview-app": { "name": "dev-services/preview/preview-app", "scope": "bitdev.angular", - "version": "1.0.0", + "version": "1.0.1", "mainFile": "index.ts", "rootDir": "angular/devkit/preview/preview-app" }, @@ -96,107 +96,107 @@ "dev-services/webpack": { "name": "dev-services/webpack", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.1", "mainFile": "index.ts", "rootDir": "angular/devkit/webpack" }, "envs/angular-v13-env": { "name": "envs/angular-v13-env", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.5", "mainFile": "index.ts", "rootDir": "angular/envs/angular-v13-env" }, "envs/angular-v14-env": { "name": "envs/angular-v14-env", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.5", "mainFile": "index.ts", "rootDir": "angular/envs/angular-v14-env" }, "envs/angular-v15-env": { "name": "envs/angular-v15-env", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.5", "mainFile": "index.ts", "rootDir": "angular/envs/angular-v15-env" }, "envs/angular-v16-env": { "name": "envs/angular-v16-env", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.5", "mainFile": "index.ts", "rootDir": "angular/envs/angular-v16-env" }, "envs/angular-v17-env": { "name": "envs/angular-v17-env", "scope": "bitdev.angular", - "version": "4.0.0", + "version": "4.0.5", "mainFile": "index.ts", "rootDir": "angular/envs/angular-v17-env" }, "envs/base-env": { "name": "envs/base-env", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.5", "mainFile": "index.ts", "rootDir": "angular/envs/base-env" }, "examples/my-angular-env": { "name": "examples/my-angular-env", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.5", "mainFile": "index.ts", "rootDir": "angular/examples/my-angular-env" }, "examples/my-angular-v13-env": { "name": "examples/my-angular-v13-env", "scope": "bitdev.angular", - "version": "4.0.0", + "version": "4.0.5", "mainFile": "index.ts", "rootDir": "angular/examples/my-angular-v13-env" }, "examples/my-angular-v14-env": { "name": "examples/my-angular-v14-env", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.5", "mainFile": "index.ts", "rootDir": "angular/examples/my-angular-v14-env" }, "examples/my-angular-v15-env": { "name": "examples/my-angular-v15-env", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.5", "mainFile": "index.ts", "rootDir": "angular/examples/my-angular-v15-env" }, "examples/my-angular-v16-env": { "name": "examples/my-angular-v16-env", "scope": "bitdev.angular", - "version": "4.0.0", + "version": "4.0.5", "mainFile": "index.ts", "rootDir": "angular/examples/my-angular-v16-env" }, "examples/my-angular-v17-env": { "name": "examples/my-angular-v17-env", "scope": "bitdev.angular", - "version": "4.0.0", + "version": "4.0.5", "mainFile": "index.ts", "rootDir": "angular/examples/my-angular-v17-env" }, "templates/generators": { "name": "templates/generators", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.5", "mainFile": "index.ts", "rootDir": "angular/templates/generators" }, "templates/starters": { "name": "templates/starters", "scope": "bitdev.angular", - "version": "5.0.0", + "version": "5.0.1", "mainFile": "index.ts", "rootDir": "angular/templates/starters" }, "$schema-version": "17.0.0" -} +} \ No newline at end of file diff --git a/angular/examples/my-angular-env/config/jest.config.cjs b/angular/examples/my-angular-env/config/jest.config.cjs index 257e87b..ffd5b0c 100644 --- a/angular/examples/my-angular-env/config/jest.config.cjs +++ b/angular/examples/my-angular-env/config/jest.config.cjs @@ -1,7 +1,7 @@ /** * @see https://bit.dev/reference/jest/jest-config */ -const { jestConfig } = require('@bitdev/angular.envs.angular-v17-env/jest/jest.config.cjs'); +const jestConfig = require('@bitdev/angular.envs.angular-v17-env/jest/jest.config.cjs'); const { generateNodeModulesPattern } = require('@teambit/dependencies.modules.packages-excluder'); const { defaultTransformerOptions } = require('jest-preset-angular/presets'); diff --git a/angular/examples/my-angular-env/config/prettier.config.cjs b/angular/examples/my-angular-env/config/prettier.config.cjs index 222b241..121d0d4 100644 --- a/angular/examples/my-angular-env/config/prettier.config.cjs +++ b/angular/examples/my-angular-env/config/prettier.config.cjs @@ -1,7 +1,7 @@ /** * @see https://bit.dev/reference/prettier/prettier-config */ -const { prettierConfig } = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); +const prettierConfig = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); module.exports = { ...prettierConfig, diff --git a/angular/examples/my-angular-v13-env/config/jest.config.cjs b/angular/examples/my-angular-v13-env/config/jest.config.cjs index 9e5504a..d19a0e0 100644 --- a/angular/examples/my-angular-v13-env/config/jest.config.cjs +++ b/angular/examples/my-angular-v13-env/config/jest.config.cjs @@ -1,7 +1,7 @@ /** * @see https://bit.dev/reference/jest/jest-config */ -const { jestConfig } = require('@bitdev/angular.envs.angular-v13-env/jest/jest.config.cjs'); +const jestConfig = require('@bitdev/angular.envs.angular-v13-env/jest/jest.config.cjs'); const { generateNodeModulesPattern } = require('@teambit/dependencies.modules.packages-excluder'); const packagesToExclude = ['@angular', '@ngrx', 'apollo-angular']; diff --git a/angular/examples/my-angular-v13-env/config/prettier.config.cjs b/angular/examples/my-angular-v13-env/config/prettier.config.cjs index 222b241..121d0d4 100644 --- a/angular/examples/my-angular-v13-env/config/prettier.config.cjs +++ b/angular/examples/my-angular-v13-env/config/prettier.config.cjs @@ -1,7 +1,7 @@ /** * @see https://bit.dev/reference/prettier/prettier-config */ -const { prettierConfig } = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); +const prettierConfig = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); module.exports = { ...prettierConfig, diff --git a/angular/examples/my-angular-v14-env/config/jest.config.cjs b/angular/examples/my-angular-v14-env/config/jest.config.cjs index c8d3d22..83017ba 100644 --- a/angular/examples/my-angular-v14-env/config/jest.config.cjs +++ b/angular/examples/my-angular-v14-env/config/jest.config.cjs @@ -1,7 +1,7 @@ /** * @see https://bit.dev/reference/jest/jest-config */ -const { jestConfig } = require('@bitdev/angular.envs.angular-v14-env/jest/jest.config.cjs'); +const jestConfig = require('@bitdev/angular.envs.angular-v14-env/jest/jest.config.cjs'); const { generateNodeModulesPattern } = require('@teambit/dependencies.modules.packages-excluder'); const packagesToExclude = ['@angular', '@ngrx', 'apollo-angular']; diff --git a/angular/examples/my-angular-v14-env/config/prettier.config.cjs b/angular/examples/my-angular-v14-env/config/prettier.config.cjs index 222b241..121d0d4 100644 --- a/angular/examples/my-angular-v14-env/config/prettier.config.cjs +++ b/angular/examples/my-angular-v14-env/config/prettier.config.cjs @@ -1,7 +1,7 @@ /** * @see https://bit.dev/reference/prettier/prettier-config */ -const { prettierConfig } = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); +const prettierConfig = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); module.exports = { ...prettierConfig, diff --git a/angular/examples/my-angular-v15-env/config/jest.config.cjs b/angular/examples/my-angular-v15-env/config/jest.config.cjs index 220c083..cbf703c 100644 --- a/angular/examples/my-angular-v15-env/config/jest.config.cjs +++ b/angular/examples/my-angular-v15-env/config/jest.config.cjs @@ -1,7 +1,7 @@ /** * @see https://bit.dev/reference/jest/jest-config */ -const { jestConfig } = require('@bitdev/angular.envs.angular-v15-env/jest/jest.config.cjs'); +const jestConfig = require('@bitdev/angular.envs.angular-v15-env/jest/jest.config.cjs'); const { generateNodeModulesPattern } = require('@teambit/dependencies.modules.packages-excluder'); const packagesToExclude = ['@angular', '@ngrx', 'apollo-angular']; diff --git a/angular/examples/my-angular-v15-env/config/prettier.config.cjs b/angular/examples/my-angular-v15-env/config/prettier.config.cjs index 222b241..121d0d4 100644 --- a/angular/examples/my-angular-v15-env/config/prettier.config.cjs +++ b/angular/examples/my-angular-v15-env/config/prettier.config.cjs @@ -1,7 +1,7 @@ /** * @see https://bit.dev/reference/prettier/prettier-config */ -const { prettierConfig } = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); +const prettierConfig = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); module.exports = { ...prettierConfig, diff --git a/angular/examples/my-angular-v16-env/config/jest.config.cjs b/angular/examples/my-angular-v16-env/config/jest.config.cjs index ef7f30f..6b801eb 100644 --- a/angular/examples/my-angular-v16-env/config/jest.config.cjs +++ b/angular/examples/my-angular-v16-env/config/jest.config.cjs @@ -1,7 +1,7 @@ /** * @see https://bit.dev/reference/jest/jest-config */ -const { jestConfig } = require('@bitdev/angular.envs.angular-v16-env/jest/jest.config.cjs'); +const jestConfig = require('@bitdev/angular.envs.angular-v16-env/jest/jest.config.cjs'); const { generateNodeModulesPattern } = require('@teambit/dependencies.modules.packages-excluder'); const { defaultTransformerOptions } = require('jest-preset-angular/presets'); diff --git a/angular/examples/my-angular-v16-env/config/prettier.config.cjs b/angular/examples/my-angular-v16-env/config/prettier.config.cjs index 222b241..121d0d4 100644 --- a/angular/examples/my-angular-v16-env/config/prettier.config.cjs +++ b/angular/examples/my-angular-v16-env/config/prettier.config.cjs @@ -1,7 +1,7 @@ /** * @see https://bit.dev/reference/prettier/prettier-config */ -const { prettierConfig } = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); +const prettierConfig = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); module.exports = { ...prettierConfig, diff --git a/angular/examples/my-angular-v17-env/config/jest.config.cjs b/angular/examples/my-angular-v17-env/config/jest.config.cjs index 009e4d6..5e5ed7d 100644 --- a/angular/examples/my-angular-v17-env/config/jest.config.cjs +++ b/angular/examples/my-angular-v17-env/config/jest.config.cjs @@ -1,7 +1,7 @@ /** * @see https://bit.dev/reference/jest/jest-config */ -const { jestConfig } = require('@bitdev/angular.envs.angular-v17-env/jest/jest.config.cjs'); +const jestConfig = require('@bitdev/angular.envs.angular-v17-env/jest/jest.config.cjs'); const { generateNodeModulesPattern } = require('@teambit/dependencies.modules.packages-excluder'); const { defaultTransformerOptions } = require('jest-preset-angular/presets'); diff --git a/angular/examples/my-angular-v17-env/config/prettier.config.cjs b/angular/examples/my-angular-v17-env/config/prettier.config.cjs index 222b241..121d0d4 100644 --- a/angular/examples/my-angular-v17-env/config/prettier.config.cjs +++ b/angular/examples/my-angular-v17-env/config/prettier.config.cjs @@ -1,7 +1,7 @@ /** * @see https://bit.dev/reference/prettier/prettier-config */ -const { prettierConfig } = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); +const prettierConfig = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); module.exports = { ...prettierConfig, diff --git a/angular/templates/generators/ng-env/files/config/jest.config.ts b/angular/templates/generators/ng-env/files/config/jest.config.ts index 59eeae3..1596c9e 100644 --- a/angular/templates/generators/ng-env/files/config/jest.config.ts +++ b/angular/templates/generators/ng-env/files/config/jest.config.ts @@ -4,22 +4,22 @@ export const jestConfigFile = (angularVersion: number, envPkgName: string) => { content: `/** * @see https://bit.dev/reference/jest/jest-config */ -const { jestConfig } = require('${envPkgName}/jest/jest.config.cjs'); +const jestConfig = require('${envPkgName}/jest/jest.config.cjs'); const { generateNodeModulesPattern } = require('@teambit/dependencies.modules.packages-excluder'); ${angularVersion >= 16 ? ` const { defaultTransformerOptions } = require('jest-preset-angular/presets'); ` : ''} -const packagesToExclude: string[] = ['@angular', '@ngrx', 'apollo-angular']; +const packagesToExclude = ['@angular', '@ngrx', 'apollo-angular']; module.exports = { ...jestConfig, ${angularVersion >= 16 ? `transform: { - '^.+\\\\.(ts|js|mjs|html|svg)$': [ + '^.+\\.(ts|js|mjs|html|svg)$': [ 'jest-preset-angular', { ...defaultTransformerOptions, - tsconfig: import.meta.resolve('./tsconfig.spec.json') + tsconfig: require.resolve('./tsconfig.spec.json') } ] },` : `globals: { @@ -27,7 +27,7 @@ module.exports = { skipNgcc: true }, ` : ''}'ts-jest': { - tsconfig: import.meta.resolve('./tsconfig.spec.json') + tsconfig: require.resolve('./tsconfig.spec.json') } },`} transformIgnorePatterns: [ diff --git a/angular/templates/generators/ng-env/files/config/prettier.config.ts b/angular/templates/generators/ng-env/files/config/prettier.config.ts index b7b4005..347cd0f 100644 --- a/angular/templates/generators/ng-env/files/config/prettier.config.ts +++ b/angular/templates/generators/ng-env/files/config/prettier.config.ts @@ -4,7 +4,7 @@ export const prettierConfigFile = () => { content: `/** * @see https://bit.dev/reference/prettier/prettier-config */ -const { prettierConfig } = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); +const prettierConfig = require('@bitdev/angular.envs.base-env/config/prettier.config.cjs'); module.exports = { ...prettierConfig,