Date: Sunday, November 27, 2022 @ 16:03:38
Author: yan12125
Revision: 1354114
archrelease: copy trunk to community-any
Added:
web-ext/repos/community-any/PKGBUILD
(from rev 1354113, web-ext/trunk/PKGBUILD)
web-ext/repos/community-any/nodejs19.diff
(from rev 1354113, web-ext/trunk/nodejs19.diff)
Deleted:
web-ext/repos/community-any/PKGBUILD
---------------+
PKGBUILD | 126 +++++++++++++++++++++++++++++---------------------------
nodejs19.diff | 26 +++++++++++
2 files changed, 93 insertions(+), 59 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-11-27 16:03:02 UTC (rev 1354113)
+++ PKGBUILD 2022-11-27 16:03:38 UTC (rev 1354114)
@@ -1,59 +0,0 @@
-# Maintainer: Chih-Hsuan Yen <[email protected]>
-
-pkgname=web-ext
-# https://github.com/mozilla/web-ext/releases
-pkgver=7.3.1
-pkgrel=1
-pkgdesc='A command line tool to help build, run, and test web extensions'
-arch=(any)
-url='https://developer.mozilla.org/en-US/Add-ons/WebExtensions'
-license=('MPL2')
-# See "engines" in https://github.com/mozilla/web-ext/blob/master/package.json
-depends=('nodejs>=14.0.0')
-makedepends=('npm' 'node-gyp')
-replaces=('nodejs-web-ext')
-provides=('nodejs-web-ext')
-conflicts=('nodejs-web-ext')
-# to speed up the build
-options=('!strip')
-# tarball on npmjs lacks scripts for building from sources
-source=("https://github.com/mozilla/web-ext/archive/$pkgver/web-ext-$pkgver.tar.gz")
-sha256sums=('d916163a4c4a9a2b7c7b42924eaf2b221d902825171d0b0af441d64de9796f24')
-
-prepare() {
- cd "$srcdir"
-
- # -build for running webpack and tests, and the original for actual packaging
- cp -r $pkgname-$pkgver{,-build}
-}
-
-build() {
- cd "$srcdir/$pkgname-$pkgver-build"
-
- npm install
- NODE_ENV=production npm run build
- cp -r lib "$srcdir/$pkgname-$pkgver"
-
- cd "$srcdir/$pkgname-$pkgver"
- npm install --production
-}
-
-check() {
- cd "$srcdir/$pkgname-$pkgver-build"
-
- # web-ext uses flow-bin, which does not support some architectures (e.g.,
RISC-V)
- CI_SKIP_FLOWCHECK=y npm test
-}
-
-package() {
- local _npmdir="$pkgdir/usr/lib/node_modules/"
-
- install -Ddm755 "$_npmdir"
- cp -r --no-preserve=ownership $pkgname-$pkgver "$_npmdir/$pkgname"
-
- # dtrace-provider (brought in by bunyan) is not used on Linux, and its build
artifacts makes this package unreproducible
- rm -rv "$_npmdir"/web-ext/node_modules/dtrace-provider/build/
-
- install -Ddm755 "$pkgdir/usr/bin"
- ln -s "/usr/lib/node_modules/$pkgname/bin/$pkgname.js"
"$pkgdir/usr/bin/$pkgname"
-}
Copied: web-ext/repos/community-any/PKGBUILD (from rev 1354113,
web-ext/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-11-27 16:03:38 UTC (rev 1354114)
@@ -0,0 +1,67 @@
+# Maintainer: Chih-Hsuan Yen <[email protected]>
+
+pkgname=web-ext
+# https://github.com/mozilla/web-ext/releases
+pkgver=7.4.0
+pkgrel=1
+pkgdesc='A command line tool to help build, run, and test web extensions'
+arch=(any)
+url='https://developer.mozilla.org/en-US/Add-ons/WebExtensions'
+license=('MPL2')
+# See "engines" in https://github.com/mozilla/web-ext/blob/master/package.json
+depends=('nodejs>=14.0.0')
+makedepends=('npm' 'node-gyp')
+replaces=('nodejs-web-ext')
+provides=('nodejs-web-ext')
+conflicts=('nodejs-web-ext')
+# to speed up the build
+options=('!strip')
+# tarball on npmjs lacks scripts for building from sources
+source=("https://github.com/mozilla/web-ext/archive/$pkgver/web-ext-$pkgver.tar.gz"
+ "nodejs19.diff")
+sha256sums=('915e9b2175094634c666a3ee85e454e60a57e438e647f898ef47c87db8d8fccc'
+ '9475a50851a8442dd8edad55f5b678923808396eedfae45dd29a960cc0646529')
+
+prepare() {
+ cd "$srcdir"
+
+ # Make tests pass with Node.js 19
https://github.com/mozilla/web-ext/issues/2564
+ pushd $pkgname-$pkgver
+ patch -Np1 -i ../nodejs19.diff
+ popd
+
+ # -build for running webpack and tests, and the original for actual packaging
+ cp -r $pkgname-$pkgver{,-build}
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver-build"
+
+ npm install
+ NODE_ENV=production npm run build
+ cp -r lib "$srcdir/$pkgname-$pkgver"
+
+ cd "$srcdir/$pkgname-$pkgver"
+ npm install --production
+}
+
+check() {
+ cd "$srcdir/$pkgname-$pkgver-build"
+
+ # web-ext uses flow-bin, which does not support some architectures (e.g.,
RISC-V)
+ # Some tests match error messages and fail if messages are translated
+ LANG=C.UTF-8 CI_SKIP_FLOWCHECK=y npm test
+}
+
+package() {
+ local _npmdir="$pkgdir/usr/lib/node_modules/"
+
+ install -Ddm755 "$_npmdir"
+ cp -r --no-preserve=ownership $pkgname-$pkgver "$_npmdir/$pkgname"
+
+ # dtrace-provider (brought in by bunyan) is not used on Linux, and its build
artifacts makes this package unreproducible
+ rm -rv "$_npmdir"/web-ext/node_modules/dtrace-provider/build/
+
+ install -Ddm755 "$pkgdir/usr/bin"
+ ln -s "/usr/lib/node_modules/$pkgname/bin/$pkgname.js"
"$pkgdir/usr/bin/$pkgname"
+}
Copied: web-ext/repos/community-any/nodejs19.diff (from rev 1354113,
web-ext/trunk/nodejs19.diff)
===================================================================
--- nodejs19.diff (rev 0)
+++ nodejs19.diff 2022-11-27 16:03:38 UTC (rev 1354114)
@@ -0,0 +1,26 @@
+diff --git a/tests/unit/test-cmd/test.build.js
b/tests/unit/test-cmd/test.build.js
+index 9a63278..97e1295 100644
+--- a/tests/unit/test-cmd/test.build.js
++++ b/tests/unit/test-cmd/test.build.js
+@@ -269,7 +269,7 @@ describe('build', () => {
+ assert.instanceOf(error, UsageError);
+ assert.match(
+ error.message,
+- /Unexpected string in JSON at position 14/
++ /Expected ':' after property name in JSON at position 14/
+ );
+ assert.match(error.message, /^Error parsing messages\.json/);
+ assert.include(error.message, messageFileName);
+diff --git a/tests/unit/test-util/test.manifest.js
b/tests/unit/test-util/test.manifest.js
+index 7e9e17a..5fc665e 100644
+--- a/tests/unit/test-util/test.manifest.js
++++ b/tests/unit/test-util/test.manifest.js
+@@ -70,7 +70,7 @@ describe('util/manifest', () => {
+ );
+ assert.include(
+ error.message,
+- 'Unexpected token "," (0x2C) in JSON at position 51'
++ 'Expected double-quoted property name in JSON at position 51'
+ );
+ assert.include(error.message, manifestFile);
+ })