projen 0.50.2 → 0.50.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +157 -104
- package/API.md +48 -17
- package/changelog.md +1 -6
- package/lib/awscdk/auto-discover.js +1 -1
- package/lib/awscdk/awscdk-app-java.js +1 -1
- package/lib/awscdk/awscdk-app-ts.js +1 -1
- package/lib/awscdk/awscdk-construct.js +2 -2
- package/lib/awscdk/awscdk-deps-java.js +1 -1
- package/lib/awscdk/awscdk-deps-js.js +1 -1
- package/lib/awscdk/awscdk-deps.js +1 -1
- package/lib/awscdk/cdk-config.js +1 -1
- package/lib/awscdk/cdk-tasks.js +1 -1
- package/lib/awscdk/integration-test.js +1 -1
- package/lib/awscdk/lambda-function.js +2 -2
- package/lib/build/build-workflow.js +1 -1
- package/lib/cdk/construct-lib.js +1 -1
- package/lib/cdk/jsii-docgen.js +1 -1
- package/lib/cdk/jsii-project.js +1 -1
- package/lib/cdk8s/cdk8s-app-ts.js +1 -1
- package/lib/cdk8s/cdk8s-construct.js +1 -1
- package/lib/cdktf/cdktf-construct.js +1 -1
- package/lib/component.js +1 -1
- package/lib/dependencies.js +1 -1
- package/lib/dev-env.js +1 -1
- package/lib/docker-compose.js +2 -2
- package/lib/file.js +1 -1
- package/lib/gitattributes.js +1 -1
- package/lib/github/auto-approve.js +1 -1
- package/lib/github/auto-merge.js +1 -1
- package/lib/github/dependabot.js +1 -1
- package/lib/github/github-project.js +1 -1
- package/lib/github/github.js +1 -1
- package/lib/github/mergify.js +1 -1
- package/lib/github/pr-template.js +1 -1
- package/lib/github/pull-request-lint.js +1 -1
- package/lib/github/stale.js +1 -1
- package/lib/github/task-workflow.js +1 -1
- package/lib/github/workflows.js +1 -1
- package/lib/gitlab/configuration.js +1 -1
- package/lib/gitlab/gitlab-configuration.js +1 -1
- package/lib/gitlab/nested-configuration.d.ts +0 -7
- package/lib/gitlab/nested-configuration.js +2 -16
- package/lib/gitpod.js +1 -1
- package/lib/ignore-file.js +1 -1
- package/lib/ini.js +1 -1
- package/lib/java/java-project.js +1 -1
- package/lib/java/junit.js +1 -1
- package/lib/java/maven-compile.js +1 -1
- package/lib/java/maven-packaging.js +1 -1
- package/lib/java/maven-sample.js +1 -1
- package/lib/java/pom.js +1 -1
- package/lib/java/projenrc.js +1 -1
- package/lib/javascript/bundler.js +1 -1
- package/lib/javascript/eslint.js +1 -1
- package/lib/javascript/jest.js +1 -1
- package/lib/javascript/node-package.js +1 -1
- package/lib/javascript/node-project.d.ts +19 -1
- package/lib/javascript/node-project.js +14 -6
- package/lib/javascript/npm-config.js +1 -1
- package/lib/javascript/prettier.d.ts +6 -0
- package/lib/javascript/prettier.js +15 -2
- package/lib/javascript/projenrc.js +1 -1
- package/lib/javascript/typescript-config.js +1 -1
- package/lib/javascript/upgrade-dependencies.js +4 -4
- package/lib/json.js +1 -1
- package/lib/license.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/makefile.js +1 -1
- package/lib/object-file.js +1 -1
- package/lib/project-build.js +1 -1
- package/lib/project.js +1 -1
- package/lib/projects.js +1 -1
- package/lib/projenrc-json.js +1 -1
- package/lib/python/pip.js +1 -1
- package/lib/python/poetry.js +2 -2
- package/lib/python/projenrc.js +1 -1
- package/lib/python/pytest.js +1 -1
- package/lib/python/python-project.js +1 -1
- package/lib/python/python-sample.js +1 -1
- package/lib/python/requirements-file.js +1 -1
- package/lib/python/setuppy.js +1 -1
- package/lib/python/setuptools.js +1 -1
- package/lib/python/venv.js +1 -1
- package/lib/readme.js +1 -1
- package/lib/release/publisher.js +1 -1
- package/lib/release/release-trigger.js +1 -1
- package/lib/release/release.js +1 -1
- package/lib/sample-file.js +2 -2
- package/lib/semver.js +1 -1
- package/lib/source-code.d.ts +1 -0
- package/lib/source-code.js +3 -2
- package/lib/task-runtime.js +1 -1
- package/lib/task.js +1 -1
- package/lib/tasks.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/textfile.js +1 -1
- package/lib/toml.js +1 -1
- package/lib/typescript/projenrc.js +1 -1
- package/lib/typescript/typescript-typedoc.js +1 -1
- package/lib/typescript/typescript.js +3 -3
- package/lib/version.js +1 -1
- package/lib/vscode/devcontainer.js +1 -1
- package/lib/vscode/launch-config.js +1 -1
- package/lib/vscode/vscode.js +1 -1
- package/lib/web/next.js +3 -3
- package/lib/web/postcss.js +1 -1
- package/lib/web/react.js +4 -4
- package/lib/web/tailwind.js +1 -1
- package/lib/xmlfile.js +1 -1
- package/lib/yaml.js +1 -1
- package/node_modules/resolve/.eslintrc +33 -8
- package/node_modules/resolve/.github/FUNDING.yml +12 -0
- package/node_modules/resolve/appveyor.yml +4 -2
- package/node_modules/resolve/async.js +3 -0
- package/node_modules/resolve/bin/resolve +47 -0
- package/node_modules/resolve/lib/core.js +1 -2
- package/node_modules/resolve/lib/core.json +81 -12
- package/node_modules/resolve/lib/node-modules-paths.js +1 -1
- package/node_modules/resolve/lib/sync.js +4 -4
- package/node_modules/resolve/package.json +18 -12
- package/node_modules/resolve/readme.markdown +35 -13
- package/node_modules/resolve/sync.js +3 -0
- package/node_modules/resolve/test/mock_sync.js +2 -4
- package/node_modules/resolve/test/node_path.js +1 -1
- package/node_modules/resolve/test/resolver/invalid_main/package.json +1 -1
- package/node_modules/resolve/test/resolver/malformed_package_json/index.js +0 -0
- package/node_modules/resolve/test/resolver/malformed_package_json/package.json +1 -0
- package/node_modules/resolve/test/resolver.js +99 -3
- package/node_modules/resolve/test/resolver_sync.js +88 -3
- package/node_modules/supports-preserve-symlinks-flag/.eslintrc +14 -0
- package/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +12 -0
- package/node_modules/supports-preserve-symlinks-flag/.nycrc +9 -0
- package/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +22 -0
- package/node_modules/supports-preserve-symlinks-flag/LICENSE +21 -0
- package/node_modules/supports-preserve-symlinks-flag/README.md +42 -0
- package/node_modules/supports-preserve-symlinks-flag/browser.js +3 -0
- package/node_modules/supports-preserve-symlinks-flag/index.js +9 -0
- package/node_modules/supports-preserve-symlinks-flag/package.json +70 -0
- package/node_modules/supports-preserve-symlinks-flag/test/index.js +29 -0
- package/node_modules/xmlbuilder2/node_modules/@types/node/README.md +1 -1
- package/node_modules/xmlbuilder2/node_modules/@types/node/net.d.ts +1 -0
- package/node_modules/xmlbuilder2/node_modules/@types/node/package.json +2 -2
- package/node_modules/xmlbuilder2/node_modules/@types/node/process.d.ts +1 -1
- package/package.json +3 -3
- package/releasetag.txt +1 -1
- package/version.txt +1 -1
- package/node_modules/resolve/.eslintignore +0 -1
- package/node_modules/resolve/test/.eslintrc +0 -5
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
var path = require('path');
|
|
2
2
|
var test = require('tape');
|
|
3
3
|
var resolve = require('../');
|
|
4
|
+
var async = require('../async');
|
|
5
|
+
|
|
6
|
+
test('`./async` entry point', function (t) {
|
|
7
|
+
t.equal(resolve, async, '`./async` entry point is the same as `main`');
|
|
8
|
+
t.end();
|
|
9
|
+
});
|
|
4
10
|
|
|
5
11
|
test('async foo', function (t) {
|
|
6
12
|
t.plan(12);
|
|
@@ -288,7 +294,7 @@ test('without basedir', function (t) {
|
|
|
288
294
|
t.plan(1);
|
|
289
295
|
|
|
290
296
|
var dir = path.join(__dirname, 'resolver/without_basedir');
|
|
291
|
-
var tester = require(path.join(dir, 'main.js'));
|
|
297
|
+
var tester = require(path.join(dir, 'main.js')); // eslint-disable-line global-require
|
|
292
298
|
|
|
293
299
|
tester(t, function (err, res, pkg) {
|
|
294
300
|
if (err) {
|
|
@@ -404,7 +410,7 @@ test('non-string "main" field in package.json', function (t) {
|
|
|
404
410
|
var dir = path.join(__dirname, 'resolver');
|
|
405
411
|
resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) {
|
|
406
412
|
t.ok(err, 'errors on non-string main');
|
|
407
|
-
t.equal(err.message, 'package “
|
|
413
|
+
t.equal(err.message, 'package “invalid_main” `main` must be a string');
|
|
408
414
|
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
|
|
409
415
|
t.equal(res, undefined, 'res is undefined');
|
|
410
416
|
t.equal(pkg, undefined, 'pkg is undefined');
|
|
@@ -417,7 +423,7 @@ test('non-string "main" field in package.json', function (t) {
|
|
|
417
423
|
var dir = path.join(__dirname, 'resolver');
|
|
418
424
|
resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) {
|
|
419
425
|
t.ok(err, 'errors on non-string main');
|
|
420
|
-
t.equal(err.message, 'package “
|
|
426
|
+
t.equal(err.message, 'package “invalid_main” `main` must be a string');
|
|
421
427
|
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
|
|
422
428
|
t.equal(res, undefined, 'res is undefined');
|
|
423
429
|
t.equal(pkg, undefined, 'pkg is undefined');
|
|
@@ -448,3 +454,93 @@ test('browser field in package.json', function (t) {
|
|
|
448
454
|
}
|
|
449
455
|
);
|
|
450
456
|
});
|
|
457
|
+
|
|
458
|
+
test('absolute paths', function (t) {
|
|
459
|
+
t.plan(4);
|
|
460
|
+
|
|
461
|
+
var extensionless = __filename.slice(0, -path.extname(__filename).length);
|
|
462
|
+
|
|
463
|
+
resolve(__filename, function (err, res) {
|
|
464
|
+
t.equal(
|
|
465
|
+
res,
|
|
466
|
+
__filename,
|
|
467
|
+
'absolute path to this file resolves'
|
|
468
|
+
);
|
|
469
|
+
});
|
|
470
|
+
resolve(extensionless, function (err, res) {
|
|
471
|
+
t.equal(
|
|
472
|
+
res,
|
|
473
|
+
__filename,
|
|
474
|
+
'extensionless absolute path to this file resolves'
|
|
475
|
+
);
|
|
476
|
+
});
|
|
477
|
+
resolve(__filename, { basedir: process.cwd() }, function (err, res) {
|
|
478
|
+
t.equal(
|
|
479
|
+
res,
|
|
480
|
+
__filename,
|
|
481
|
+
'absolute path to this file with a basedir resolves'
|
|
482
|
+
);
|
|
483
|
+
});
|
|
484
|
+
resolve(extensionless, { basedir: process.cwd() }, function (err, res) {
|
|
485
|
+
t.equal(
|
|
486
|
+
res,
|
|
487
|
+
__filename,
|
|
488
|
+
'extensionless absolute path to this file with a basedir resolves'
|
|
489
|
+
);
|
|
490
|
+
});
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
test('malformed package.json', function (t) {
|
|
494
|
+
/* eslint operator-linebreak: ["error", "before"], function-paren-newline: "off" */
|
|
495
|
+
t.plan(
|
|
496
|
+
(3 * 3) // 3 sets of 3 assertions in the final callback
|
|
497
|
+
+ 2 // 1 readPackage call with malformed package.json
|
|
498
|
+
);
|
|
499
|
+
|
|
500
|
+
var basedir = path.join(__dirname, 'resolver/malformed_package_json');
|
|
501
|
+
var expected = path.join(basedir, 'index.js');
|
|
502
|
+
|
|
503
|
+
resolve('./index.js', { basedir: basedir }, function (err, res, pkg) {
|
|
504
|
+
t.error(err, 'no error');
|
|
505
|
+
t.equal(res, expected, 'malformed package.json is silently ignored');
|
|
506
|
+
t.equal(pkg, undefined, 'malformed package.json gives an undefined `pkg` argument');
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
resolve(
|
|
510
|
+
'./index.js',
|
|
511
|
+
{
|
|
512
|
+
basedir: basedir,
|
|
513
|
+
packageFilter: function (pkg, pkgfile, dir) {
|
|
514
|
+
t.fail('should not reach here');
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
function (err, res, pkg) {
|
|
518
|
+
t.error(err, 'with packageFilter: no error');
|
|
519
|
+
t.equal(res, expected, 'with packageFilter: malformed package.json is silently ignored');
|
|
520
|
+
t.equal(pkg, undefined, 'with packageFilter: malformed package.json gives an undefined `pkg` argument');
|
|
521
|
+
}
|
|
522
|
+
);
|
|
523
|
+
|
|
524
|
+
resolve(
|
|
525
|
+
'./index.js',
|
|
526
|
+
{
|
|
527
|
+
basedir: basedir,
|
|
528
|
+
readPackage: function (readFile, pkgfile, cb) {
|
|
529
|
+
t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path');
|
|
530
|
+
readFile(pkgfile, function (err, result) {
|
|
531
|
+
try {
|
|
532
|
+
cb(null, JSON.parse(result));
|
|
533
|
+
} catch (e) {
|
|
534
|
+
t.ok(e instanceof SyntaxError, 'readPackage: malformed package.json parses as a syntax error');
|
|
535
|
+
cb(null);
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
function (err, res, pkg) {
|
|
541
|
+
t.error(err, 'with readPackage: no error');
|
|
542
|
+
t.equal(res, expected, 'with readPackage: malformed package.json is silently ignored');
|
|
543
|
+
t.equal(pkg, undefined, 'with readPackage: malformed package.json gives an undefined `pkg` argument');
|
|
544
|
+
}
|
|
545
|
+
);
|
|
546
|
+
});
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
var path = require('path');
|
|
2
|
+
var fs = require('fs');
|
|
2
3
|
var test = require('tape');
|
|
4
|
+
|
|
3
5
|
var resolve = require('../');
|
|
6
|
+
var sync = require('../sync');
|
|
7
|
+
|
|
8
|
+
test('`./sync` entry point', function (t) {
|
|
9
|
+
t.equal(resolve.sync, sync, '`./sync` entry point is the same as `.sync` on `main`');
|
|
10
|
+
t.end();
|
|
11
|
+
});
|
|
4
12
|
|
|
5
13
|
test('foo', function (t) {
|
|
6
14
|
var dir = path.join(__dirname, 'resolver');
|
|
@@ -200,7 +208,6 @@ test('incorrect main', function (t) {
|
|
|
200
208
|
});
|
|
201
209
|
|
|
202
210
|
var stubStatSync = function stubStatSync(fn) {
|
|
203
|
-
var fs = require('fs');
|
|
204
211
|
var statSync = fs.statSync;
|
|
205
212
|
try {
|
|
206
213
|
fs.statSync = function () {
|
|
@@ -321,7 +328,7 @@ test('non-string "main" field in package.json', function (t) {
|
|
|
321
328
|
t.fail('should not get here');
|
|
322
329
|
} catch (err) {
|
|
323
330
|
t.ok(err, 'errors on non-string main');
|
|
324
|
-
t.equal(err.message, 'package “
|
|
331
|
+
t.equal(err.message, 'package “invalid_main” `main` must be a string');
|
|
325
332
|
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
|
|
326
333
|
}
|
|
327
334
|
t.end();
|
|
@@ -335,7 +342,7 @@ test('non-string "main" field in package.json', function (t) {
|
|
|
335
342
|
t.fail('should not get here');
|
|
336
343
|
} catch (err) {
|
|
337
344
|
t.ok(err, 'errors on non-string main');
|
|
338
|
-
t.equal(err.message, 'package “
|
|
345
|
+
t.equal(err.message, 'package “invalid_main” `main` must be a string');
|
|
339
346
|
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
|
|
340
347
|
}
|
|
341
348
|
t.end();
|
|
@@ -356,3 +363,81 @@ test('browser field in package.json', function (t) {
|
|
|
356
363
|
t.equal(res, path.join(dir, 'browser_field', 'b.js'));
|
|
357
364
|
t.end();
|
|
358
365
|
});
|
|
366
|
+
|
|
367
|
+
test('absolute paths', function (t) {
|
|
368
|
+
var extensionless = __filename.slice(0, -path.extname(__filename).length);
|
|
369
|
+
|
|
370
|
+
t.equal(
|
|
371
|
+
resolve.sync(__filename),
|
|
372
|
+
__filename,
|
|
373
|
+
'absolute path to this file resolves'
|
|
374
|
+
);
|
|
375
|
+
t.equal(
|
|
376
|
+
resolve.sync(extensionless),
|
|
377
|
+
__filename,
|
|
378
|
+
'extensionless absolute path to this file resolves'
|
|
379
|
+
);
|
|
380
|
+
t.equal(
|
|
381
|
+
resolve.sync(__filename, { basedir: process.cwd() }),
|
|
382
|
+
__filename,
|
|
383
|
+
'absolute path to this file with a basedir resolves'
|
|
384
|
+
);
|
|
385
|
+
t.equal(
|
|
386
|
+
resolve.sync(extensionless, { basedir: process.cwd() }),
|
|
387
|
+
__filename,
|
|
388
|
+
'extensionless absolute path to this file with a basedir resolves'
|
|
389
|
+
);
|
|
390
|
+
|
|
391
|
+
t.end();
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
test('malformed package.json', function (t) {
|
|
395
|
+
t.plan(5);
|
|
396
|
+
|
|
397
|
+
var basedir = path.join(__dirname, 'resolver/malformed_package_json');
|
|
398
|
+
var expected = path.join(basedir, 'index.js');
|
|
399
|
+
|
|
400
|
+
t.equal(
|
|
401
|
+
resolve.sync('./index.js', { basedir: basedir }),
|
|
402
|
+
expected,
|
|
403
|
+
'malformed package.json is silently ignored'
|
|
404
|
+
);
|
|
405
|
+
|
|
406
|
+
var res1 = resolve.sync(
|
|
407
|
+
'./index.js',
|
|
408
|
+
{
|
|
409
|
+
basedir: basedir,
|
|
410
|
+
packageFilter: function (pkg, pkgfile, dir) {
|
|
411
|
+
t.fail('should not reach here');
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
);
|
|
415
|
+
|
|
416
|
+
t.equal(
|
|
417
|
+
res1,
|
|
418
|
+
expected,
|
|
419
|
+
'with packageFilter: malformed package.json is silently ignored'
|
|
420
|
+
);
|
|
421
|
+
|
|
422
|
+
var res2 = resolve.sync(
|
|
423
|
+
'./index.js',
|
|
424
|
+
{
|
|
425
|
+
basedir: basedir,
|
|
426
|
+
readPackageSync: function (readFileSync, pkgfile) {
|
|
427
|
+
t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path');
|
|
428
|
+
var result = String(readFileSync(pkgfile));
|
|
429
|
+
try {
|
|
430
|
+
return JSON.parse(result);
|
|
431
|
+
} catch (e) {
|
|
432
|
+
t.ok(e instanceof SyntaxError, 'readPackageSync: malformed package.json parses as a syntax error');
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
);
|
|
437
|
+
|
|
438
|
+
t.equal(
|
|
439
|
+
res2,
|
|
440
|
+
expected,
|
|
441
|
+
'with readPackageSync: malformed package.json is silently ignored'
|
|
442
|
+
);
|
|
443
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [ljharb]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: npm/supports-preserve-symlink-flag
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## v1.0.0 - 2022-01-02
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- Tests [`e2f59ad`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/e2f59ad74e2ae0f5f4899fcde6a6f693ab7cc074)
|
|
13
|
+
- Initial commit [`dc222aa`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/dc222aad3c0b940d8d3af1ca9937d108bd2dc4b9)
|
|
14
|
+
- [meta] do not publish workflow files [`5ef77f7`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/5ef77f7cb6946d16ee38672be9ec0f1bbdf63262)
|
|
15
|
+
- npm init [`992b068`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/992b068503a461f7e8676f40ca2aab255fd8d6ff)
|
|
16
|
+
- read me [`6c9afa9`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c9afa9fabc8eaf0814aaed6dd01e6df0931b76d)
|
|
17
|
+
- Initial implementation [`2f98925`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2f9892546396d4ab0ad9f1ff83e76c3f01234ae8)
|
|
18
|
+
- [meta] add `auto-changelog` [`6c476ae`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c476ae1ed7ce68b0480344f090ac2844f35509d)
|
|
19
|
+
- [Dev Deps] add `eslint`, `@ljharb/eslint-config` [`d0fffc8`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/d0fffc886d25fba119355520750a909d64da0087)
|
|
20
|
+
- Only apps should have lockfiles [`ab318ed`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/ab318ed7ae62f6c2c0e80a50398d40912afd8f69)
|
|
21
|
+
- [meta] add `safe-publish-latest` [`2bb23b3`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2bb23b3ebab02dc4135c4cdf0217db82835b9fca)
|
|
22
|
+
- [meta] add `sideEffects` flag [`600223b`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/600223ba24f30779f209d9097721eff35ed62741)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Inspect JS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# node-supports-preserve-symlinks-flag <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
|
+
|
|
3
|
+
[![github actions][actions-image]][actions-url]
|
|
4
|
+
[![coverage][codecov-image]][codecov-url]
|
|
5
|
+
[![dependency status][deps-svg]][deps-url]
|
|
6
|
+
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
|
7
|
+
[![License][license-image]][license-url]
|
|
8
|
+
[![Downloads][downloads-image]][downloads-url]
|
|
9
|
+
|
|
10
|
+
[![npm badge][npm-badge-png]][package-url]
|
|
11
|
+
|
|
12
|
+
Determine if the current node version supports the `--preserve-symlinks` flag.
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
var supportsPreserveSymlinks = require('node-supports-preserve-symlinks-flag');
|
|
18
|
+
var assert = require('assert');
|
|
19
|
+
|
|
20
|
+
assert.equal(supportsPreserveSymlinks, null); // in a browser
|
|
21
|
+
assert.equal(supportsPreserveSymlinks, false); // in node < v6.2
|
|
22
|
+
assert.equal(supportsPreserveSymlinks, true); // in node v6.2+
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Tests
|
|
26
|
+
Simply clone the repo, `npm install`, and run `npm test`
|
|
27
|
+
|
|
28
|
+
[package-url]: https://npmjs.org/package/node-supports-preserve-symlinks-flag
|
|
29
|
+
[npm-version-svg]: https://versionbadg.es/inspect-js/node-supports-preserve-symlinks-flag.svg
|
|
30
|
+
[deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag.svg
|
|
31
|
+
[deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag
|
|
32
|
+
[dev-deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag/dev-status.svg
|
|
33
|
+
[dev-deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag#info=devDependencies
|
|
34
|
+
[npm-badge-png]: https://nodei.co/npm/node-supports-preserve-symlinks-flag.png?downloads=true&stars=true
|
|
35
|
+
[license-image]: https://img.shields.io/npm/l/node-supports-preserve-symlinks-flag.svg
|
|
36
|
+
[license-url]: LICENSE
|
|
37
|
+
[downloads-image]: https://img.shields.io/npm/dm/node-supports-preserve-symlinks-flag.svg
|
|
38
|
+
[downloads-url]: https://npm-stat.com/charts.html?package=node-supports-preserve-symlinks-flag
|
|
39
|
+
[codecov-image]: https://codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/branch/main/graphs/badge.svg
|
|
40
|
+
[codecov-url]: https://app.codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/
|
|
41
|
+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/node-supports-preserve-symlinks-flag
|
|
42
|
+
[actions-url]: https://github.com/inspect-js/node-supports-preserve-symlinks-flag/actions
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = (
|
|
4
|
+
// node 12+
|
|
5
|
+
process.allowedNodeEnvironmentFlags && process.allowedNodeEnvironmentFlags.has('--preserve-symlinks')
|
|
6
|
+
) || (
|
|
7
|
+
// node v6.2 - v11
|
|
8
|
+
String(module.constructor._findPath).indexOf('preserveSymlinks') >= 0 // eslint-disable-line no-underscore-dangle
|
|
9
|
+
);
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "supports-preserve-symlinks-flag",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Determine if the current node version supports the `--preserve-symlinks` flag.",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"browser": "./browser.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": [
|
|
9
|
+
{
|
|
10
|
+
"browser": "./browser.js",
|
|
11
|
+
"default": "./index.js"
|
|
12
|
+
},
|
|
13
|
+
"./index.js"
|
|
14
|
+
],
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"scripts": {
|
|
19
|
+
"prepublishOnly": "safe-publish-latest",
|
|
20
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
21
|
+
"lint": "eslint --ext=js,mjs .",
|
|
22
|
+
"pretest": "npm run lint",
|
|
23
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
24
|
+
"test": "npm run tests-only",
|
|
25
|
+
"posttest": "aud --production",
|
|
26
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
27
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/inspect-js/node-supports-preserve-symlinks-flag.git"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"node",
|
|
35
|
+
"flag",
|
|
36
|
+
"symlink",
|
|
37
|
+
"symlinks",
|
|
38
|
+
"preserve-symlinks"
|
|
39
|
+
],
|
|
40
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
41
|
+
"funding": {
|
|
42
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
43
|
+
},
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag/issues"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag#readme",
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@ljharb/eslint-config": "^20.1.0",
|
|
51
|
+
"aud": "^1.1.5",
|
|
52
|
+
"auto-changelog": "^2.3.0",
|
|
53
|
+
"eslint": "^8.6.0",
|
|
54
|
+
"nyc": "^10.3.2",
|
|
55
|
+
"safe-publish-latest": "^2.0.0",
|
|
56
|
+
"semver": "^6.3.0",
|
|
57
|
+
"tape": "^5.4.0"
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">= 0.4"
|
|
61
|
+
},
|
|
62
|
+
"auto-changelog": {
|
|
63
|
+
"output": "CHANGELOG.md",
|
|
64
|
+
"template": "keepachangelog",
|
|
65
|
+
"unreleased": false,
|
|
66
|
+
"commitLimit": false,
|
|
67
|
+
"backfillLimit": false,
|
|
68
|
+
"hideCredit": true
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
var semver = require('semver');
|
|
5
|
+
|
|
6
|
+
var supportsPreserveSymlinks = require('../');
|
|
7
|
+
var browser = require('../browser');
|
|
8
|
+
|
|
9
|
+
test('supportsPreserveSymlinks', function (t) {
|
|
10
|
+
t.equal(typeof supportsPreserveSymlinks, 'boolean', 'is a boolean');
|
|
11
|
+
|
|
12
|
+
t.equal(browser, null, 'browser file is `null`');
|
|
13
|
+
t.equal(
|
|
14
|
+
supportsPreserveSymlinks,
|
|
15
|
+
null,
|
|
16
|
+
'in a browser, is null',
|
|
17
|
+
{ skip: typeof window === 'undefined' }
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
var expected = semver.satisfies(process.version, '>= 6.2');
|
|
21
|
+
t.equal(
|
|
22
|
+
supportsPreserveSymlinks,
|
|
23
|
+
expected,
|
|
24
|
+
'is true in node v6.2+, false otherwise (actual: ' + supportsPreserveSymlinks + ', expected ' + expected + ')',
|
|
25
|
+
{ skip: typeof window !== 'undefined' }
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
t.end();
|
|
29
|
+
});
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Tue, 04 Jan 2022 18:31:31 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
|
|
14
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.8",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -225,6 +225,6 @@
|
|
|
225
225
|
},
|
|
226
226
|
"scripts": {},
|
|
227
227
|
"dependencies": {},
|
|
228
|
-
"typesPublisherContentHash": "
|
|
228
|
+
"typesPublisherContentHash": "133a958e0122898f222d66bf1e776d90a38ee878a694bbe229cf5e02db71deef",
|
|
229
229
|
"typeScriptVersion": "3.8"
|
|
230
230
|
}
|
package/package.json
CHANGED
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
"eslint-import-resolver-typescript": "^2.5.0",
|
|
63
63
|
"eslint-plugin-import": "^2.25.4",
|
|
64
64
|
"eslint-plugin-prettier": "^4.0.0",
|
|
65
|
-
"jest": "^27.4.
|
|
65
|
+
"jest": "^27.4.6",
|
|
66
66
|
"jest-junit": "^13",
|
|
67
67
|
"jsii": "^1.50.0",
|
|
68
68
|
"jsii-diff": "^1.50.0",
|
|
69
69
|
"jsii-docgen": "^1.8.110",
|
|
70
70
|
"json-schema": "^0.4.0",
|
|
71
|
-
"markmac": "^0.1.
|
|
71
|
+
"markmac": "^0.1.128",
|
|
72
72
|
"npm-check-updates": "^12",
|
|
73
73
|
"prettier": "^2.5.1",
|
|
74
74
|
"standard-version": "^9",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
},
|
|
117
117
|
"main": "lib/index.js",
|
|
118
118
|
"license": "Apache-2.0",
|
|
119
|
-
"version": "0.50.
|
|
119
|
+
"version": "0.50.7",
|
|
120
120
|
"jest": {
|
|
121
121
|
"testMatch": [
|
|
122
122
|
"<rootDir>/src/**/__tests__/**/*.ts?(x)",
|
package/releasetag.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v0.50.
|
|
1
|
+
v0.50.7
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.50.
|
|
1
|
+
0.50.7
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
node_modules
|