From eebdda2d52647fdea537e3fc7601165fcd715091 Mon Sep 17 00:00:00 2001 From: Nikan Radan Date: Fri, 3 Jan 2025 16:55:49 -0800 Subject: [PATCH] CommonJS fixes and better imports --- package-lock.json | 48 ++++++++++++-------------- packages/scripts/package.json | 4 +-- packages/scripts/scripts/format.js | 2 +- packages/scripts/scripts/plugin-zip.js | 2 +- 4 files changed, 27 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0dbd2ffdf070d..baccc5e4d4da1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12796,6 +12796,16 @@ "lilconfig": ">=2" } }, + "node_modules/@smushytaco/find-up-simple": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@smushytaco/find-up-simple/-/find-up-simple-1.0.0.tgz", + "integrity": "sha512-e9syA4VK5f3u96f4EvGvedIeu4eDiyHZXRwBQM2gKqONYlzQviKGs8TSD0F1MCeet6pUUYNu7qKqU9OCqDW/YQ==", + "license": "MIT", + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@storybook/addon-a11y": { "version": "8.4.7", "resolved": "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-8.4.7.tgz", @@ -18636,9 +18646,9 @@ "license": "MIT" }, "node_modules/bare-events": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.0.tgz", - "integrity": "sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.1.tgz", + "integrity": "sha512-Bw2PgKSrZ3uCuSV9WQ998c/GTJTd+9bWj97n7aDQMP8dP/exAZQlJeswPty0ISy+HZD+9Ex+C7CCnc9Q5QJFmQ==", "license": "Apache-2.0", "optional": true }, @@ -28282,18 +28292,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/find-up-simple": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.0.tgz", - "integrity": "sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/find-yarn-workspace-root": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", @@ -41561,12 +41559,12 @@ }, "node_modules/package-up": { "name": "@smushytaco/package-up", - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@smushytaco/package-up/-/package-up-1.0.0.tgz", - "integrity": "sha512-PCOlDH2qKsizwcofZsUFMnJOjZ4RrlZtzIi4JJ3tfLLg7ox6pJqzsOeAALygSuurPsx4yhQTFNs49OAOVZ823g==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@smushytaco/package-up/-/package-up-1.0.1.tgz", + "integrity": "sha512-Il8RPhafHJPMMCs85pOQYllpIu/xWYVrKXxnMo3CRkSDZ7SiNbDciSOqEbXaveFnbK3zoc093Dj5s76mIRBVTA==", "license": "MIT", "dependencies": { - "find-up-simple": "^1.0.0" + "@smushytaco/find-up-simple": "^1.0.0" }, "engines": { "node": ">=18.12.0", @@ -44546,12 +44544,12 @@ }, "node_modules/read-package-up": { "name": "@smushytaco/read-package-up", - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@smushytaco/read-package-up/-/read-package-up-1.0.0.tgz", - "integrity": "sha512-IW4AnHs+7L3hu4syzOaE87tei7oedFh/CxLpm3z4Mz5U8vpuOpr2BMnAr8THFTBnFppT1boU7ECl1si0GFCl6g==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@smushytaco/read-package-up/-/read-package-up-1.0.1.tgz", + "integrity": "sha512-8h4l78Gyktqerpf0VzU2xtktZe5PriiKamSmyvoYUnQJWhv+qO98Qh+2fHOAwXvlFzrfuldTsl+zHXIVSVBlOQ==", "license": "MIT", "dependencies": { - "find-up-simple": "^1.0.0", + "@smushytaco/find-up-simple": "^1.0.0", "read-pkg": "^9.0.1", "type-fest": "^4.31.0" }, @@ -56122,14 +56120,14 @@ "minimist": "^1.2.8", "npm-package-json-lint": "^8.0.0", "npm-packlist": "^10.0.0", - "package-up": "npm:@smushytaco/package-up@^1.0.0", + "package-up": "npm:@smushytaco/package-up@^1.0.1", "picocolors": "^1.1.1", "postcss": "^8.4.49", "postcss-loader": "^8.1.1", "prettier": "npm:wp-prettier@3.0.3", "puppeteer-core": "^23.11.1", "react-refresh": "^0.16.0", - "read-package-up": "npm:@smushytaco/read-package-up@^1.0.0", + "read-package-up": "npm:@smushytaco/read-package-up@^1.0.1", "resolve-bin": "^1.0.1", "rtlcss-webpack-plugin": "npm:@smushytaco/rtlcss-webpack-plugin@^1.0.7", "sass": "^1.83.0", diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 7b262fe3b1c8d..cdcadb549bcc2 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -70,14 +70,14 @@ "minimist": "^1.2.8", "npm-package-json-lint": "^8.0.0", "npm-packlist": "^10.0.0", - "package-up": "npm:@smushytaco/package-up@^1.0.0", + "package-up": "npm:@smushytaco/package-up@^1.0.1", "picocolors": "^1.1.1", "postcss": "^8.4.49", "postcss-loader": "^8.1.1", "prettier": "npm:wp-prettier@3.0.3", "puppeteer-core": "^23.11.1", "react-refresh": "^0.16.0", - "read-package-up": "npm:@smushytaco/read-package-up@^1.0.0", + "read-package-up": "npm:@smushytaco/read-package-up@^1.0.1", "resolve-bin": "^1.0.1", "rtlcss-webpack-plugin": "npm:@smushytaco/rtlcss-webpack-plugin@^1.0.7", "sass": "^1.83.0", diff --git a/packages/scripts/scripts/format.js b/packages/scripts/scripts/format.js index eac89c82da098..488f60062b301 100644 --- a/packages/scripts/scripts/format.js +++ b/packages/scripts/scripts/format.js @@ -1,7 +1,7 @@ /** * External dependencies */ -const { exit, stdout } = require( 'process' ); +const { exit, stdout } = require( 'node:process' ); /** * External dependencies diff --git a/packages/scripts/scripts/plugin-zip.js b/packages/scripts/scripts/plugin-zip.js index fe9554352ff81..755fb0c5974a6 100644 --- a/packages/scripts/scripts/plugin-zip.js +++ b/packages/scripts/scripts/plugin-zip.js @@ -5,7 +5,7 @@ const AdmZip = require( 'adm-zip' ); const { sync: glob } = require( 'fast-glob' ); const { sync: packlist } = require( 'npm-packlist' ); const { dirname } = require( 'path' ); -const { stdout } = require( 'process' ); +const { stdout } = require( 'node:process' ); /** * Internal dependencies