Skip to content

Commit

Permalink
Remove no longer required babel plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
yhatt committed Sep 15, 2024
1 parent e3dc3c4 commit 150d42c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 23 deletions.
11 changes: 0 additions & 11 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
// This setting is used only to transform ESM while running Jest.
module.exports = {
presets: [['@babel/env', { targets: { node: 'current' } }]],
plugins: [
[
'transform-rename-import',
{
replacements: [
{ original: '^node:(.+)$', replacement: '$1' },
{ original: '^#(.+)$', replacement: '$1' }, // "#"" prefix is used by chalk
],
},
],
],
}
9 changes: 3 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { jsWithBabel } = require('ts-jest/presets')
const { createJsWithBabelPreset } = require('ts-jest')

const jsWithBabel = createJsWithBabelPreset()

const esModules = [
'@sindresorhus/merge-streams',
Expand Down Expand Up @@ -39,11 +41,6 @@ module.exports = {
'\\.s?css$': '<rootDir>/test/_transformers/css.js',
'\\.png$': '<rootDir>/test/_transformers/png.js',
'\\.pug$': '<rootDir>/test/_transformers/pug.js',

// TODO: Remove if Jest did not fail on ESM dynamic imports
'custom-engine\\.mjs$': 'babel-jest',
'config\\.mjs$': 'babel-jest',
'esm-project/marp\\.config\\.js$': 'babel-jest',
},
transformIgnorePatterns: [`/node_modules/(?!${esModules.join('|')})`],
testEnvironment: 'node',
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
"@typescript-eslint/parser": "^8.5.0",
"@yao-pkg/pkg": "^5.14.0",
"autoprefixer": "^10.4.20",
"babel-plugin-transform-rename-import": "^2.3.0",
"bespoke": "bespokejs/bespoke",
"builtin-modules": "^4.0.0",
"chalk": "^5.3.0",
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2330,11 +2330,6 @@ babel-plugin-polyfill-regenerator@^0.6.1:
dependencies:
"@babel/helper-define-polyfill-provider" "^0.6.2"

babel-plugin-transform-rename-import@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-rename-import/-/babel-plugin-transform-rename-import-2.3.0.tgz#5d9d645f937b0ca5c26a24b2510a06277b6ffd9b"
integrity sha512-dPgJoT57XC0PqSnLgl2FwNvxFrWlspatX2dkk7yjKQj5HHGw071vAcOf+hqW8ClqcBDMvEbm6mevn5yHAD8mlQ==

babel-preset-current-node-syntax@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz#9a929eafece419612ef4ae4f60b1862ebad8ef30"
Expand Down

0 comments on commit 150d42c

Please sign in to comment.