Compare commits

...

No commits in common. 'epel9' and 'c10-beta' have entirely different histories.

15
.gitignore vendored

@ -1,14 +1 @@
*~
*.swp
__pycache__/
*.pyc
nodejs_req.py
test/*/package.json
test/*/nodejs.prov.err
test/*/nodejs.prov.out
test/*/nodejs.req.err
test/*/nodejs.req.out
*.rpm
.build-*.log
noarch/
/test.tar.gz
SOURCES/test.tar.gz

@ -0,0 +1 @@
dfaa3308397a75e566baec53cc32e6a635eca1e9 SOURCES/test.tar.gz

@ -1,218 +0,0 @@
# How to update Node.js in Fedora
## Determine the Node.js version
Monitor the [Node.js Blog](https://nodejs.org/en/blog/) to be notified of
available updates.
For simplicity and copy-and-paste of instructions below, set some variables
here:
```
NODEJS_MAJOR=12
NODEJS_VERSION=12.9.0
```
## Clone the Fedora package repository
These steps assume that you are a comaintainer of Node.js or a provenpackager
in Fedora.
```
fedpkg clone nodejs nodejs-fedora
```
Next, switch to the major version branch you are going to update. We'll use
Node.js 12.9.0 in this document. Adjust the versions appropriately for the
version you are working on.
```
pushd nodejs-fedora
fedpkg switch-branch $NODEJS_MAJOR
popd
```
## Clone the Fedora Module repository
```
fedpkg clone modules/nodejs nodejs-fedora-module
```
## Clone the upstream Node.js repository
```
git clone -o upstream git://github.com/nodejs/node.git nodejs-upstream
```
## Rebase the Fedora patches atop the latest release
```
pushd nodejs-upstream
git checkout -b fedora-v$NODEJS_VERSION v$NODEJS_VERSION
git am -3 ../nodejs-fedora/*.patch
```
If the patches do not apply cleanly, resolve the merges appropriately. Once
they have all been applied, output them again:
```
git format-patch -M --patience --full-index -o ../nodejs-fedora v$NODEJS_VERSION..HEAD
popd
```
## Update the Node.js tarball and specfile
```
pushd nodejs-fedora
./nodejs-tarball.sh $NODEJS_VERSION
```
Note that this command will also output all of the versions for the software
bundled with Node.js. You will need to edit `nodejs.spec` and update the
%global values near the top of that file to include the appropriate values
matching the dependencies. Make sure to also update the Node.js versions too!
Note that if libuv is updated, you need to ensure that the libuv in each
buildroot is of a sufficient version. If not, you may need to update that
package first and submit a buildroot override.
Update the RPM spec %changelog appropriately.
## (Preferred) Perform a scratch-build on at least one architecture
```
fedpkg scratch-build [--arch x86_64] --srpm
```
Verify that it built successfully.
## Push the changes up to Fedora
```
fedpkg commit -cs
fedpkg push
popd
```
## (Optional) Build for Fedora releases
If this major version is the default for one or more Fedora releases, build it
for them. (Note: this step will go away in the future, once module default
streams are available in the non-modular buildroot.)
In the case of Node.js 12.x, this is the default version for Fedora 31 and 32.
```
pushd nodejs-fedora
fedpkg switch-branch [master|31]
git merge $NODEJS_MAJOR
fedpkg push
fedpkg build
popd
```
## Build module stream
```
pushd nodejs-fedora-module
fedpkg switch-branch $NODEJS_MAJOR
```
If the module has changed any package dependencies (such as added a dep on a
new shared library), you may need to modify nodejs.yaml here. If not, you can
simply run:
```
git commit --allow-empty -sm "Update to $NODEJS_VERSION"
fedpkg push
fedpkg module-build
popd
```
## Submit built packages to Bodhi
Follow the usual processes for stable/branched releases to submit builds for
testing.
# How to bundle nodejs libraries in Fedora
The upstream Node.js stance on
[global library packages](https://nodejs.org/en/blog/npm/npm-1-0-global-vs-local-installation/)
is that they are ".. best avoided if not needed." In Fedora, we take the same
stance with our nodejs packages. You can provide a package that uses nodejs,
but you should bundle all the nodejs libraries that are needed.
We are providing a sample spec file and bundling script here.
For more detailed packaging information go to the
[Fedora Node.js Packaging Guildelines](https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/)
## Bundling Script
```
nodejs-packaging-bundler <npm_name> [version]
```
nodejs-packaging-bundler is it's own package, nodejs-packaging-bundler and must be installed before use.
nodejs-packaging-bundler gets the latest npm version available, if no version is given.
It produces four files and puts them in ${HOME}/rpmbuild/SOURCES
* <npm_name>-<version>.tgz - This is the tarball from npm.org
* <npm_name>-<version>-nm-prod.tgz - This is the tarball that contains all the bundled nodejs modules <npm_name> needs to run
* <npm_name>-<version>-nm-dev.tgz - This is the tarball that contains all the bundled nodejs modules <npm_name> needs to test
* <npm_name>-<version>-bundled-licenses.txt - This lists the bundled licenses in <npm_name>-<version>-nm-prod.tgz
## Sample Spec File
```
%global npm_name my_nodejs_application
...
License: <license1> and <license2> and <license3>
...
Source0: http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
Source1: %{npm_name}-%{version}-nm-prod.tgz
Source2: %{npm_name}-%{version}-nm-dev.tgz
Source3: %{npm_name}-%{version}-bundled-licenses.txt
...
BuildRequires: nodejs-devel
...
%prep
%setup -q -n package
cp %{SOURCE3} .
...
%build
# Setup bundled node modules
tar xfz %{SOURCE1}
mkdir -p node_modules
pushd node_modules
ln -s ../node_modules_prod/* .
ln -s ../node_modules_prod/.bin .
popd
...
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pr index.js lib package.json %{buildroot}%{nodejs_sitelib}/%{npm_name}
# Copy over bundled nodejs modules
cp -pr node_modules node_modules_prod %{buildroot}%{nodejs_sitelib}/%{npm_name}
...
%check
%nodejs_symlink_deps --check
# Setup bundled dev node_modules for testing
tar xfz %{SOURCE2}
pushd node_modules
ln -s ../node_modules_dev/* .
popd
pushd node_modules/.bin
ln -s ../../node_modules_dev/.bin/* .
popd
# Example test run using the binary in ./node_modules/.bin/
./node_modules/.bin/vows --spec --isolate
...
%files
%doc HISTORY.md
%license LICENSE.md %{npm_name}-%{version}-bundled-licenses.txt
%{nodejs_sitelib}/%{npm_name}
```

@ -0,0 +1,79 @@
# How to bundle nodejs libraries in Fedora
The upstream Node.js stance on
[global library packages](https://nodejs.org/en/blog/npm/npm-1-0-global-vs-local-installation/)
is that they are ".. best avoided if not needed." In Fedora, we take the same
stance with our nodejs packages. You can provide a package that uses nodejs,
but you should bundle all the nodejs libraries that are needed.
We are providing a sample spec file and bundling script here.
For more detailed packaging information go to the
[Fedora Node.js Packaging Guildelines](https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/)
## Bundling Script
```
nodejs-packaging-bundler <npm_name> [version] [tarball]
```
nodejs-packaging-bundler is it's own package, nodejs-packaging-bundler and must be installed before use.
nodejs-packaging-bundler gets the latest npm version available, if no version is given, or uses the existing tarball if one is given. Using npm is preferred for to ease reproducibility. If a local tarball is required (e.g. because the package is missing from npm or its version is too old), please ensure to document how the tarball was created.
It produces four files and puts them in ${HOME}/rpmbuild/SOURCES
* <npm_name>-<version>.tgz - This is the tarball from npm.org
* <npm_name>-<version>-nm-prod.tgz - This is the tarball that contains all the bundled nodejs modules <npm_name> needs to run
* <npm_name>-<version>-nm-dev.tgz - This is the tarball that contains all the bundled nodejs modules <npm_name> needs to test
* <npm_name>-<version>-bundled-licenses.txt - This lists the bundled licenses in <npm_name>-<version>-nm-prod.tgz
## Sample Spec File
```
%global npm_name my_nodejs_application
...
License: <license1> and <license2> and <license3>
...
Source0: http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
Source1: %{npm_name}-%{version}-nm-prod.tgz
Source2: %{npm_name}-%{version}-nm-dev.tgz
Source3: %{npm_name}-%{version}-bundled-licenses.txt
...
BuildRequires: nodejs-devel
...
%prep
%setup -q -n package
cp %{SOURCE3} .
...
%build
# Setup bundled node modules
tar xfz %{SOURCE1}
mkdir -p node_modules
pushd node_modules
ln -s ../node_modules_prod/* .
ln -s ../node_modules_prod/.bin .
popd
...
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pr index.js lib package.json %{buildroot}%{nodejs_sitelib}/%{npm_name}
# Copy over bundled nodejs modules
cp -pr node_modules node_modules_prod %{buildroot}%{nodejs_sitelib}/%{npm_name}
...
%check
%nodejs_symlink_deps --check
# Setup bundled dev node_modules for testing
tar xfz %{SOURCE2}
pushd node_modules
ln -s ../node_modules_dev/* .
popd
pushd node_modules/.bin
ln -s ../../node_modules_dev/.bin/* .
popd
# Example test run using the binary in ./node_modules/.bin/
./node_modules/.bin/vows --spec --isolate
...
%files
%doc HISTORY.md
%license LICENSE.md %{npm_name}-%{version}-bundled-licenses.txt
%{nodejs_sitelib}/%{npm_name}
```

@ -1,16 +1,17 @@
# nodejs binary
%__nodejs %{_bindir}/node
# currently installed nodejs version
%nodejs_version %(%{__nodejs} -v | sed s/v//)
%_nodejs_major_version %(echo %{nodejs_version} | sed 's#^\\([0-9]\\+\\).*#\\1#')
# nodejs library directory
%nodejs_sitelib %{_prefix}/lib/node_modules
%nodejs_sitelib %{_prefix}/lib/node_modules_%{_nodejs_major_version}
#arch specific library directory
#for future-proofing only; we don't do multilib
%nodejs_sitearch %{nodejs_sitelib}
# currently installed nodejs version
%nodejs_version %(%{__nodejs} -v | sed s/v//)
# symlink dependencies so `npm link` works
# this should be run in every module's %%install section
# pass --check to work in the current directory instead of the buildroot

@ -2,13 +2,14 @@
OUTPUT_DIR="$(rpm -E '%{_sourcedir}')"
usage() {
echo "Usage `basename $0` <npm_name> [version] " >&2
echo "Usage `basename $0` <npm_name> [version] [tarball]" >&2
echo >&2
echo " Given a npm module name, and optionally a version," >&2
echo " download the npm, the prod and dev dependencies," >&2
echo " each in their own tarball." >&2
echo " Also finds licenses prod dependencies." >&2
echo " All three tarballs and the license list are copied to ${OUTPUT_DIR}" >&2
echo " If a tarball is passed, use that instead of downloading from npm" >&2
echo >&2
exit 1
}
@ -38,6 +39,9 @@ fi
if [ $# -ge 2 ]; then
VERSION="$2"
if [ $# -ge 3 ]; then
TARBALL="$(realpath "$3")"
fi
else
VERSION="$(npm view ${PACKAGE} version)"
fi
@ -47,11 +51,23 @@ TMP_DIR=$(mktemp -d -t ci-XXXXXXXXXX)
mkdir -p ${OUTPUT_DIR}
mkdir -p ${TMP_DIR}
pushd ${TMP_DIR}
if [ -f "$TARBALL" ]; then
TARBALL_DIR=$(mktemp -d -t ci-XXXXXXXXXX)
pushd ${TARBALL_DIR}
tar xfz ${TARBALL} --strip-components 1
npm pack .
popd > /dev/null
mv ${TARBALL_DIR}/*.tgz .
rm -rf ${TARBALL_DIR}
else
npm pack ${PACKAGE}
fi
tar xfz *.tgz
cd package
for packagejson in $(find . -type d -name node_modules\* -prune -o -type f -name package.json -print); do
pushd $(dirname $packagejson)
echo " Downloading prod dependencies"
npm install --no-optional --only=prod
npm install --omit=dev --omit=optional
if [ $? -ge 1 ] ; then
echo " ERROR WILL ROBINSON"
rm -rf node_modules
@ -59,6 +75,9 @@ else
echo " Successful prod dependencies download"
mv node_modules/ node_modules_prod
fi
popd
done
echo "LICENSES IN BUNDLE:"
find . -name "package.json" -exec jq '.license | strings' {} \; >> ${TMP_DIR}/${PACKAGE_SAFE}-${VERSION}-bundled-licenses.txt
find . -name "package.json" -exec jq '.license | objects | .type' {} \; >> ${TMP_DIR}/${PACKAGE_SAFE}-${VERSION}-bundled-licenses.txt 2>/dev/null
@ -75,19 +94,23 @@ if [ -s ${TMP_DIR}/nolicense.txt ]; then
fi
for packagejson in $(find . -type d -name node_modules\* -prune -o -type f -name package.json -print); do
pushd $(dirname $packagejson)
echo " Downloading dev dependencies"
npm install --no-optional --only=dev
npm install --omit=optional
if [ $? -ge 1 ] ; then
echo " ERROR WILL ROBINSON"
else
echo " Successful dev dependencies download"
mv node_modules/ node_modules_dev
fi
popd
done
if [ -d node_modules_prod ] ; then
tar cfz ../${PACKAGE_SAFE}-${VERSION}-nm-prod.tgz node_modules_prod
tar cfz ../${PACKAGE_SAFE}-${VERSION}-nm-prod.tgz $(find . -type d -name node_modules_prod)
fi
if [ -d node_modules_dev ] ; then
tar cfz ../${PACKAGE_SAFE}-${VERSION}-nm-dev.tgz node_modules_dev
tar cfz ../${PACKAGE_SAFE}-${VERSION}-nm-dev.tgz $(find . -type d -name node_modules_dev)
fi
cd ..
cp -v ${PACKAGE_SAFE}-${VERSION}* "${OUTPUT_DIR}"

@ -1,4 +1,4 @@
%__nodejs_provides %{_rpmconfigdir}/nodejs.prov
%__nodejs_requires %{_rpmconfigdir}/nodejs.req
%__nodejs_suggests %{_rpmconfigdir}/nodejs.req --optional
%__nodejs_path ^/usr/lib(64)?/node_modules/[^/]+/package\\.json$
%__nodejs_path ^/usr/lib/node_modules\(_[[:digit:]]\+\)\{0,1\}/[^/]\+/package\.json$

@ -93,9 +93,9 @@ def generate_dependencies(module_path, module_dir_set=NODE_MODULES):
else: # Invalid metadata path
raise ValueError("Invalid module path '%s'" % module_path)
for dir_path, subdir_list, __ in os.walk(root_dir):
# Currently in node_modules (or similar), continue to subdirs
if os.path.basename(dir_path) in module_dir_set:
for dir_path, subdir_list, file_list in os.walk(root_dir):
# We are only interested in directories that contain package.json
if "package.json" not in file_list:
continue
# Read and format metadata

@ -0,0 +1,2 @@
%__nodejs_native_requires %{_rpmconfigdir}/nodejs_abi.req
%__nodejs_native_path ^/usr/lib.*/node_modules/.*\\.node$

