Skip to content

Commit d5caee5

Browse files
committed
release: Fix npm package references for scoped @crocoder-dev/sce
1 parent 385465f commit d5caee5

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/publish-npm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ jobs:
101101
package_version="$(tar -xOf "$package_file" package/package.json | node -p "JSON.parse(require('fs').readFileSync(0, 'utf8')).version")"
102102
package_name="$(tar -xOf "$package_file" package/package.json | node -p "JSON.parse(require('fs').readFileSync(0, 'utf8')).name")"
103103
104-
if [ "$package_name" != "sce" ]; then
105-
printf 'Downloaded package name %s is not sce\n' "$package_name" >&2
104+
if [ "$package_name" != "@crocoder-dev/sce" ]; then
105+
printf 'Downloaded package name %s is not @crocoder-dev/sce\n' "$package_name" >&2
106106
exit 1
107107
fi
108108

context/glossary.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

context/sce/cli-npm-distribution-contract.md

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,15 +580,18 @@
580580
581581
mv "$packed_name" "$out_dir/$package_name"
582582
583+
npm_pkg_name="$(${pkgs.nodejs}/bin/node -p "JSON.parse(require('fs').readFileSync('npm/package.json', 'utf8')).name")"
584+
583585
jq \
584586
--null-input \
585587
--arg version "$version" \
586588
--arg package "$package_name" \
589+
--arg npm_pkg_name "$npm_pkg_name" \
587590
'{
588591
version: $version,
589-
package_name: "sce",
592+
package_name: $npm_pkg_name,
590593
package_file: $package,
591-
install_command: "npm install -g sce"
594+
install_command: "npm install -g \($npm_pkg_name)"
592595
}' > "$out_dir/$metadata_name"
593596
594597
printf 'Built npm release assets:\n'

0 commit comments

Comments
 (0)