From 8870b0184c8eea9951f2f4b8fda4d19959a04976 Mon Sep 17 00:00:00 2001 From: Nate Weller Date: Tue, 19 Nov 2024 13:50:24 -0700 Subject: [PATCH 1/2] Scan JS Package: Remove references to build step changelog --- .../js-packages/scan/changelog/remove-build | 4 ++++ projects/js-packages/scan/composer.json | 10 +++------- projects/js-packages/scan/package.json | 20 ++++++++----------- 3 files changed, 15 insertions(+), 19 deletions(-) create mode 100644 projects/js-packages/scan/changelog/remove-build diff --git a/projects/js-packages/scan/changelog/remove-build b/projects/js-packages/scan/changelog/remove-build new file mode 100644 index 0000000000000..9718e80ca65d2 --- /dev/null +++ b/projects/js-packages/scan/changelog/remove-build @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fixed configuration issues in the package.json file. diff --git a/projects/js-packages/scan/composer.json b/projects/js-packages/scan/composer.json index bc7dfa2e8339e..ea21778a0d510 100644 --- a/projects/js-packages/scan/composer.json +++ b/projects/js-packages/scan/composer.json @@ -18,16 +18,12 @@ "pnpm run build" ], "build-production": [ - "NODE_ENV=production BABEL_ENV=production pnpm run build" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" + "pnpm run build" ], - "test-coverage": "pnpm run test-coverage", "test-js": [ "pnpm run test" - ] + ], + "test-coverage": "pnpm run test-coverage" }, "repositories": [ { diff --git a/projects/js-packages/scan/package.json b/projects/js-packages/scan/package.json index 1d90bc53bfa80..1711a71bbccda 100644 --- a/projects/js-packages/scan/package.json +++ b/projects/js-packages/scan/package.json @@ -14,14 +14,13 @@ }, "license": "GPL-2.0-or-later", "author": "Automattic", + "type": "module", "scripts": { - "build": "pnpm run clean && pnpm run compile-ts", - "clean": "rm -rf build/", + "build": "pnpm run compile-ts", "compile-ts": "tsc --pretty", "test": "jest", "test-coverage": "pnpm run test --coverage" }, - "type": "module", "devDependencies": { "@automattic/jetpack-webpack-config": "workspace:*", "@babel/core": "7.26.0", @@ -41,15 +40,6 @@ "storybook": "8.3.5", "typescript": "5.0.4" }, - "exports": { - ".": { - "jetpack:src": "./src/index.ts", - "types": "./build/index.d.ts", - "default": "./build/index.js" - } - }, - "main": "./build/index.js", - "types": "./build/index.d.ts", "dependencies": { "@automattic/jetpack-api": "workspace:*", "@automattic/jetpack-base-styles": "workspace:*", @@ -65,5 +55,11 @@ "@wordpress/i18n": "5.11.0", "react": "^18.2.0", "react-dom": "^18.2.0" + }, + "exports": { + ".": { + "types": "./src/index.d.ts", + "default": "./src/index.ts" + } } } From 8b8d6664b14eb933b6d1302d3df8ac9661320252 Mon Sep 17 00:00:00 2001 From: Nate Weller Date: Tue, 19 Nov 2024 15:35:55 -0700 Subject: [PATCH 2/2] Restore production build script Co-authored-by: Brad Jorsch --- projects/js-packages/scan/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/js-packages/scan/composer.json b/projects/js-packages/scan/composer.json index ea21778a0d510..5461d59de7feb 100644 --- a/projects/js-packages/scan/composer.json +++ b/projects/js-packages/scan/composer.json @@ -18,7 +18,7 @@ "pnpm run build" ], "build-production": [ - "pnpm run build" + "NODE_ENV=production BABEL_ENV=production pnpm run build" ], "test-js": [ "pnpm run test"