@ -0,0 +1,8 @@
#!/bin/bash
# Get the ABI version
abi_version=$(/usr/bin/node -p process.versions.modules)
# Write out the Virtual Requires
echo "nodejs(abi) = ${abi_version}"

@ -1,8 +1,18 @@
## START: Set by rpmautospec
## (rpmautospec version 0.6.1)
## RPMAUTOSPEC: autorelease
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 5;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
Name: nodejs-packaging
Version: 2021.06
Release: 3%{?dist}
Version: 2023.10
Release: %autorelease
Summary: RPM Macros and Utilities for Node.js Packaging
BuildArch: noarch
License: MIT
@ -19,13 +29,19 @@ Source0007: nodejs-symlink-deps
Source0008: nodejs.attr
Source0009: nodejs.prov
Source0010: nodejs.req
Source0011: nodejs-packaging-bundler
Source0011: nodejs_abi.attr
Source0012: nodejs_abi.req
Source0111: nodejs-packaging-bundler
# Created with `tar cfz test.tar.gz test`
Source0101: test.tar.gz
BuildRequires: python3
# Several of the macros require the /usr/bin/node command, so we need to
# ensure that it is present when packaging.
Requires: /usr/bin/node
Requires: redhat-rpm-config
%description
@ -59,8 +75,10 @@ popd
%install
install -Dpm0644 macros.nodejs %{buildroot}%{macrosdir}/macros.nodejs
install -Dpm0644 nodejs.attr %{buildroot}%{_rpmconfigdir}/fileattrs/nodejs.attr
install -Dpm0644 nodejs_abi.attr %{buildroot}%{_rpmconfigdir}/fileattrs/nodejs_abi.attr
install -pm0755 nodejs.prov %{buildroot}%{_rpmconfigdir}/nodejs.prov
install -pm0755 nodejs.req %{buildroot}%{_rpmconfigdir}/nodejs.req
install -pm0755 nodejs_abi.req %{buildroot}%{_rpmconfigdir}/nodejs_abi.req
install -pm0755 nodejs-symlink-deps %{buildroot}%{_rpmconfigdir}/nodejs-symlink-deps
install -pm0755 nodejs-fixdep %{buildroot}%{_rpmconfigdir}/nodejs-fixdep
install -pm0755 nodejs-setversion %{buildroot}%{_rpmconfigdir}/nodejs-setversion
@ -84,6 +102,25 @@ install -Dpm0755 nodejs-packaging-bundler %{buildroot}%{_bindir}/nodejs-packagin
%changelog
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2022.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Oct 20 2022 Stephen Gallagher <sgallagh@redhat.com> - 2022.10-1
- Move native module building tools here from Node.js
- Add `Requires: /usr/bin/node`
* Tue Oct 18 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 2021.06-7
- NPM bundler: recursively bundle modules for all packages found
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2021.06-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sun May 01 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 2021.06-5
- NPM bundler: optionally use a local tarball instead of npm
* Thu Jan 20 2022 Stephen Gallagher <sgallagh@redhat.com> - 2021.06-4
- NPM bundler: also find namespaced bundled dependencies
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2021.06-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

