Skip to content

Commit

Permalink
major: version 4
Browse files Browse the repository at this point in the history
### Breaking
* Drop support for CommonJS

### Patch
* Updated dependencies
  • Loading branch information
vHeemstra authored Jul 10, 2024
2 parents ee92dde + 0a1cd09 commit 889235a
Show file tree
Hide file tree
Showing 7 changed files with 261 additions and 411 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env node */
module.exports = {
env: {
commonjs: true,
commonjs: false,
es2021: true,
node: true,
},
Expand Down
File renamed without changes.
36 changes: 19 additions & 17 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { JestConfigWithTsJest } from 'ts-jest';

import { defaults as tsjPreset } from 'ts-jest/presets';
// import { defaults as tsjPreset } from 'ts-jest/presets';
// import { defaultsESM as tsjPreset } from 'ts-jest/presets';
// import { jsWithTs as tsjPreset } from 'ts-jest/presets';
// import { jsWithTsESM as tsjPreset } from 'ts-jest/presets';
import { jsWithTsESM as tsjPreset } from 'ts-jest/presets';
// import { jsWithBabel as tsjPreset } from 'ts-jest/presets';
// import { jsWithBabelESM as tsjPreset } from 'ts-jest/presets';

Expand Down Expand Up @@ -225,12 +225,14 @@ const jestConfig: JestConfigWithTsJest = {
* See: https://kulshekhar.github.io/ts-jest/docs/getting-started/presets
* See: https://kulshekhar.github.io/ts-jest/docs/getting-started/options/
*/
// preset: 'ts-jest/presets/js-with-ts',
transformIgnorePatterns: ['node_modules/(?!(fill-pot-po|gettext-parser)/)'],
// preset: 'ts-jest/presets/default-esm',
// preset: 'ts-jest',
// extensionsToTreatAsEsm: ['.ts'],
// moduleNameMapper: {
// '^(\\.{1,2}/.*)\\.js$': '$1',
// },
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
testEnvironment: 'node',
// testEnvironmentOptions: {
// NODE_OPTIONS: '--experimental-vm-modules',
Expand All @@ -239,17 +241,17 @@ const jestConfig: JestConfigWithTsJest = {
...tsjPreset.transform,
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
'^.+\\.tsx?$': [
'ts-jest',
{
// ts-jest configuration goes here
diagnostics: false,
babelConfig: {
plugins: ['babel-plugin-transform-import-meta'],
},
// useESM: true,
},
],
// '^.+\\.tsx?$': [
// 'ts-jest',
// {
// // ts-jest configuration goes here
// diagnostics: false,
// babelConfig: {
// plugins: ['babel-plugin-transform-import-meta'],
// },
// // useESM: true,
// },
// ],
},
};

Expand Down
Loading

0 comments on commit 889235a

Please sign in to comment.