Skip to content

Commit

Permalink
bump @neon-rs/manifest in @neon-rs/cli
Browse files Browse the repository at this point in the history
  • Loading branch information
dherman committed Aug 24, 2024
1 parent a5d0102 commit 0f0c6ea
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 114 deletions.
23 changes: 16 additions & 7 deletions dist/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61586,6 +61586,15 @@ function assertIsLibraryCfg(json) {
}
}
}
function isEmptyFamily(family) {
if (typeof family === 'string') {
return false;
}
if (Array.isArray(family)) {
return family.length === 0;
}
return Object.keys(family).length === 0;
}
function assertHasLibraryCfg(json) {
(0, neon_cjs_1.assertHasNeonCfg)(json);
assertIsLibraryCfg(json.neon);
Expand Down Expand Up @@ -61685,15 +61694,15 @@ class LibraryManifest extends util_cjs_1.AbstractManifest {
this.cfg().platforms = [platformsSrc, preset];
await this.addPlatforms((0, platform_cjs_1.expandPlatformFamily)(preset));
}
// Edge case: use the string shorthand source format for a single preset
else if (isEmptyFamily(platformsSrc)) {
this.cfg().platforms = preset;
await this.addPlatforms((0, platform_cjs_1.expandPlatformFamily)(preset));
}
else if (Array.isArray(platformsSrc)) {
platformsSrc.push(preset);
await this.addPlatforms((0, platform_cjs_1.expandPlatformFamily)(preset));
}
// Edge case: an empty object can be treated like an empty array
else if (Object.keys(platformsSrc).length === 0) {
this.cfg().platforms = [];
await this.addPlatformPreset(preset);
}
else {
const added = await this.addPlatforms((0, platform_cjs_1.expandPlatformFamily)(preset));
Object.assign(platformsSrc, added);
Expand Down Expand Up @@ -61939,7 +61948,7 @@ class AbstractManifest {
set version(value) { this._json.version = value; }
get description() { return this._json.description ?? ""; }
async save(log) {
await fs.writeFile(path.join(this.dir, "package.json"), JSON.stringify(this._json, null, 2), { encoding: 'utf8' });
await fs.writeFile(path.join(this.dir, "package.json"), JSON.stringify(this._json, null, 2) + "\n", { encoding: 'utf8' });
}
stringify() {
return JSON.stringify(this._json);
Expand Down Expand Up @@ -62000,7 +62009,7 @@ module.exports = JSON.parse('{"darwin-arm64":{"os":"darwin","arch":"arm64","abi"
/***/ 6757:
/***/ ((module) => {

module.exports = JSON.parse('{"windows":{"win32-x64-msvc":"x86_64-pc-windows-msvc"},"macos":{"darwin-x64":"x86_64-apple-darwin","darwin-arm64":"aarch64-apple-darwin"},"linux":{"linux-x64-gnu":"x86_64-unknown-linux-gnu","linux-arm-gnueabihf":"armv7-unknown-linux-gnueabihf"},"desktop":{"win32-x64-msvc":"x86_64-pc-windows-msvc","darwin-x64":"x86_64-apple-darwin","darwin-arm64":"aarch64-apple-darwin","linux-x64-gnu":"x86_64-unknown-linux-gnu"},"mobile":{"win32-arm64-msvc":"aarch64-pc-windows-msvc","linux-arm-gnueabihf":"armv7-unknown-linux-gnueabihf","android-arm-eabi":"armv7-linux-androideabi"},"common":["desktop"],"extended":["desktop","mobile"]}');
module.exports = JSON.parse('{"windows":{"win32-x64-msvc":"x86_64-pc-windows-msvc"},"macos":{"darwin-x64":"x86_64-apple-darwin","darwin-arm64":"aarch64-apple-darwin"},"linux":{"linux-x64-gnu":"x86_64-unknown-linux-gnu","linux-arm-gnueabihf":"armv7-unknown-linux-gnueabihf"},"desktop":{"win32-x64-msvc":"x86_64-pc-windows-msvc","darwin-x64":"x86_64-apple-darwin","darwin-arm64":"aarch64-apple-darwin","linux-x64-gnu":"x86_64-unknown-linux-gnu","linux-arm64-gnu":"aarch64-unknown-linux-gnu"},"mobile":{"win32-arm64-msvc":"aarch64-pc-windows-msvc","linux-arm-gnueabihf":"armv7-unknown-linux-gnueabihf","android-arm-eabi":"armv7-linux-androideabi"},"common":["desktop"],"extended":["desktop","mobile"]}');

/***/ }),

Expand Down
16 changes: 8 additions & 8 deletions dist/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
},
"homepage": "https://github.com/dherman/neon-rs#readme",
"optionalDependencies": {
"@cargo-messages/android-arm-eabi": "0.1.74",
"@cargo-messages/darwin-arm64": "0.1.74",
"@cargo-messages/darwin-x64": "0.1.74",
"@cargo-messages/linux-arm-gnueabihf": "0.1.74",
"@cargo-messages/linux-arm64-gnu": "0.1.74",
"@cargo-messages/linux-x64-gnu": "0.1.74",
"@cargo-messages/win32-arm64-msvc": "0.1.74",
"@cargo-messages/win32-x64-msvc": "0.1.74"
"@cargo-messages/android-arm-eabi": "0.1.75",
"@cargo-messages/darwin-arm64": "0.1.75",
"@cargo-messages/darwin-x64": "0.1.75",
"@cargo-messages/linux-arm-gnueabihf": "0.1.75",
"@cargo-messages/linux-arm64-gnu": "0.1.75",
"@cargo-messages/linux-x64-gnu": "0.1.75",
"@cargo-messages/win32-arm64-msvc": "0.1.75",
"@cargo-messages/win32-x64-msvc": "0.1.75"
}
}
64 changes: 32 additions & 32 deletions dist/package-lock.json

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

20 changes: 10 additions & 10 deletions src/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"dependencies": {
"@neon-rs/artifact": "^0.1.0",
"@neon-rs/load": "^0.0.181",
"@neon-rs/manifest": "^0.0.5",
"cargo-messages": "^0.1.74",
"@neon-rs/manifest": "^0.1.1",
"cargo-messages": "^0.1.75",
"chalk": "^5.2.0",
"command-line-args": "^5.2.1",
"command-line-commands": "^3.0.2",
Expand All @@ -70,13 +70,13 @@
"temp": "^0.9.4"
},
"optionalDependencies": {
"@cargo-messages/android-arm-eabi": "0.1.74",
"@cargo-messages/darwin-arm64": "0.1.74",
"@cargo-messages/darwin-x64": "0.1.74",
"@cargo-messages/linux-arm-gnueabihf": "0.1.74",
"@cargo-messages/linux-arm64-gnu": "0.1.74",
"@cargo-messages/linux-x64-gnu": "0.1.74",
"@cargo-messages/win32-arm64-msvc": "0.1.74",
"@cargo-messages/win32-x64-msvc": "0.1.74"
"@cargo-messages/android-arm-eabi": "0.1.75",
"@cargo-messages/darwin-arm64": "0.1.75",
"@cargo-messages/darwin-x64": "0.1.75",
"@cargo-messages/linux-arm-gnueabihf": "0.1.75",
"@cargo-messages/linux-arm64-gnu": "0.1.75",
"@cargo-messages/linux-x64-gnu": "0.1.75",
"@cargo-messages/win32-arm64-msvc": "0.1.75",
"@cargo-messages/win32-x64-msvc": "0.1.75"
}
}
Loading

0 comments on commit 0f0c6ea

Please sign in to comment.