@ -1 +0,0 @@
SHA512 (test.tar.gz) = dfbda67b8741f1ca36bf63b2e842f81ba07381b3d92e75fa7e29f8e456543b4cae55e95785902f31a14ae4d0b7e89161ba04c0c10c2fff617b4ae9607c91e599

@ -1,4 +0,0 @@
{
"name": "test100",
"version": "1.3.5"
}

@ -1,4 +0,0 @@
{
"name": "test101",
"version": "2.1.4"
}

@ -1,3 +0,0 @@
bundled(nodejs-test100) = 1.3.5
bundled(nodejs-test101) = 2.1.4
npm(test) = 4.5.6

@ -1,11 +0,0 @@
{
"name": "test",
"version": "4.5.6",
"engines": {
"node": ">=6 <10"
},
"dependencies": {
"test100": "^1.2.3",
"test101": ">=2.1"
}
}

@ -1,18 +0,0 @@
#!/bin/sh
ln -sf nodejs.req nodejs_req.py
"$(command -v python2 || echo :)" -m doctest nodejs_req.py || exit 1
"$(command -v python3 || echo :)" -m doctest nodejs_req.py || exit 1
for test in unbundled bundled
do
sed -e "s|//.*$||" < test/$test/package.json.in > test/$test/package.json
echo test/$test/package.json | ./nodejs.prov test/$test/package.json > test/$test/nodejs.prov.out 2> test/$test/nodejs.prov.err
diff -uw test/$test/nodejs.prov.err.exp test/$test/nodejs.prov.err || exit 1
diff -uw test/$test/nodejs.prov.out.exp test/$test/nodejs.prov.out || exit 1
echo test/$test/package.json | ./nodejs.req test/$test/package.json > test/$test/nodejs.req.out 2> test/$test/nodejs.req.err
diff -uw test/$test/nodejs.req.err.exp test/$test/nodejs.req.err || exit 1
diff -uw test/$test/nodejs.req.out.exp test/$test/nodejs.req.out || exit 1
done

