Skip to content

Commit

Permalink
Ensure the jetpack-scan package builds
Browse files Browse the repository at this point in the history
changelog

Remove custom resolution config from jest.config.cjs

Remove babel deps

Remove use of jetpack:src

Restore jetpack:src, adjust tsconfig

Restore import paths
  • Loading branch information
nateweller committed Nov 21, 2024
1 parent c7d7d3e commit f45ec68
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 28 deletions.
15 changes: 0 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions projects/js-packages/scan/changelog/fix-scan-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Fix package build.
6 changes: 0 additions & 6 deletions projects/js-packages/scan/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
),
},
};
5 changes: 0 additions & 5 deletions projects/js-packages/scan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion projects/js-packages/scan/src/types/threats.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ThreatFixStatus } from '..';
import { ThreatFixStatus } from './index';

export type ThreatStatus = 'fixed' | 'ignored' | 'current';

Expand Down
7 changes: 6 additions & 1 deletion projects/js-packages/scan/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"extends": "jetpack-js-tools/tsconfig.base.json",
"include": [ "./src/**/*" ]
"include": [ "./src/**/*" ],
"compilerOptions": {
"typeRoots": [ "./node_modules/@types/", "src/*" ],
"sourceMap": true,
"outDir": "./build/"
}
}

0 comments on commit f45ec68

Please sign in to comment.