Skip to content

Commit

Permalink
chore(before-publish.cjs): Clean up package.json before publishing
Browse files Browse the repository at this point in the history
fix(yarn): No longger needed to use patched version
chore(Cargo.toml): once_cell 1.20.1 is available again + upgrade png dep version
  • Loading branch information
miniben-90 committed Oct 1, 2024
1 parent 5a9db7e commit e8d46e5
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 901 deletions.
8 changes: 8 additions & 0 deletions .scripts/before-publish.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ if (process.env.TAG) {
console.log('[BEFORE-PUBLISH]', 'Updating package.json...');

packageJson.version = version;

// Clean up package.json for publish version to avoid installing none required deps for developers
delete packageJson.devDependencies.ava;
delete packageJson.devDependencies.husky;
delete packageJson.ava;
delete packageJson.packageManager;
packageJson.scripts = {};

fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, undefined, 2));

console.log('[BEFORE-PUBLISH]', 'package.json updated.');
Expand Down
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.1.1.cjs

This file was deleted.

6 changes: 2 additions & 4 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
nodeLinker: node-modules

npmAuditRegistry: "https://registry.npmjs.org"

yarnPath: .yarn/releases/yarn-4.1.1.cjs
#npmAuditRegistry: "https://registry.npmjs.org"
#yarnPath: .yarn/releases/yarn-4.5.0.cjs
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ napi = { version = "2.16.11", default-features = false, features = [
"async",
] }
napi-derive = "2.16.12"
once_cell = "1.19.0"
once_cell = "1.20.1"
base64 = "0.22.1"
x-win = { path = "./x-win-rs" }

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@
"version": "napi version",
"prepare": "husky"
},
"packageManager": "yarn@4.1.1"
"packageManager": "yarn@4.5.0"
}
4 changes: 2 additions & 2 deletions x-win-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name = "x_win"
path = "src/lib.rs"

[dependencies]
once_cell = "1.19.0"
once_cell = "1.20.1"
base64 = "0.22.1"

[target.'cfg(target_os = "windows")'.dependencies]
Expand All @@ -36,7 +36,7 @@ windows = { version = "0.58.0", features = [
"Win32_Graphics_Gdi",
"Win32_Graphics_Imaging",
] }
png = "0.17.13"
png = "0.17.14"

[target.'cfg(target_os = "linux")'.dependencies]
xcb = { version = "1.4.0" }
Expand Down

0 comments on commit e8d46e5

Please sign in to comment.