Skip to content

Commit

Permalink
build: build package with target es2022
Browse files Browse the repository at this point in the history
BREAKING CHANGE

`jest-preset-angular` artifacts are now built and shipped to `npm` targeting ES2022
  • Loading branch information
ahnpnl committed Mar 1, 2025
1 parent 23152bb commit 59b7d17
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/__snapshots__/ng-jest-transformer.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`NgJestTransformer should use esbuild to process mjs or \`node_modules\`
"sourcefile": "foo.mjs",
"sourcemap": false,
"sourcesContent": true,
"target": "es2015",
"target": "es2016",
},
]
`;
Expand All @@ -33,7 +33,7 @@ exports[`NgJestTransformer should use esbuild to process mjs or \`node_modules\`
"sourcefile": "node_modules/foo.js",
"sourcemap": false,
"sourcesContent": true,
"target": "es2015",
"target": "es2016",
},
]
`;
Expand Down Expand Up @@ -90,7 +90,7 @@ exports[`NgJestTransformer should use esbuild to process mjs or \`node_modules\`
"sourcefile": "foo.mjs",
"sourcemap": true,
"sourcesContent": true,
"target": "es2015",
"target": "es2016",
},
]
`;
Expand All @@ -109,7 +109,7 @@ exports[`NgJestTransformer should use esbuild to process mjs or \`node_modules\`
"sourcefile": "node_modules/foo.js",
"sourcemap": true,
"sourcesContent": true,
"target": "es2015",
"target": "es2016",
},
]
`;
Expand All @@ -128,7 +128,7 @@ exports[`NgJestTransformer should use esbuild to process mjs or \`node_modules\`
"sourcefile": "foo.mjs",
"sourcemap": false,
"sourcesContent": true,
"target": "es2015",
"target": "es2016",
},
]
`;
Expand All @@ -147,7 +147,7 @@ exports[`NgJestTransformer should use esbuild to process mjs or \`node_modules\`
"sourcefile": "node_modules/foo.js",
"sourcemap": false,
"sourcesContent": true,
"target": "es2015",
"target": "es2016",
},
]
`;
Expand Down Expand Up @@ -204,7 +204,7 @@ exports[`NgJestTransformer should use esbuild to process mjs or \`node_modules\`
"sourcefile": "foo.mjs",
"sourcemap": true,
"sourcesContent": true,
"target": "es2015",
"target": "es2016",
},
]
`;
Expand All @@ -223,7 +223,7 @@ exports[`NgJestTransformer should use esbuild to process mjs or \`node_modules\`
"sourcefile": "node_modules/foo.js",
"sourcemap": true,
"sourcesContent": true,
"target": "es2015",
"target": "es2016",
},
]
`;
2 changes: 1 addition & 1 deletion src/config/ng-jest-config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ describe('NgJestConfig', () => {
expect(compilerOptions.annotationsAs).toBe('decorators');
expect(compilerOptions.enableResourceInlining).toBe(false);
expect(compilerOptions.allowJs).toBe(true);
expect(compilerOptions.target).toBe(ScriptTarget.ES2015);
expect(compilerOptions.target).toBe(ScriptTarget.ES2022);
});
});
1 change: 1 addition & 0 deletions tsconfig-base.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"target": "ES2015",
"types": ["jest"]
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"esModuleInterop": true,
"resolveJsonModule": true,
"moduleResolution": "Node",
"target": "ES2015",
"target": "ES2022",
"module": "CommonJS",
"lib": ["esnext", "dom"],
"types": ["node", "jest"]
Expand Down

0 comments on commit 59b7d17

Please sign in to comment.