@ -1,2 +0,0 @@
WARNING: The npm(test900) dependency contains an OR (||) dependency: '^1.2 || ^2.2.
Please manually include a versioned dependency in your spec file if necessary

@ -1,74 +0,0 @@
(nodejs(engine) >= 6 with nodejs(engine) < 10)
(npm(test100) >= 1 with npm(test100) < 2)
(npm(test101) >= 1 with npm(test101) < 2)
(npm(test102) >= 1 with npm(test102) < 2)
(npm(test103) >= 1 with npm(test103) < 2)
(npm(test104) >= 1.2 with npm(test104) < 1.3)
(npm(test105) >= 1.2 with npm(test105) < 1.3)
(npm(test106) >= 1.2 with npm(test106) < 1.3)
(npm(test107) >= 1.2 with npm(test107) < 1.3)
(npm(test108) >= 1.2.3 with npm(test108) < 1.2.4)
(npm(test109) >= 1.2.3 with npm(test109) < 1.2.4)
(npm(test110) >= 1.2.3 with npm(test110) < 1.2.4)
(npm(test111) >= 1.2.3 with npm(test111) < 1.2.4)
npm(test200) > 1
npm(test201) > 1.2
npm(test202) > 1.2.3
npm(test203) >= 1
npm(test204) >= 1.2
npm(test205) >= 1.2.3
npm(test206) < 2
npm(test207) < 2.3
npm(test208) < 2.3.4
npm(test209) <= 2
npm(test210) <= 2.3
npm(test211) <= 2.3.4
(npm(test300) > 1 with npm(test300) < 2)
(npm(test301) > 1.2 with npm(test301) < 2.3)
(npm(test302) > 1.2.3 with npm(test302) < 2.3.4)
(npm(test303) >= 1 with npm(test303) <= 2)
(npm(test304) >= 1.2 with npm(test304) <= 2.3)
(npm(test305) >= 1.2.3 with npm(test305) <= 2.3.4)
(npm(test306) > 1 with npm(test306) < 2)
(npm(test307) > 1.2 with npm(test307) < 2.3)
(npm(test308) > 1.2.3 with npm(test308) < 2.3.4)
(npm(test309) >= 1 with npm(test309) <= 2)
(npm(test310) >= 1.2 with npm(test310) <= 2.3)
(npm(test311) >= 1.2.3 with npm(test311) <= 2.3.4)
(npm(test400) >= 1.2.3 with npm(test400) <= 2.3.4)
(npm(test401) >= 1.2.3 with npm(test401) < 2.4)
(npm(test402) >= 1.2.3 with npm(test402) < 3)
(npm(test403) >= 1.2 with npm(test403) <= 2.3.4)
(npm(test404) >= 1 with npm(test404) <= 2.3.4)
(npm(test405) >= 1.2 with npm(test405) < 2.4)
(npm(test406) >= 1.2 with npm(test406) < 3)
(npm(test407) >= 1 with npm(test407) < 2.4)
(npm(test408) >= 1 with npm(test408) < 3)
(npm(test500) >= 1.2 with npm(test500) < 1.3)
(npm(test501) >= 1.2 with npm(test501) < 1.3)
(npm(test502) >= 1 with npm(test502) < 2)
(npm(test503) >= 1 with npm(test503) < 2)
npm(test504)
npm(test505)
(npm(test600) >= 1.2.3 with npm(test600) < 1.3)
(npm(test601) >= 1.2 with npm(test601) < 1.3)
(npm(test602) >= 1.2 with npm(test602) < 1.3)
(npm(test603) >= 1 with npm(test603) < 2)
(npm(test604) >= 1 with npm(test604) < 2)
(npm(test700) >= 1.2.3 with npm(test700) < 2)
(npm(test701) >= 0.2.3 with npm(test701) < 0.3)
(npm(test702) >= 0.0.3 with npm(test702) < 0.0.4)
(npm(test703) >= 1.2 with npm(test703) < 2)
(npm(test704) >= 1.2 with npm(test704) < 2)
(npm(test705) >= 0.1 with npm(test705) < 0.2)
(npm(test706) >= 0.1 with npm(test706) < 0.2)
(npm(test707) >= 1 with npm(test707) < 2)
(npm(test708) >= 1 with npm(test708) < 2)
npm(test709) < 0.1
npm(test710) < 0.1
npm(test711) < 1
npm(test712) < 1
npm(test750) >= 0.10
(npm(test751) >= 0.10 with npm(test751) <= 6)
(npm(test800) > 1.2 with npm(test800) < 1.9)
npm(test900)

