commit 4472b309602cf3cd676d90818fd5f79754320d9a73a6310d074034ff410b4ece Author: Adam Majer Date: Fri Feb 21 14:24:29 2025 +0000 - update to 1.1.0 * always run npm with --no-package-lock. This will fix all weird errors and no loger require cleaning package-lock.json from upstream * `quilt setup` script is now in the utility * everything is run in JS now, so you can run directly with node version of change. Either, local-npm-registry or node22 /usr/bin/local-npm-registry OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/local-npm-registry?expand=0&rev=15 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/local-npm-registry.changes b/local-npm-registry.changes new file mode 100644 index 0000000..3e38f7e --- /dev/null +++ b/local-npm-registry.changes @@ -0,0 +1,73 @@ +------------------------------------------------------------------- +Fri Feb 21 14:05:43 UTC 2025 - Adam Majer + +- update to 1.1.0 + * always run npm with --no-package-lock. This will fix all weird + errors and no loger require cleaning package-lock.json from + upstream + * `quilt setup` script is now in the utility + * everything is run in JS now, so you can run directly with + node version of change. Either, + local-npm-registry + or + node22 /usr/bin/local-npm-registry + +------------------------------------------------------------------- +Tue Jan 30 14:43:02 UTC 2024 - Adam Majer + +- update to 1.0.2 + * --help invocation fixes + * cleanup npm's config.registry on exit + * adds support for non-standard alternative versions + +------------------------------------------------------------------- +Fri Dec 29 11:02:40 UTC 2023 - Adam Majer + +- Escape `quilt setup` invoked section in the helper script + +------------------------------------------------------------------- +Fri Jul 21 12:59:44 UTC 2023 - Adam Majer 1.0.1 + +- update to 1.0.1 + * update dependencies + * no longer shows paths for tarballs served by the proxy + * works with latest nodejs + +- 0001-Allow-the-user-to-provide-their-own-npm-command-by-m.patch: + dropped, upstreamed + +------------------------------------------------------------------- +Tue Aug 16 16:43:23 UTC 2022 - Adam Majer + +- Revert Requires: back to npm-default. If we need support for + Fedora to have something else, we can do this another way + https://en.opensuse.org/openSUSE:Build_Service_prjconf#Substitute + +------------------------------------------------------------------- +Mon Aug 15 15:59:04 UTC 2022 - Bruno Pitrus +- Allow the user to override `node` and `npm` commands in PATH. + This is useful if one wants to eg. use Electron to run npm. + * add 0001-Allow-the-user-to-provide-their-own-npm-command-by-m.patch +- Change Requires: npm-default to Requires: npm. + npm-default is already prefered by the prjconf, + this works with any version of npm, + and Fedora does not have npm-default. + +------------------------------------------------------------------- +Wed Aug 11 17:06:14 UTC 2021 - Adam Majer + +- update to 0.0.3: + * fixes case when npm is stalling when package is not found + +------------------------------------------------------------------- +Tue Jan 26 14:43:10 UTC 2021 - Adam Majer + +- Update to 0.0.2: fixes uncaught exceptions +- work with quilt when unpacking archive + +------------------------------------------------------------------- +Mon Jan 18 16:16:21 UTC 2021 - Adam Majer + +- Initial version 0.0.1 + + diff --git a/local-npm-registry.spec b/local-npm-registry.spec new file mode 100644 index 0000000..4f085df --- /dev/null +++ b/local-npm-registry.spec @@ -0,0 +1,57 @@ +# +# spec file for package local-npm-registry +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: local-npm-registry +Version: 1.1.0 +Release: 0 +Summary: Localhost-only version of NPM registry +License: GPL-3.0-or-later +URL: https://github.com/openSUSE/npm-localhost-proxy +Source: https://github.com/openSUSE/npm-localhost-proxy/releases/download/v%{version}/local_npm_registry-v%{version}.tar.gz +Requires: npm-default +BuildArch: noarch + +%description +localhost-only npm registry serves NPM packages on localhost +address allowing running of "npm install" in a non-networked +environment + +%prep +%autosetup -p1 -n local_npm_registry-v%{version} + +%build +# nothing to build, or we end up in a build cycle of 1 + +%install +mkdir -p %{buildroot}%{_datadir}/%{name} +mkdir -p %{buildroot}%{_bindir} +cp -r dist node_modules %{buildroot}%{_datadir}/%{name} +cat > %{buildroot}%{_bindir}/local-npm-registry << EOF +#!/usr/bin/node +const foo = await import("%{_datadir}/%{name}/dist/index.js") +foo.mainEntryFunction() +EOF + +%files +%defattr(-,root,root) +%license COPYING +%doc README.md +%attr(755,root,root) %{_bindir}/local-npm-registry +%{_datadir}/%{name} + +%changelog diff --git a/local_npm_registry-v1.0.2.tar.gz b/local_npm_registry-v1.0.2.tar.gz new file mode 100644 index 0000000..6c8dd7e --- /dev/null +++ b/local_npm_registry-v1.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48057541d4c2d219826f724a168a00b0ee874fc0a4eb6bcfebceab4a5dc7ddba +size 94600 diff --git a/local_npm_registry-v1.1.0.tar.gz b/local_npm_registry-v1.1.0.tar.gz new file mode 100644 index 0000000..2e2dce0 --- /dev/null +++ b/local_npm_registry-v1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f006d14631354f1cac8d9ff103d0c884101c8c88fd2e839e0ea9caca27915c4f +size 94885