From ff114a3d3f984d8d12be479df64016b5cd1b72d9 Mon Sep 17 00:00:00 2001 From: Nate Weller Date: Thu, 21 Nov 2024 15:50:00 -0700 Subject: [PATCH] Ensure the jetpack-scan package builds changelog --- pnpm-lock.yaml | 15 --------------- .../js-packages/scan/changelog/fix-scan-build | 4 ++++ projects/js-packages/scan/jest.config.cjs | 6 ------ projects/js-packages/scan/package.json | 5 ----- projects/js-packages/scan/tsconfig.json | 7 ++++++- 5 files changed, 10 insertions(+), 27 deletions(-) create mode 100644 projects/js-packages/scan/changelog/fix-scan-build diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6fb84510c7881..c7aadc737bc27 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1206,15 +1206,6 @@ importers: specifier: ^18.2.0 version: 18.3.1(react@18.3.1) devDependencies: - '@automattic/jetpack-webpack-config': - specifier: workspace:* - version: link:../webpack-config - '@babel/core': - specifier: 7.26.0 - version: 7.26.0 - '@babel/plugin-transform-react-jsx': - specifier: 7.25.9 - version: 7.25.9(@babel/core@7.26.0) '@jest/globals': specifier: 29.7.0 version: 29.7.0 @@ -1239,12 +1230,6 @@ importers: '@types/react': specifier: 18.3.12 version: 18.3.12 - '@wordpress/babel-plugin-import-jsx-pragma': - specifier: 5.12.0 - version: 5.12.0(@babel/core@7.26.0) - babel-jest: - specifier: 29.7.0 - version: 29.7.0(@babel/core@7.26.0) jest: specifier: ^29.7.0 version: 29.7.0 diff --git a/projects/js-packages/scan/changelog/fix-scan-build b/projects/js-packages/scan/changelog/fix-scan-build new file mode 100644 index 0000000000000..ba17f690a26d0 --- /dev/null +++ b/projects/js-packages/scan/changelog/fix-scan-build @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix package build. diff --git a/projects/js-packages/scan/jest.config.cjs b/projects/js-packages/scan/jest.config.cjs index 057829a25a0f1..1b43920c97941 100644 --- a/projects/js-packages/scan/jest.config.cjs +++ b/projects/js-packages/scan/jest.config.cjs @@ -2,10 +2,4 @@ const baseConfig = require( 'jetpack-js-tools/jest/config.base.js' ); module.exports = { ...baseConfig, - transform: { - ...baseConfig.transform, - '\\.[jt]sx?$': require( 'jetpack-js-tools/jest/babel-jest-config-factory.js' )( - require.resolve - ), - }, }; diff --git a/projects/js-packages/scan/package.json b/projects/js-packages/scan/package.json index 82c54d3707b51..6a981854c384e 100644 --- a/projects/js-packages/scan/package.json +++ b/projects/js-packages/scan/package.json @@ -23,9 +23,6 @@ }, "type": "module", "devDependencies": { - "@automattic/jetpack-webpack-config": "workspace:*", - "@babel/core": "7.26.0", - "@babel/plugin-transform-react-jsx": "7.25.9", "@jest/globals": "29.7.0", "@storybook/addon-actions": "8.3.5", "@storybook/blocks": "8.3.5", @@ -34,8 +31,6 @@ "@testing-library/react": "16.0.1", "@types/jest": "29.5.12", "@types/react": "18.3.12", - "@wordpress/babel-plugin-import-jsx-pragma": "5.12.0", - "babel-jest": "29.7.0", "jest": "^29.7.0", "jest-environment-jsdom": "29.7.0", "storybook": "8.3.5", diff --git a/projects/js-packages/scan/tsconfig.json b/projects/js-packages/scan/tsconfig.json index e85094a0e1f5b..4b336dc1d1321 100644 --- a/projects/js-packages/scan/tsconfig.json +++ b/projects/js-packages/scan/tsconfig.json @@ -1,4 +1,9 @@ { "extends": "jetpack-js-tools/tsconfig.base.json", - "include": [ "./src/**/*" ] + "include": [ "./src/**/*" ], + "compilerOptions": { + "typeRoots": [ "./node_modules/@types/", "src/*" ], + "sourceMap": false, + "outDir": "./build/" + } }