mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-10 02:21:15 +02:00
updated npm yarn
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# $FreeBSD: head/www/npm/Makefile 454516 2017-11-20 04:30:31Z sunpoet $
|
||||
|
||||
PORTNAME= npm
|
||||
PORTVERSION= 6.14.8
|
||||
PORTVERSION= 8.19.1
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= LOCAL/sunpoet
|
||||
|
||||
@@ -10,27 +10,35 @@ MAINTAINER= sunpoet@FreeBSD.org
|
||||
COMMENT= Node package manager
|
||||
|
||||
RUN_DEPENDS= gmake:devel/gmake
|
||||
RUN_DEPENDS+= node>=8:lang/node14
|
||||
RUN_DEPENDS+= node>=8:lang/node16
|
||||
|
||||
NO_ARCH= yes
|
||||
NO_BUILD= yes
|
||||
REINPLACE_ARGS= -i ''
|
||||
USES= python:2.7,run shebangfix tar:xz
|
||||
SHEBANG_GLOB= *.py
|
||||
SHEBANG_FILES= lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples
|
||||
#SHEBANG_GLOB= *.py
|
||||
#SHEBANG_FILES= lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples
|
||||
|
||||
REINPLACE_ARGS= -i ''
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} == "i386"
|
||||
# Workaround for kernel bug 178881
|
||||
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-bug-178881
|
||||
.endif
|
||||
#.if ${ARCH} == "i386"
|
||||
## Workaround for kernel bug 178881
|
||||
#EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-bug-178881
|
||||
#.endif
|
||||
|
||||
post-patch:
|
||||
# ${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/etc/man.d/npm.conf
|
||||
# ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp
|
||||
# ${FIND} ${WRKSRC}/ -name '*.sh' -exec ${REINPLACE_CMD} -e '1 s|/usr/local|${LOCALBASE}|' {} +
|
||||
|
||||
${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/etc/man.d/npm.conf
|
||||
${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp
|
||||
${REINPLACE_CMD} -e 's|exec python |exec ${PYTHON_CMD} |' ${WRKSRC}/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp
|
||||
${FIND} ${WRKSRC}/ -name '*.sh' -exec ${REINPLACE_CMD} -e '1 s|/usr/local|${LOCALBASE}|' {} +
|
||||
|
||||
|
||||
do-install:
|
||||
cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1600606967
|
||||
SHA256 (npm-6.14.8.tar.xz) = 1c9beab15ef7c031b4d9d2261cbe7ab8af63bc1fee0a79623c9759072dbeea6b
|
||||
SIZE (npm-6.14.8.tar.xz) = 3369236
|
||||
TIMESTAMP = 1663942106
|
||||
SHA256 (npm-8.19.1.tar.xz) = 70199be3d5e517a47628a001dca6ecc811feaf62cb04564fd74e1c8bfc8e549a
|
||||
SIZE (npm-8.19.1.tar.xz) = 1683200
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--- lib/node_modules/npm/lib/config/defaults.js.orig 1985-10-26 08:15:00 UTC
|
||||
+++ lib/node_modules/npm/lib/config/defaults.js
|
||||
@@ -378,19 +378,7 @@ exports.types = {
|
||||
}
|
||||
|
||||
function getLocalAddresses () {
|
||||
- var interfaces
|
||||
- // #8094: some environments require elevated permissions to enumerate
|
||||
- // interfaces, and synchronously throw EPERM when run without
|
||||
- // elevated privileges
|
||||
- try {
|
||||
- interfaces = os.networkInterfaces()
|
||||
- } catch (e) {
|
||||
- interfaces = {}
|
||||
- }
|
||||
-
|
||||
- return Object.keys(interfaces).map(
|
||||
- nic => interfaces[nic].map(({address}) => address)
|
||||
- ).reduce((curr, next) => curr.concat(next), []).concat(undefined)
|
||||
+ return [ '127.0.0.1', undefined ]
|
||||
}
|
||||
|
||||
exports.shorthands = {
|
||||
11
devel/npm/files/patch-npm-run
Normal file
11
devel/npm/files/patch-npm-run
Normal file
@@ -0,0 +1,11 @@
|
||||
--- lib/node_modules/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js.orig 2022-08-27 11:30:45 UTC
|
||||
+++ lib/node_modules/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js
|
||||
@@ -67,7 +67,7 @@ const makeSpawnArgs = options => {
|
||||
}
|
||||
const spawnArgs = isCmd
|
||||
? ['/d', '/s', '/c', script]
|
||||
- : ['-c', '--', script]
|
||||
+ : ['-c', script]
|
||||
|
||||
const spawnOpts = {
|
||||
env: spawnEnv,
|
||||
5059
devel/npm/pkg-plist
5059
devel/npm/pkg-plist
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= yarn
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 1.22.4
|
||||
DISTVERSION= 1.22.18
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= https://yarnpkg.com/downloads/${PORTVERSION}/
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1601602979
|
||||
SHA256 (yarn-v1.22.4.tar.gz) = bc5316aa110b2f564a71a3d6e235be55b98714660870c5b6b2d2d3f12587fb58
|
||||
SIZE (yarn-v1.22.4.tar.gz) = 1244785
|
||||
TIMESTAMP = 1663942400
|
||||
SHA256 (yarn-v1.22.18.tar.gz) = 816e5c073b3d35936a398d1fe769ebbcd517298e3510b649e8fc67cd3a62e113
|
||||
SIZE (yarn-v1.22.18.tar.gz) = 1246681
|
||||
|
||||
80
devel/yarn/files/patch-lib_cli.js
Normal file
80
devel/yarn/files/patch-lib_cli.js
Normal file
@@ -0,0 +1,80 @@
|
||||
--- lib/cli.js.orig 2020-03-09 15:51:47 UTC
|
||||
+++ lib/cli.js
|
||||
@@ -56939,10 +56939,10 @@ function getRcConfigForFolder(cwd) {
|
||||
}
|
||||
|
||||
function loadRcFile(fileText, filePath) {
|
||||
- var _parse = (0, (_lockfile || _load_lockfile()).parse)(fileText, filePath),
|
||||
+ var _parse = (0, (_lockfile || _load_lockfile()).parse)(fileText, 'yarnrc'),
|
||||
values = _parse.object;
|
||||
|
||||
- if (filePath.match(/\.yml$/) && typeof values.yarnPath === 'string') {
|
||||
+ if (filePath.match(/\.yml$/)) {
|
||||
values = { 'yarn-path': values.yarnPath };
|
||||
}
|
||||
|
||||
@@ -64532,27 +64532,16 @@ function parse(str, fileLoc) {
|
||||
var parser = new Parser(str, fileLoc);
|
||||
parser.next();
|
||||
|
||||
- if (!fileLoc.endsWith(`.yml`)) {
|
||||
+ try {
|
||||
+ return parser.parse();
|
||||
+ } catch (error1) {
|
||||
try {
|
||||
- return parser.parse();
|
||||
- } catch (error1) {
|
||||
- try {
|
||||
- return safeLoad(str, {
|
||||
- schema: FAILSAFE_SCHEMA
|
||||
- });
|
||||
- } catch (error2) {
|
||||
- throw error1;
|
||||
- }
|
||||
+ return safeLoad(str, {
|
||||
+ schema: FAILSAFE_SCHEMA
|
||||
+ });
|
||||
+ } catch (error2) {
|
||||
+ throw error1;
|
||||
}
|
||||
- } else {
|
||||
- var result = safeLoad(str, {
|
||||
- schema: FAILSAFE_SCHEMA
|
||||
- });
|
||||
- if (typeof result === 'object') {
|
||||
- return result;
|
||||
- } else {
|
||||
- return {};
|
||||
- }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90319,7 +90308,7 @@ var _buildSubCommands = (0, (_buildSubCommands2 || _lo
|
||||
var rcPath = `${config.lockfileFolder}/.yarnrc.yml`;
|
||||
reporter.log(`Updating ${chalk.magenta(rcPath)}...`);
|
||||
|
||||
- yield (_fs || _load_fs()).writeFilePreservingEol(rcPath, `yarnPath: ${(0, (_stringify || _load_stringify()).default)(targetPath)}\n`);
|
||||
+ yield (_fs || _load_fs()).writeFilePreservingEol(rcPath, `yarnPath: ${(0, (_stringify || _load_stringify()).default)(yarnPath)}\n`);
|
||||
} else {
|
||||
var _rcPath = `${config.lockfileFolder}/.yarnrc`;
|
||||
reporter.log(`Updating ${chalk.magenta(_rcPath)}...`);
|
||||
@@ -101330,11 +101319,7 @@ function parseRcPaths(paths, parser) {
|
||||
try {
|
||||
return parser((0, (_fs || _load_fs()).readFileSync)(path).toString(), path);
|
||||
} catch (error) {
|
||||
- if (error.code === 'ENOENT' || error.code === 'EISDIR') {
|
||||
- return {};
|
||||
- } else {
|
||||
- throw error;
|
||||
- }
|
||||
+ return {};
|
||||
}
|
||||
})));
|
||||
}
|
||||
@@ -153406,4 +153391,4 @@ module.exports = require("dns");
|
||||
module.exports = require("domain");
|
||||
|
||||
/***/ })
|
||||
-/******/ ]);
|
||||
\ No newline at end of file
|
||||
+/******/ ]);
|
||||
@@ -4,9 +4,11 @@ lib/node_modules/yarn/bin/yarn
|
||||
lib/node_modules/yarn/bin/yarn.js
|
||||
lib/node_modules/yarn/bin/yarnpkg
|
||||
lib/node_modules/yarn/lib/cli.js
|
||||
lib/node_modules/yarn/lib/cli.js.orig
|
||||
lib/node_modules/yarn/lib/v8-compile-cache.js
|
||||
lib/node_modules/yarn/LICENSE
|
||||
lib/node_modules/yarn/package.json
|
||||
lib/node_modules/yarn/preinstall.js
|
||||
lib/node_modules/yarn/README.md
|
||||
@dir lib/node_modules/yarn/bin
|
||||
@dir lib/node_modules/yarn/lib
|
||||
|
||||
Reference in New Issue
Block a user