Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore update picomatch #2993

Merged
merged 4 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packages/specs/ajv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",
"typings": "./lib/types/index.d.ts",
"browser": "./lib/browser/ajv.umd.min.js",
"exports": {
".": {
"tsed-source": "./src/index.ts",
"types": "./lib/types/index.d.ts",
"browser": "./lib/browser/ajv.umd.min.js",
"import": "./lib/esm/index.js",
"default": "./lib/esm/index.js"
}
},
"scripts": {
"build": "yarn barrels && yarn build:ts",
"clean": "rm -rf lib",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Clean Script Addition
The "clean": "rm -rf lib" script ensures that the output directory is purged before initiating new builds. If cross-platform compatibility (e.g., Windows systems) is a concern, consider using a tool like rimraf.

"build": "yarn clean && yarn barrels && yarn build:ts && yarn run build:browser",
"build:browser": "webpack",
"barrels": "barrels",
"test": "vitest run",
"build:ts": "tsc --build tsconfig.json",
Expand All @@ -37,7 +41,8 @@
"ajv": "^8.17.1",
"eslint": "9.12.0",
"typescript": "5.4.5",
"vitest": "2.1.2"
"vitest": "2.1.2",
"webpack": "^5.75.0"
},
"peerDependencies": {
"@tsed/core": ">=8.4.7",
Expand Down
4 changes: 4 additions & 0 deletions packages/specs/ajv/webpack.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = require("@tsed/webpack-config").create({
root: __dirname,
name: "ajv",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Remove Trailing Comma per ESLint/Prettier Guidelines
ESLint is flagging a trailing comma on line 3. Removing the trailing comma after the "ajv" value will align the code with prettier formatting rules.

Apply the following diff:

-  name: "ajv",
+  name: "ajv"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
name: "ajv",
name: "ajv"
🧰 Tools
🪛 ESLint

[error] 3-3: Delete ,

(prettier/prettier)

});
9 changes: 7 additions & 2 deletions packages/specs/exceptions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",
"typings": "./lib/types/index.d.ts",
"browser": "./lib/browser/exceptions.umd.min.js",
"exports": {
".": {
"tsed-source": "./src/index.ts",
"types": "./lib/types/index.d.ts",
"browser": "./lib/browser/exceptions.umd.min.js",
"import": "./lib/esm/index.js",
"default": "./lib/esm/index.js"
}
},
"scripts": {
"build": "yarn barrels && yarn build:ts",
"clean": "rm -rf lib",
"build": "yarn clean && yarn barrels && yarn build:ts && yarn run build:browser",
"build:browser": "webpack",
Comment on lines +21 to +23
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Enhanced build scripts with browser build support.
The changes introduce a new "clean" script to remove the lib directory, update the "build" script to perform a clean step before building, and add a "build:browser" script that runs webpack. As these scripts now rely on Unix-like shell commands (e.g., rm -rf lib), consider using a cross-platform solution (such as the rimraf package) if Windows compatibility is a concern.

"barrels": "barrels",
"test": "vitest run",
"build:ts": "tsc --build tsconfig.json",
Expand All @@ -33,7 +37,8 @@
"@types/statuses": "2.0.5",
"eslint": "9.12.0",
"typescript": "5.4.5",
"vitest": "2.1.2"
"vitest": "2.1.2",
"webpack": "^5.75.0"
},
"peerDependencies": {
"@tsed/core": ">=8.4.7"
Expand Down
4 changes: 4 additions & 0 deletions packages/specs/exceptions/webpack.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = require("@tsed/webpack-config").create({
root: __dirname,
name: "exceptions",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Remove unnecessary trailing comma.
ESLint (prettier) flagged an extraneous comma after the "exceptions" value. If your linting rules require its removal, please update as follows:

-  name: "exceptions",
+  name: "exceptions"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
name: "exceptions",
name: "exceptions"
🧰 Tools
🪛 ESLint

[error] 3-3: Delete ,

(prettier/prettier)

});
5 changes: 0 additions & 5 deletions packages/specs/json-mapper/webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,5 @@ module.exports = require("@tsed/webpack-config").create({
externals: {
"@tsed/core": "@tsed/core",
"@tsed/schema": "@tsed/schema"
},
resolve: {
alias: {
picomatch: require.resolve("picomatch-browser")
}
}
});
5 changes: 2 additions & 3 deletions packages/specs/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@tsed/openspec": "workspace:*",
"change-case": "^5.4.4",
"json-schema": "0.4.0",
"picomatch": "2.3.1",
"picomatch": "4.0.2",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Major Version Update for picomatch Dependency
The version for picomatch has been updated from its previous version (assumed to be 2.3.1) to 4.0.2. This represents a major version bump and could potentially introduce breaking changes. Please review the picomatch changelog and verify that all usages in the codebase are compatible with any updated API behavior.

"statuses": "^2.0.1",
"tslib": "2.7.0"
},
Expand All @@ -53,11 +53,10 @@
"@tsed/typescript": "workspace:*",
"@types/fs-extra": "11.0.4",
"@types/json-schema": "7.0.15",
"@types/picomatch": "3.0.1",
"@types/picomatch": "3.0.2",
"@types/statuses": "2.0.5",
"ajv": "^8.17.1",
"eslint": "9.12.0",
"picomatch-browser": "^2.2.6",
"typescript": "5.4.5",
"vitest": "2.1.2",
"webpack": "^5.75.0"
Expand Down
5 changes: 0 additions & 5 deletions packages/specs/schema/webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,5 @@ module.exports = require("@tsed/webpack-config").create({
externals: {
"@tsed/core": "@tsed/core",
"change-case": "change-case"
},
resolve: {
alias: {
picomatch: require.resolve("picomatch-browser")
}
}
});
5 changes: 0 additions & 5 deletions packages/third-parties/schema-formio/webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,5 @@ module.exports = require("@tsed/webpack-config").create({
formiojs: "formiojs",
lodash: "lodash",
moment: "moment"
},
resolve: {
alias: {
picomatch: require.resolve("picomatch-browser")
}
}
});
16 changes: 1 addition & 15 deletions tools/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,14 @@ exports.create = ({root, name, entry, externals = {}, resolve = {}}) => {
"@tsed/di": "@tsed/di",
"@tsed/json-mapper": "@tsed/json-mapper",
"@tsed/event-emitter": "@tsed/event-emitter",
"@tsed/exceptions": "@tsed/exceptions",
...externals
},
module: {
rules: [
{
test: /\.(ts|js)?$/,
use: [
{
loader: "webpack-remove-code-blocks",
options: {
blocks: [
"debug",
"devblock",
{
start: "node_env:start",
end: "node_env:end",
prefix: "/*",
suffix: "*/"
}
]
}
},
{
loader: "ts-loader",
options: {
Expand Down
25 changes: 13 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6854,6 +6854,7 @@ __metadata:
tslib: "npm:2.7.0"
typescript: "npm:5.4.5"
vitest: "npm:2.1.2"
webpack: "npm:^5.75.0"
peerDependencies:
"@tsed/core": ">=8.4.7"
"@tsed/di": ">=8.4.7"
Expand Down Expand Up @@ -7131,6 +7132,7 @@ __metadata:
tslib: "npm:2.7.0"
typescript: "npm:5.4.5"
vitest: "npm:2.1.2"
webpack: "npm:^5.75.0"
peerDependencies:
"@tsed/core": ">=8.4.7"
languageName: unknown
Expand Down Expand Up @@ -8444,14 +8446,13 @@ __metadata:
"@tsed/typescript": "workspace:*"
"@types/fs-extra": "npm:11.0.4"
"@types/json-schema": "npm:7.0.15"
"@types/picomatch": "npm:3.0.1"
"@types/picomatch": "npm:3.0.2"
"@types/statuses": "npm:2.0.5"
ajv: "npm:^8.17.1"
change-case: "npm:^5.4.4"
eslint: "npm:9.12.0"
json-schema: "npm:0.4.0"
picomatch: "npm:2.3.1"
picomatch-browser: "npm:^2.2.6"
picomatch: "npm:4.0.2"
statuses: "npm:^2.0.1"
tslib: "npm:2.7.0"
typescript: "npm:5.4.5"
Expand Down Expand Up @@ -9636,10 +9637,10 @@ __metadata:
languageName: node
linkType: hard

"@types/picomatch@npm:3.0.1":
version: 3.0.1
resolution: "@types/picomatch@npm:3.0.1"
checksum: 10/0fadfbd35d80c203d9c7979bc2291b10d3fe859e63a7e96da0b9e45e6d568e8d0b4e79bbf5bb775a478ef9f6b1db76228703b73fa0e242f19c35be8a939c3603
"@types/picomatch@npm:3.0.2":
version: 3.0.2
resolution: "@types/picomatch@npm:3.0.2"
checksum: 10/da4e0e0f4437576dfd59b94f5868f89a2bd5ce4aaa57eb5dc601818885ac7bd03ccb3e8d3402a6820e5a3d63c86c7030031a5fdc67a0598d0675dea912b6512e
languageName: node
linkType: hard

Expand Down Expand Up @@ -24490,14 +24491,14 @@ __metadata:
languageName: node
linkType: hard

"picomatch-browser@npm:^2.2.6":
version: 2.2.6
resolution: "picomatch-browser@npm:2.2.6"
checksum: 10/0136abee4bbef256e9b6b20676873807e11cc6d04d52d4cd4e9e5c7b48b0888e67f224873eb7eaba6da2a5356647e5aa9a2ef62ad98a675c7940344bfae0238e
"picomatch@npm:4.0.2":
version: 4.0.2
resolution: "picomatch@npm:4.0.2"
checksum: 10/ce617b8da36797d09c0baacb96ca8a44460452c89362d7cb8f70ca46b4158ba8bc3606912de7c818eb4a939f7f9015cef3c766ec8a0c6bfc725fdc078e39c717
languageName: node
linkType: hard

"picomatch@npm:2.3.1, picomatch@npm:^2.0.4, picomatch@npm:^2.0.5, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1":
"picomatch@npm:^2.0.4, picomatch@npm:^2.0.5, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1":
version: 2.3.1
resolution: "picomatch@npm:2.3.1"
checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc
Expand Down
Loading