Accepting request 1200054 from devel:languages:nodejs
- New upstream release 3.2.13 * Export a `default` property (gh#electron/asar#325) - 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 OBS-URL: https://build.opensuse.org/request/show/1200054 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/asar?expand=0&rev=10
This commit is contained in:
commit
7582ef8514
14
asar.changes
14
asar.changes
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 11 08:00:37 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>
|
||||||
|
|
||||||
|
- New upstream release 3.2.13
|
||||||
|
* Export a `default` property (gh#electron/asar#325)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 10 20:20:43 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>
|
||||||
|
|
||||||
|
- 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 <brunopitrus@hotmail.com>
|
Sun May 5 15:36:24 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>
|
||||||
|
|
||||||
|
32
asar.spec
32
asar.spec
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: asar
|
Name: asar
|
||||||
Version: 3.2.10
|
Version: 3.2.13
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Creating atom-shell (electron) app packages
|
Summary: Creating atom-shell (electron) app packages
|
||||||
License: MIT and ISC
|
License: MIT and ISC
|
||||||
@ -38,6 +38,7 @@ BuildRequires: nodejs-npm
|
|||||||
%else
|
%else
|
||||||
BuildRequires: npm
|
BuildRequires: npm
|
||||||
%endif
|
%endif
|
||||||
|
BuildRequires: typescript
|
||||||
BuildRequires: zstd
|
BuildRequires: zstd
|
||||||
|
|
||||||
%global __requires_exclude ^npm(.*)$
|
%global __requires_exclude ^npm(.*)$
|
||||||
@ -50,9 +51,16 @@ having random access support.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -a 1
|
%autosetup -p1 -a 1
|
||||||
|
# Use system typescript for building
|
||||||
|
rm -rf node_modules/typescript
|
||||||
|
rm -v node_modules/.bin/ts{c,server}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
|
||||||
npm rebuild --verbose --foreground-scripts
|
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
|
%install
|
||||||
mkdir -pv %{buildroot}%{nodejs_sitelib}/@electron
|
mkdir -pv %{buildroot}%{nodejs_sitelib}/@electron
|
||||||
@ -67,7 +75,15 @@ cd %{buildroot}%{nodejs_sitelib}/asar
|
|||||||
|
|
||||||
# Correct bogus version in package.json
|
# Correct bogus version in package.json
|
||||||
jq -cj '.version="%{version}"' package.json > new
|
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
|
#Remove development garbage
|
||||||
find -name example -print0 |xargs -r0 -- rm -rvf
|
find -name example -print0 |xargs -r0 -- rm -rvf
|
||||||
find -name test -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 '.git*' -type f -print -delete
|
||||||
find -name yarn.lock -type f -print -delete
|
find -name yarn.lock -type f -print -delete
|
||||||
find -name '.yarn*' -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 '.releaserc*' -type f -print -delete
|
||||||
|
find -name tsconfig.json -type f -print -delete
|
||||||
|
|
||||||
|
# Remove empty directories
|
||||||
|
find . -type d -empty -print -delete
|
||||||
|
|
||||||
%fdupes %{buildroot}
|
%fdupes %{buildroot}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
pushd %{buildroot}%{nodejs_sitelib}/asar
|
||||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/#_build_testing_in_check
|
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/#_build_testing_in_check
|
||||||
%{__nodejs} -e 'require("./")'
|
%{__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
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
@ -40,7 +40,7 @@ pushd "$ASAR_PATH" || cleanup_and_exit 1
|
|||||||
|
|
||||||
|
|
||||||
echo ">>>>>> Install npm modules"
|
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=$?
|
ret=$?
|
||||||
if [ $ret -ne 0 ]; then
|
if [ $ret -ne 0 ]; then
|
||||||
echo "ERROR: yarn install failed"
|
echo "ERROR: yarn install failed"
|
||||||
@ -65,7 +65,8 @@ echo '>>>>>> Remove vendored binaries'
|
|||||||
find . -type f| sponge |\
|
find . -type f| sponge |\
|
||||||
xargs -P"$(nproc)" -- sh -c 'file "$@" | grep -v '\'': .*script'\'' | grep '\'': .*executable'\'' | tee /dev/stderr | sed '\''s/: .*//'\'' | xargs rm -fv'
|
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"
|
echo ">>>>>> Package vendor files"
|
||||||
rm -f "${ASAR_PKGDIR}/vendor.tar.zst"
|
rm -f "${ASAR_PKGDIR}/vendor.tar.zst"
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:b1756c31e8cd42257081b81726b1489a3923709e4cbf86f7d377fab3870b1e26
|
|
||||||
size 83884
|
|
3
v3.2.13.tar.gz
Normal file
3
v3.2.13.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:7ae3926ecbce6560d9f48948f18aee8ade7651f1ee319eb3e1538a1ffaa68ac8
|
||||||
|
size 50236
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:cb65f1c689dc7f1915c21590c44e95fb9d573e752c35026277e25bc0521a0a1b
|
oid sha256:868bba63e9833e2434238c004473e661597c93adbe1bc40d9c0cf1897808dd9c
|
||||||
size 79194
|
size 5366272
|
||||||
|
Loading…
x
Reference in New Issue
Block a user