diff --git a/asar.changes b/asar.changes index 76e1b16..b3ad0cd 100644 --- a/asar.changes +++ b/asar.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Sep 11 08:00:37 UTC 2024 - Bruno Pitrus + +- New upstream release 3.2.13 + * Export a `default` property (gh#electron/asar#325) + +------------------------------------------------------------------- +Tue Sep 10 20:20:43 UTC 2024 - Bruno Pitrus + +- New upstream release 3.2.11 + * complete rewrite of the program in Typescript + * ensure symlinks do not write unexpectedly (gh#electron/asar#322) +- Run test suite in %check + ------------------------------------------------------------------- Sun May 5 15:36:24 UTC 2024 - Bruno Pitrus diff --git a/asar.spec b/asar.spec index 227eb2a..2b03f99 100644 --- a/asar.spec +++ b/asar.spec @@ -17,7 +17,7 @@ Name: asar -Version: 3.2.10 +Version: 3.2.13 Release: 0 Summary: Creating atom-shell (electron) app packages License: MIT and ISC @@ -38,6 +38,7 @@ BuildRequires: nodejs-npm %else BuildRequires: npm %endif +BuildRequires: typescript BuildRequires: zstd %global __requires_exclude ^npm(.*)$ @@ -50,9 +51,16 @@ having random access support. %prep %autosetup -p1 -a 1 +# Use system typescript for building +rm -rf node_modules/typescript +rm -v node_modules/.bin/ts{c,server} %build +export ELECTRON_SKIP_BINARY_DOWNLOAD=1 npm rebuild --verbose --foreground-scripts +# tsc may return a non-zero exit code due to type warnings despite actually succesfully compiling the code. +# If it fails to compile, it will be catched anyway in #check. +tsc --removeComments --sourceMap false || true %install mkdir -pv %{buildroot}%{nodejs_sitelib}/@electron @@ -67,7 +75,15 @@ cd %{buildroot}%{nodejs_sitelib}/asar # Correct bogus version in package.json jq -cj '.version="%{version}"' package.json > new -mv new package.json + +#remove devdependencies +jq -cj 'del(.devDependencies)' package.json > tmp +mv -v tmp package.json +npm prune --omit=dev --verbose --ignore-scripts + +mv -v new package.json + + #Remove development garbage find -name example -print0 |xargs -r0 -- rm -rvf find -name test -print0 |xargs -r0 -- rm -rvf @@ -84,17 +100,27 @@ find -name 'snapcraft*' -type f -print -delete find -name '.git*' -type f -print -delete find -name yarn.lock -type f -print -delete find -name '.yarn*' -type f -print -delete +find -name '*package-lock.json' -type f -print -delete +find -name '.prettierrc*' -type f -print -delete find -name '.releaserc*' -type f -print -delete +find -name tsconfig.json -type f -print -delete +# Remove empty directories +find . -type d -empty -print -delete %fdupes %{buildroot} %check +pushd %{buildroot}%{nodejs_sitelib}/asar # https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/#_build_testing_in_check %{__nodejs} -e 'require("./")' +#check that the executable starts +./bin/asar.js -h +popd -#We can't run tests, we don't have mocha available. +#the actual test suite +npx mocha -- --reporter spec --timeout 10000 %files %defattr(-,root,root) diff --git a/prepare_vendor.sh b/prepare_vendor.sh index 12e334e..6bbe806 100644 --- a/prepare_vendor.sh +++ b/prepare_vendor.sh @@ -40,7 +40,7 @@ pushd "$ASAR_PATH" || cleanup_and_exit 1 echo ">>>>>> Install npm modules" -yarn install --frozen-lockfile --ignore-engines --ignore-platform --ignore-scripts --production --link-duplicates +yarn install --frozen-lockfile --ignore-engines --ignore-platform --ignore-scripts --link-duplicates ret=$? if [ $ret -ne 0 ]; then echo "ERROR: yarn install failed" @@ -65,7 +65,8 @@ echo '>>>>>> Remove vendored binaries' find . -type f| sponge |\ xargs -P"$(nproc)" -- sh -c 'file "$@" | grep -v '\'': .*script'\'' | grep '\'': .*executable'\'' | tee /dev/stderr | sed '\''s/: .*//'\'' | xargs rm -fv' - +echo ">>>>>> Remove empty directories" +find . -type d -empty -print -delete echo ">>>>>> Package vendor files" rm -f "${ASAR_PKGDIR}/vendor.tar.zst" diff --git a/v3.2.10.tar.gz b/v3.2.10.tar.gz deleted file mode 100644 index 43a73e6..0000000 --- a/v3.2.10.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b1756c31e8cd42257081b81726b1489a3923709e4cbf86f7d377fab3870b1e26 -size 83884 diff --git a/v3.2.13.tar.gz b/v3.2.13.tar.gz new file mode 100644 index 0000000..9991705 --- /dev/null +++ b/v3.2.13.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ae3926ecbce6560d9f48948f18aee8ade7651f1ee319eb3e1538a1ffaa68ac8 +size 50236 diff --git a/vendor.tar.zst b/vendor.tar.zst index e4d226e..5c65147 100644 --- a/vendor.tar.zst +++ b/vendor.tar.zst @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb65f1c689dc7f1915c21590c44e95fb9d573e752c35026277e25bc0521a0a1b -size 79194 +oid sha256:868bba63e9833e2434238c004473e661597c93adbe1bc40d9c0cf1897808dd9c +size 5366272