@ -1,108 +0,0 @@
{
"name": "test",
"version": "4.5.6",
"engines": {
"node": ">=6 <10"
},
"dependencies": {
// Single version
"test100": "1",
"test101": "=1",
"test102": "v1",
"test103": "=v1",
"test104": "1.2",
"test105": "=1.2",
"test106": "v1.2",
"test107": "=v1.2",
"test108": "1.2.3",
"test109": "=1.2.3",
"test110": "v1.2.3",
"test111": "=v1.2.3",
// Ranges with one comparator
"test200": ">1",
"test201": ">1.2",
"test202": ">1.2.3",
"test203": ">=1",
"test204": ">=1.2",
"test205": ">=1.2.3",
"test206": "<2",
"test207": "<2.3",
"test208": "<2.3.4",
"test209": "<=2",
"test210": "<=2.3",
"test211": "<=2.3.4",
// Ranges with two comparators
"test300": ">1 <2",
"test301": ">1.2 <2.3",
"test302": ">1.2.3 <2.3.4",
"test303": ">=1 <=2",
"test304": ">=1.2 <=2.3",
"test305": ">=1.2.3 <=2.3.4",
"test306": "<2 >1",
"test307": "<2.3 >1.2",
"test308": "<2.3.4 >1.2.3",
"test309": "<=2 >=1",
"test310": "<=2.3 >=1.2",
"test311": "<=2.3.4 >=1.2.3",
// Hyphen ranges
"test400": "1.2.3 - 2.3.4",
"test401": "1.2.3 - 2.3",
"test402": "1.2.3 - 2",
"test403": "1.2 - 2.3.4",
"test404": "1 - 2.3.4",
"test405": "1.2 - 2.3",
"test406": "1.2 - 2",
"test407": "1 - 2.3",
"test408": "1 - 2",
// X-Ranges
"test500": "1.2.x",
"test501": "1.2.*",
"test502": "1.x",
"test503": "1.*",
"test504": "*",
"test505": "",
// Tilde ranges
"test600": "~1.2.3",
"test601": "~1.2.x",
"test602": "~1.2",
"test603": "~1.x",
"test604": "~1",
// Caret ranges
"test700": "^1.2.3",
"test701": "^0.2.3",
"test702": "^0.0.3",
"test703": "^1.2.x",
"test704": "^1.2",
"test705": "^0.1.x",
"test706": "^0.1",
"test707": "^1.x",
"test708": "^1",
"test709": "^0.0.x",
"test710": "^0.0",
"test711": "^0.x",
"test712": "^0",
// Space after the operator
// (the grammar does not permit this, but it is accepted in practice)
"test750": ">= 0.10",
"test751": ">= 0.10 <= 6",
// More than two comparators in a set
// (no reason for this to ever appear, but it is permitted)
"test800": ">1.2 <2.0 <1.9",
// The following cases are not implemented currently...
// Multiple comparator sets separated by ||
"test900": "^1.2 || ^2.2"
// The whole pre-release stuff: https://docs.npmjs.com/misc/semver//prerelease-tags
// which is not even enumerated here because it is so complex.
}
}
Loading…
Cancel
Save