Skip to content

Commit

Permalink
fix test & lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ocombe committed Apr 24, 2024
1 parent c77234b commit cc977f1
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 44 deletions.
52 changes: 26 additions & 26 deletions .bitmap
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -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"
},
Expand All @@ -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"
}
}
2 changes: 1 addition & 1 deletion angular/examples/my-angular-env/config/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -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');

Expand Down
2 changes: 1 addition & 1 deletion angular/examples/my-angular-env/config/prettier.config.cjs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion angular/examples/my-angular-v13-env/config/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -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'];
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion angular/examples/my-angular-v14-env/config/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -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'];
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion angular/examples/my-angular-v15-env/config/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -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'];
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion angular/examples/my-angular-v16-env/config/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -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');

Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion angular/examples/my-angular-v17-env/config/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -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');

Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
10 changes: 5 additions & 5 deletions angular/templates/generators/ng-env/files/config/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ 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: {
${angularVersion > 13 ? `ngJest: {
skipNgcc: true
},
` : ''}'ts-jest': {
tsconfig: import.meta.resolve('./tsconfig.spec.json')
tsconfig: require.resolve('./tsconfig.spec.json')
}
},`}
transformIgnorePatterns: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit cc977f1

Please sign in to comment.