projen 0.99.72 → 0.99.73
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 +2 -2
- package/lib/ai-instructions.js +2 -2
- package/lib/awscdk/auto-discover.js +6 -6
- package/lib/awscdk/awscdk-app-java.js +1 -1
- package/lib/awscdk/awscdk-app-py.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-py.js +1 -1
- package/lib/awscdk/awscdk-deps.js +1 -1
- package/lib/awscdk/cdk-config.js +4 -4
- package/lib/awscdk/cdk-tasks.js +1 -1
- package/lib/awscdk/integration-test.js +1 -1
- package/lib/awscdk/lambda-extension.js +1 -1
- package/lib/awscdk/lambda-function.js +2 -2
- package/lib/awscdk/private/feature-flags-v2.const.d.ts +1 -1
- package/lib/awscdk/private/feature-flags-v2.const.js +2 -2
- package/lib/build/build-workflow.js +1 -1
- package/lib/cdk/auto-discover-base.js +2 -2
- package/lib/cdk/construct-lib.js +1 -1
- package/lib/cdk/integration-test-base.js +1 -1
- package/lib/cdk/jsii-build.js +1 -1
- package/lib/cdk/jsii-docgen.js +1 -1
- package/lib/cdk/jsii-project.js +1 -1
- package/lib/cdk8s/auto-discover.js +2 -2
- package/lib/cdk8s/cdk8s-app-py.js +1 -1
- package/lib/cdk8s/cdk8s-app-ts.js +1 -1
- package/lib/cdk8s/cdk8s-construct.js +1 -1
- package/lib/cdk8s/cdk8s-deps-py.js +1 -1
- package/lib/cdk8s/cdk8s-deps.js +1 -1
- package/lib/cdk8s/integration-test.js +1 -1
- package/lib/cdktf/cdktf-construct.js +1 -1
- package/lib/circleci/circleci.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/docker-compose-service.js +1 -1
- package/lib/docker-compose/docker-compose.js +1 -1
- package/lib/file.js +1 -1
- package/lib/gitattributes.js +1 -1
- package/lib/github/actions-provider.js +1 -1
- package/lib/github/auto-approve.js +1 -1
- package/lib/github/auto-merge.js +1 -1
- package/lib/github/auto-queue.js +1 -1
- package/lib/github/dependabot.js +1 -1
- package/lib/github/dependency-review.js +1 -1
- package/lib/github/github-credentials.js +1 -1
- package/lib/github/github-project.js +1 -1
- package/lib/github/github.js +1 -1
- package/lib/github/merge-queue.js +1 -1
- package/lib/github/mergify.js +1 -1
- package/lib/github/pr-template.js +1 -1
- package/lib/github/pull-request-backport.js +1 -1
- package/lib/github/pull-request-lint.js +1 -1
- package/lib/github/stale.js +1 -1
- package/lib/github/task-workflow-job.js +1 -1
- package/lib/github/task-workflow.js +1 -1
- package/lib/github/workflow-actions.js +1 -1
- package/lib/github/workflow-jobs.js +1 -1
- package/lib/github/workflow-steps.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.js +1 -1
- 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 +2 -2
- package/lib/java/projenrc.js +1 -1
- package/lib/javascript/biome/biome.js +1 -1
- package/lib/javascript/bundler.js +1 -1
- package/lib/javascript/eslint.js +1 -1
- package/lib/javascript/jest.js +4 -4
- package/lib/javascript/license-checker.js +1 -1
- package/lib/javascript/node-package.js +1 -1
- package/lib/javascript/node-project.js +1 -1
- package/lib/javascript/npm-config.js +1 -1
- package/lib/javascript/prettier.js +1 -1
- package/lib/javascript/projenrc.js +1 -1
- package/lib/javascript/typescript-config.js +2 -2
- package/lib/javascript/upgrade-dependencies.js +2 -2
- package/lib/javascript/yarnrc.js +1 -1
- package/lib/json-patch.js +1 -1
- 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-tree.js +1 -1
- package/lib/project.js +1 -1
- package/lib/projects.js +1 -1
- package/lib/projenrc-json.js +2 -2
- package/lib/projenrc.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/pyproject-toml-file.js +1 -1
- package/lib/python/pytest-sample.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/uv.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/renovatebot.js +1 -1
- package/lib/sample-file.js +2 -2
- package/lib/semver.js +1 -1
- package/lib/source-code.js +1 -1
- 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-ts.js +1 -1
- package/lib/typescript/projenrc.js +1 -1
- package/lib/typescript/typescript-typedoc.js +1 -1
- package/lib/typescript/typescript.js +6 -6
- package/lib/version.js +2 -2
- package/lib/vscode/devcontainer.js +1 -1
- package/lib/vscode/extensions.js +1 -1
- package/lib/vscode/launch-config.js +1 -1
- package/lib/vscode/settings.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/{shelljs/node_modules/cross-spawn → cross-spawn}/README.md +10 -15
- package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/lib/enoent.js +1 -1
- package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/lib/parse.js +1 -35
- package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/lib/util/readShebang.js +1 -10
- package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/lib/util/resolveCommand.js +4 -3
- package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/package.json +23 -25
- package/node_modules/execa/index.d.ts +564 -0
- package/node_modules/execa/index.js +268 -0
- package/node_modules/execa/lib/command.js +52 -0
- package/node_modules/execa/lib/error.js +88 -0
- package/node_modules/execa/lib/kill.js +115 -0
- package/node_modules/execa/lib/promise.js +46 -0
- package/node_modules/execa/lib/stdio.js +52 -0
- package/node_modules/execa/lib/stream.js +97 -0
- package/node_modules/execa/license +9 -0
- package/node_modules/execa/package.json +74 -0
- package/node_modules/execa/readme.md +663 -0
- package/node_modules/fastq/README.md +0 -2
- package/node_modules/fastq/eslint.config.js +11 -0
- package/node_modules/fastq/example.mjs +0 -2
- package/node_modules/fastq/index.d.ts +2 -0
- package/node_modules/fastq/package.json +5 -9
- package/node_modules/fastq/queue.js +36 -1
- package/node_modules/fastq/test/promise.js +34 -0
- package/node_modules/fastq/test/test.js +80 -0
- package/node_modules/get-stream/buffer-stream.js +52 -0
- package/node_modules/get-stream/index.d.ts +105 -0
- package/node_modules/get-stream/index.js +61 -0
- package/node_modules/get-stream/license +9 -0
- package/node_modules/{shelljs/node_modules/get-stream → get-stream}/package.json +11 -10
- package/node_modules/{shelljs/node_modules/get-stream → get-stream}/readme.md +19 -18
- package/node_modules/human-signals/LICENSE +201 -0
- package/node_modules/human-signals/README.md +165 -0
- package/node_modules/human-signals/build/src/core.js +273 -0
- package/node_modules/human-signals/build/src/core.js.map +1 -0
- package/node_modules/human-signals/build/src/main.d.ts +52 -0
- package/node_modules/human-signals/build/src/main.js +71 -0
- package/node_modules/human-signals/build/src/main.js.map +1 -0
- package/node_modules/human-signals/build/src/realtime.js +19 -0
- package/node_modules/human-signals/build/src/realtime.js.map +1 -0
- package/node_modules/human-signals/build/src/signals.js +35 -0
- package/node_modules/human-signals/build/src/signals.js.map +1 -0
- package/node_modules/human-signals/package.json +64 -0
- package/node_modules/is-stream/index.d.ts +79 -0
- package/node_modules/is-stream/index.js +28 -0
- package/node_modules/is-stream/license +9 -0
- package/node_modules/is-stream/package.json +42 -0
- package/node_modules/is-stream/readme.md +60 -0
- package/node_modules/js-yaml/README.md +4 -20
- package/node_modules/js-yaml/bin/js-yaml.js +53 -62
- package/node_modules/js-yaml/dist/js-yaml.js +2404 -3880
- package/node_modules/js-yaml/dist/js-yaml.js.map +1 -0
- package/node_modules/js-yaml/dist/js-yaml.min.js +33 -2
- package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -0
- package/node_modules/js-yaml/dist/js-yaml.mjs +2381 -3855
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -0
- package/node_modules/js-yaml/index.js +32 -35
- package/node_modules/js-yaml/lib/common.js +28 -37
- package/node_modules/js-yaml/lib/dumper.js +450 -478
- package/node_modules/js-yaml/lib/exception.js +23 -27
- package/node_modules/js-yaml/lib/index_vite_proxy.tmp.mjs +37 -0
- package/node_modules/js-yaml/lib/loader.js +927 -866
- package/node_modules/js-yaml/lib/schema/core.js +2 -4
- package/node_modules/js-yaml/lib/schema/default.js +2 -4
- package/node_modules/js-yaml/lib/schema/failsafe.js +3 -6
- package/node_modules/js-yaml/lib/schema/json.js +2 -4
- package/node_modules/js-yaml/lib/schema.js +56 -68
- package/node_modules/js-yaml/lib/snippet.js +47 -52
- package/node_modules/js-yaml/lib/type/binary.js +61 -64
- package/node_modules/js-yaml/lib/type/bool.js +14 -14
- package/node_modules/js-yaml/lib/type/float.js +47 -45
- package/node_modules/js-yaml/lib/type/int.js +65 -79
- package/node_modules/js-yaml/lib/type/map.js +4 -4
- package/node_modules/js-yaml/lib/type/merge.js +5 -5
- package/node_modules/js-yaml/lib/type/null.js +16 -16
- package/node_modules/js-yaml/lib/type/omap.js +22 -21
- package/node_modules/js-yaml/lib/type/pairs.js +24 -27
- package/node_modules/js-yaml/lib/type/seq.js +4 -4
- package/node_modules/js-yaml/lib/type/set.js +12 -12
- package/node_modules/js-yaml/lib/type/str.js +4 -4
- package/node_modules/js-yaml/lib/type/timestamp.js +53 -53
- package/node_modules/js-yaml/lib/type.js +30 -30
- package/node_modules/js-yaml/package.json +32 -21
- package/node_modules/{nice-try → merge-stream}/LICENSE +1 -1
- package/node_modules/merge-stream/README.md +78 -0
- package/node_modules/merge-stream/index.js +41 -0
- package/node_modules/merge-stream/package.json +19 -0
- package/node_modules/mimic-fn/index.d.ts +54 -0
- package/node_modules/mimic-fn/index.js +13 -0
- package/node_modules/mimic-fn/package.json +42 -0
- package/node_modules/mimic-fn/readme.md +69 -0
- package/node_modules/npm-run-path/index.d.ts +89 -0
- package/node_modules/npm-run-path/index.js +47 -0
- package/node_modules/npm-run-path/package.json +44 -0
- package/node_modules/{shelljs/node_modules/npm-run-path → npm-run-path}/readme.md +39 -5
- package/node_modules/onetime/index.d.ts +64 -0
- package/node_modules/onetime/index.js +44 -0
- package/node_modules/onetime/license +9 -0
- package/node_modules/onetime/package.json +43 -0
- package/node_modules/onetime/readme.md +94 -0
- package/node_modules/path-key/index.d.ts +40 -0
- package/node_modules/path-key/index.js +16 -0
- package/node_modules/path-key/license +9 -0
- package/node_modules/path-key/package.json +39 -0
- package/node_modules/{shelljs/node_modules/path-key → path-key}/readme.md +15 -5
- package/node_modules/semver/classes/range.js +9 -0
- package/node_modules/semver/package.json +1 -1
- package/node_modules/shebang-command/index.js +19 -0
- package/node_modules/shebang-command/license +9 -0
- package/node_modules/shebang-command/package.json +34 -0
- package/node_modules/{shelljs/node_modules/shebang-command → shebang-command}/readme.md +1 -6
- package/node_modules/shebang-regex/index.d.ts +22 -0
- package/node_modules/shebang-regex/index.js +2 -0
- package/node_modules/shebang-regex/license +9 -0
- package/node_modules/shebang-regex/package.json +35 -0
- package/node_modules/shebang-regex/readme.md +33 -0
- package/node_modules/shelljs/README.md +7 -1
- package/node_modules/shelljs/global.js +4 -1
- package/node_modules/shelljs/package.json +8 -13
- package/node_modules/shelljs/shell.js +9 -7
- package/node_modules/shelljs/src/cat.js +1 -1
- package/node_modules/shelljs/src/chmod.js +1 -1
- package/node_modules/shelljs/src/cmd.js +25 -9
- package/node_modules/shelljs/src/common.js +11 -8
- package/node_modules/shelljs/src/dirs.js +1 -1
- package/node_modules/shelljs/src/exec.js +6 -6
- package/node_modules/shelljs/src/grep.js +121 -7
- package/node_modules/shelljs/src/head.js +1 -1
- package/node_modules/shelljs/src/ls.js +1 -1
- package/node_modules/shelljs/src/mkdir.js +1 -1
- package/node_modules/shelljs/src/rm.js +1 -1
- package/node_modules/shelljs/src/sed.js +1 -1
- package/node_modules/shelljs/src/sort.js +1 -1
- package/node_modules/shelljs/src/tail.js +1 -1
- package/node_modules/shelljs/src/tempdir.js +1 -1
- package/node_modules/shelljs/src/test.js +1 -1
- package/node_modules/shelljs/src/to.js +1 -1
- package/node_modules/shelljs/src/toEnd.js +1 -1
- package/node_modules/shelljs/src/touch.js +1 -1
- package/node_modules/shelljs/src/uniq.js +1 -1
- package/node_modules/shelljs/src/which.js +1 -1
- package/node_modules/strip-final-newline/index.js +16 -0
- package/node_modules/strip-final-newline/license +9 -0
- package/node_modules/strip-final-newline/package.json +40 -0
- package/node_modules/strip-final-newline/readme.md +30 -0
- package/node_modules/{shelljs/node_modules/which → which}/README.md +3 -0
- package/node_modules/which/package.json +43 -0
- package/node_modules/which/which.js +125 -0
- package/package.json +4 -1
- package/node_modules/end-of-stream/LICENSE +0 -21
- package/node_modules/end-of-stream/README.md +0 -54
- package/node_modules/end-of-stream/index.js +0 -96
- package/node_modules/end-of-stream/package.json +0 -37
- package/node_modules/fastq/.github/dependabot.yml +0 -11
- package/node_modules/fastq/.github/workflows/ci.yml +0 -75
- package/node_modules/function-bind/.eslintrc +0 -21
- package/node_modules/function-bind/.github/FUNDING.yml +0 -12
- package/node_modules/function-bind/.github/SECURITY.md +0 -3
- package/node_modules/function-bind/.nycrc +0 -13
- package/node_modules/function-bind/CHANGELOG.md +0 -136
- package/node_modules/function-bind/LICENSE +0 -20
- package/node_modules/function-bind/README.md +0 -46
- package/node_modules/function-bind/implementation.js +0 -84
- package/node_modules/function-bind/index.js +0 -5
- package/node_modules/function-bind/package.json +0 -87
- package/node_modules/function-bind/test/.eslintrc +0 -9
- package/node_modules/function-bind/test/index.js +0 -252
- package/node_modules/hasown/.eslintrc +0 -5
- package/node_modules/hasown/.github/FUNDING.yml +0 -12
- package/node_modules/hasown/.nycrc +0 -13
- package/node_modules/hasown/CHANGELOG.md +0 -40
- package/node_modules/hasown/LICENSE +0 -21
- package/node_modules/hasown/README.md +0 -40
- package/node_modules/hasown/index.d.ts +0 -3
- package/node_modules/hasown/index.js +0 -8
- package/node_modules/hasown/package.json +0 -92
- package/node_modules/hasown/tsconfig.json +0 -6
- package/node_modules/interpret/LICENSE +0 -22
- package/node_modules/interpret/README.md +0 -187
- package/node_modules/interpret/index.js +0 -168
- package/node_modules/interpret/mjs-stub.js +0 -1
- package/node_modules/interpret/package.json +0 -75
- package/node_modules/is-core-module/.eslintrc +0 -18
- package/node_modules/is-core-module/.nycrc +0 -9
- package/node_modules/is-core-module/CHANGELOG.md +0 -218
- package/node_modules/is-core-module/LICENSE +0 -20
- package/node_modules/is-core-module/README.md +0 -40
- package/node_modules/is-core-module/core.json +0 -162
- package/node_modules/is-core-module/index.js +0 -69
- package/node_modules/is-core-module/package.json +0 -76
- package/node_modules/is-core-module/test/index.js +0 -157
- package/node_modules/nice-try/README.md +0 -32
- package/node_modules/nice-try/package.json +0 -33
- package/node_modules/nice-try/src/index.js +0 -12
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -33
- package/node_modules/p-finally/index.js +0 -15
- package/node_modules/p-finally/license +0 -21
- package/node_modules/p-finally/package.json +0 -42
- package/node_modules/p-finally/readme.md +0 -47
- package/node_modules/path-parse/LICENSE +0 -21
- package/node_modules/path-parse/README.md +0 -42
- package/node_modules/path-parse/index.js +0 -75
- package/node_modules/path-parse/package.json +0 -33
- package/node_modules/pump/.github/FUNDING.yml +0 -2
- package/node_modules/pump/.travis.yml +0 -5
- package/node_modules/pump/LICENSE +0 -21
- package/node_modules/pump/README.md +0 -74
- package/node_modules/pump/SECURITY.md +0 -5
- package/node_modules/pump/index.js +0 -86
- package/node_modules/pump/package.json +0 -24
- package/node_modules/pump/test-browser.js +0 -66
- package/node_modules/pump/test-node.js +0 -53
- package/node_modules/rechoir/.npmignore +0 -1
- package/node_modules/rechoir/.travis.yml +0 -24
- package/node_modules/rechoir/CHANGELOG +0 -38
- package/node_modules/rechoir/LICENSE +0 -22
- package/node_modules/rechoir/README.md +0 -42
- package/node_modules/rechoir/index.js +0 -59
- package/node_modules/rechoir/lib/extension.js +0 -11
- package/node_modules/rechoir/lib/normalize.js +0 -15
- package/node_modules/rechoir/lib/register.js +0 -15
- package/node_modules/rechoir/package.json +0 -88
- package/node_modules/resolve/.editorconfig +0 -37
- package/node_modules/resolve/.eslintrc +0 -65
- package/node_modules/resolve/.github/FUNDING.yml +0 -12
- package/node_modules/resolve/.github/INCIDENT_RESPONSE_PROCESS.md +0 -119
- package/node_modules/resolve/.github/THREAT_MODEL.md +0 -74
- package/node_modules/resolve/LICENSE +0 -21
- package/node_modules/resolve/SECURITY.md +0 -11
- package/node_modules/resolve/async.js +0 -3
- package/node_modules/resolve/bin/resolve +0 -50
- package/node_modules/resolve/example/async.js +0 -5
- package/node_modules/resolve/example/sync.js +0 -3
- package/node_modules/resolve/index.js +0 -6
- package/node_modules/resolve/lib/async.js +0 -333
- package/node_modules/resolve/lib/caller.js +0 -8
- package/node_modules/resolve/lib/core.js +0 -12
- package/node_modules/resolve/lib/core.json +0 -162
- package/node_modules/resolve/lib/homedir.js +0 -24
- package/node_modules/resolve/lib/is-core.js +0 -5
- package/node_modules/resolve/lib/node-modules-paths.js +0 -45
- package/node_modules/resolve/lib/normalize-options.js +0 -10
- package/node_modules/resolve/lib/sync.js +0 -212
- package/node_modules/resolve/package.json +0 -75
- package/node_modules/resolve/readme.markdown +0 -301
- package/node_modules/resolve/sync.js +0 -3
- package/node_modules/resolve/test/core.js +0 -88
- package/node_modules/resolve/test/dotdot/abc/index.js +0 -2
- package/node_modules/resolve/test/dotdot/index.js +0 -1
- package/node_modules/resolve/test/dotdot.js +0 -29
- package/node_modules/resolve/test/faulty_basedir.js +0 -29
- package/node_modules/resolve/test/filter.js +0 -34
- package/node_modules/resolve/test/filter_sync.js +0 -33
- package/node_modules/resolve/test/home_paths.js +0 -127
- package/node_modules/resolve/test/home_paths_sync.js +0 -114
- package/node_modules/resolve/test/mock.js +0 -315
- package/node_modules/resolve/test/mock_sync.js +0 -214
- package/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +0 -1
- package/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +0 -1
- package/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +0 -1
- package/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +0 -3
- package/node_modules/resolve/test/module_dir.js +0 -56
- package/node_modules/resolve/test/node-modules-paths.js +0 -143
- package/node_modules/resolve/test/node_path/x/aaa/index.js +0 -1
- package/node_modules/resolve/test/node_path/x/ccc/index.js +0 -1
- package/node_modules/resolve/test/node_path/y/bbb/index.js +0 -1
- package/node_modules/resolve/test/node_path/y/ccc/index.js +0 -1
- package/node_modules/resolve/test/node_path.js +0 -70
- package/node_modules/resolve/test/nonstring.js +0 -9
- package/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
- package/node_modules/resolve/test/pathfilter.js +0 -75
- package/node_modules/resolve/test/precedence/aaa/index.js +0 -1
- package/node_modules/resolve/test/precedence/aaa/main.js +0 -1
- package/node_modules/resolve/test/precedence/aaa.js +0 -1
- package/node_modules/resolve/test/precedence/bbb/main.js +0 -1
- package/node_modules/resolve/test/precedence/bbb.js +0 -1
- package/node_modules/resolve/test/precedence.js +0 -23
- package/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- package/node_modules/resolve/test/resolver/baz/package.json +0 -4
- package/node_modules/resolve/test/resolver/baz/quux.js +0 -1
- package/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
- package/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
- package/node_modules/resolve/test/resolver/browser_field/package.json +0 -5
- package/node_modules/resolve/test/resolver/cup.coffee +0 -1
- package/node_modules/resolve/test/resolver/dot_main/index.js +0 -1
- package/node_modules/resolve/test/resolver/dot_main/package.json +0 -3
- package/node_modules/resolve/test/resolver/dot_slash_main/index.js +0 -1
- package/node_modules/resolve/test/resolver/dot_slash_main/package.json +0 -3
- package/node_modules/resolve/test/resolver/false_main/index.js +0 -0
- package/node_modules/resolve/test/resolver/false_main/package.json +0 -4
- package/node_modules/resolve/test/resolver/foo.js +0 -1
- package/node_modules/resolve/test/resolver/incorrect_main/index.js +0 -2
- package/node_modules/resolve/test/resolver/incorrect_main/package.json +0 -3
- package/node_modules/resolve/test/resolver/invalid_main/package.json +0 -7
- package/node_modules/resolve/test/resolver/mug.coffee +0 -0
- package/node_modules/resolve/test/resolver/mug.js +0 -0
- package/node_modules/resolve/test/resolver/multirepo/lerna.json +0 -6
- package/node_modules/resolve/test/resolver/multirepo/package.json +0 -20
- package/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +0 -35
- package/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +0 -14
- package/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
- package/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +0 -14
- package/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +0 -26
- package/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +0 -15
- package/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +0 -12
- package/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- package/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- package/node_modules/resolve/test/resolver/quux/foo/index.js +0 -1
- package/node_modules/resolve/test/resolver/same_names/foo/index.js +0 -1
- package/node_modules/resolve/test/resolver/same_names/foo.js +0 -1
- package/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
- package/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
- package/node_modules/resolve/test/resolver/symlinked/package/bar.js +0 -1
- package/node_modules/resolve/test/resolver/symlinked/package/package.json +0 -3
- package/node_modules/resolve/test/resolver/without_basedir/main.js +0 -5
- package/node_modules/resolve/test/resolver.js +0 -597
- package/node_modules/resolve/test/resolver_sync.js +0 -730
- package/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
- package/node_modules/resolve/test/shadowed_core.js +0 -54
- package/node_modules/resolve/test/subdirs.js +0 -13
- package/node_modules/resolve/test/symlinks.js +0 -176
- package/node_modules/shelljs/bin/shjs +0 -48
- package/node_modules/shelljs/node_modules/execa/index.js +0 -361
- package/node_modules/shelljs/node_modules/execa/lib/errname.js +0 -39
- package/node_modules/shelljs/node_modules/execa/lib/stdio.js +0 -41
- package/node_modules/shelljs/node_modules/execa/package.json +0 -69
- package/node_modules/shelljs/node_modules/execa/readme.md +0 -327
- package/node_modules/shelljs/node_modules/get-stream/buffer-stream.js +0 -51
- package/node_modules/shelljs/node_modules/get-stream/index.js +0 -50
- package/node_modules/shelljs/node_modules/is-stream/index.js +0 -21
- package/node_modules/shelljs/node_modules/is-stream/license +0 -21
- package/node_modules/shelljs/node_modules/is-stream/package.json +0 -38
- package/node_modules/shelljs/node_modules/is-stream/readme.md +0 -42
- package/node_modules/shelljs/node_modules/npm-run-path/index.js +0 -39
- package/node_modules/shelljs/node_modules/npm-run-path/license +0 -21
- package/node_modules/shelljs/node_modules/npm-run-path/package.json +0 -45
- package/node_modules/shelljs/node_modules/path-key/index.js +0 -13
- package/node_modules/shelljs/node_modules/path-key/license +0 -21
- package/node_modules/shelljs/node_modules/path-key/package.json +0 -39
- package/node_modules/shelljs/node_modules/semver/LICENSE +0 -15
- package/node_modules/shelljs/node_modules/semver/README.md +0 -412
- package/node_modules/shelljs/node_modules/semver/bin/semver +0 -160
- package/node_modules/shelljs/node_modules/semver/package.json +0 -38
- package/node_modules/shelljs/node_modules/semver/range.bnf +0 -16
- package/node_modules/shelljs/node_modules/semver/semver.js +0 -1525
- package/node_modules/shelljs/node_modules/shebang-command/index.js +0 -19
- package/node_modules/shelljs/node_modules/shebang-command/license +0 -21
- package/node_modules/shelljs/node_modules/shebang-command/package.json +0 -39
- package/node_modules/shelljs/node_modules/shebang-regex/index.js +0 -2
- package/node_modules/shelljs/node_modules/shebang-regex/license +0 -21
- package/node_modules/shelljs/node_modules/shebang-regex/package.json +0 -32
- package/node_modules/shelljs/node_modules/shebang-regex/readme.md +0 -29
- package/node_modules/shelljs/node_modules/which/LICENSE +0 -15
- package/node_modules/shelljs/node_modules/which/package.json +0 -30
- package/node_modules/shelljs/node_modules/which/which.js +0 -135
- package/node_modules/strip-eof/index.js +0 -15
- package/node_modules/strip-eof/license +0 -21
- package/node_modules/strip-eof/package.json +0 -39
- package/node_modules/strip-eof/readme.md +0 -28
- package/node_modules/supports-preserve-symlinks-flag/.eslintrc +0 -14
- package/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +0 -12
- package/node_modules/supports-preserve-symlinks-flag/.nycrc +0 -9
- package/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +0 -22
- package/node_modules/supports-preserve-symlinks-flag/LICENSE +0 -21
- package/node_modules/supports-preserve-symlinks-flag/README.md +0 -42
- package/node_modules/supports-preserve-symlinks-flag/browser.js +0 -3
- package/node_modules/supports-preserve-symlinks-flag/index.js +0 -9
- package/node_modules/supports-preserve-symlinks-flag/package.json +0 -70
- package/node_modules/supports-preserve-symlinks-flag/test/index.js +0 -29
- package/node_modules/wrappy/LICENSE +0 -15
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -29
- package/node_modules/wrappy/wrappy.js +0 -33
- /package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/LICENSE +0 -0
- /package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/index.js +0 -0
- /package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/lib/util/escape.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/LICENSE +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/README.md +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/index.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/lib/constants.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/lib/parse.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/lib/picomatch.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/lib/scan.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/lib/utils.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/package.json +0 -0
- /package/node_modules/{shelljs/node_modules/execa → mimic-fn}/license +0 -0
- /package/node_modules/{shelljs/node_modules/get-stream → npm-run-path}/license +0 -0
- /package/node_modules/{once → which}/LICENSE +0 -0
- /package/node_modules/{shelljs/node_modules/which/bin/which → which/bin/node-which} +0 -0
|
@@ -277,6 +277,11 @@ const parseComparator = (comp, options) => {
|
|
|
277
277
|
|
|
278
278
|
const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
|
|
279
279
|
|
|
280
|
+
const invalidXRangeOrder = (M, m, p) => (
|
|
281
|
+
(isX(M) && !isX(m)) ||
|
|
282
|
+
(isX(m) && p && !isX(p))
|
|
283
|
+
)
|
|
284
|
+
|
|
280
285
|
// ~, ~> --> * (any, kinda silly)
|
|
281
286
|
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
|
|
282
287
|
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
|
|
@@ -402,6 +407,10 @@ const replaceXRange = (comp, options) => {
|
|
|
402
407
|
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
|
|
403
408
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
404
409
|
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
|
410
|
+
if (invalidXRangeOrder(M, m, p)) {
|
|
411
|
+
return comp
|
|
412
|
+
}
|
|
413
|
+
|
|
405
414
|
const xM = isX(M)
|
|
406
415
|
const xm = xM || isX(m)
|
|
407
416
|
const xp = xm || isX(p)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const shebangRegex = require('shebang-regex');
|
|
3
|
+
|
|
4
|
+
module.exports = (string = '') => {
|
|
5
|
+
const match = string.match(shebangRegex);
|
|
6
|
+
|
|
7
|
+
if (!match) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const [path, argument] = match[0].replace(/#! ?/, '').split(' ');
|
|
12
|
+
const binary = path.split('/').pop();
|
|
13
|
+
|
|
14
|
+
if (binary === 'env') {
|
|
15
|
+
return argument;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return argument ? `${binary} ${argument}` : binary;
|
|
19
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> (github.com/kevva)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "shebang-command",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Get the command from a shebang",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "kevva/shebang-command",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Kevin Mårtensson",
|
|
9
|
+
"email": "kevinmartensson@gmail.com",
|
|
10
|
+
"url": "github.com/kevva"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=8"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "xo && ava"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.js"
|
|
20
|
+
],
|
|
21
|
+
"keywords": [
|
|
22
|
+
"cmd",
|
|
23
|
+
"command",
|
|
24
|
+
"parse",
|
|
25
|
+
"shebang"
|
|
26
|
+
],
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"shebang-regex": "^3.0.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"ava": "^2.3.0",
|
|
32
|
+
"xo": "^0.24.0"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
8
8
|
```
|
|
9
|
-
$ npm install
|
|
9
|
+
$ npm install shebang-command
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
|
|
@@ -32,8 +32,3 @@ shebangCommand('#!/bin/bash');
|
|
|
32
32
|
Type: `string`
|
|
33
33
|
|
|
34
34
|
String containing a shebang.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## License
|
|
38
|
-
|
|
39
|
-
MIT © [Kevin Martensson](http://github.com/kevva)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line.
|
|
3
|
+
|
|
4
|
+
@example
|
|
5
|
+
```
|
|
6
|
+
import shebangRegex = require('shebang-regex');
|
|
7
|
+
|
|
8
|
+
const string = '#!/usr/bin/env node\nconsole.log("unicorns");';
|
|
9
|
+
|
|
10
|
+
shebangRegex.test(string);
|
|
11
|
+
//=> true
|
|
12
|
+
|
|
13
|
+
shebangRegex.exec(string)[0];
|
|
14
|
+
//=> '#!/usr/bin/env node'
|
|
15
|
+
|
|
16
|
+
shebangRegex.exec(string)[1];
|
|
17
|
+
//=> '/usr/bin/env node'
|
|
18
|
+
```
|
|
19
|
+
*/
|
|
20
|
+
declare const shebangRegex: RegExp;
|
|
21
|
+
|
|
22
|
+
export = shebangRegex;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "shebang-regex",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Regular expression for matching a shebang line",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/shebang-regex",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Sindre Sorhus",
|
|
9
|
+
"email": "sindresorhus@gmail.com",
|
|
10
|
+
"url": "sindresorhus.com"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=8"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "xo && ava && tsd"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.js",
|
|
20
|
+
"index.d.ts"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"regex",
|
|
24
|
+
"regexp",
|
|
25
|
+
"shebang",
|
|
26
|
+
"match",
|
|
27
|
+
"test",
|
|
28
|
+
"line"
|
|
29
|
+
],
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"ava": "^1.4.1",
|
|
32
|
+
"tsd": "^0.7.2",
|
|
33
|
+
"xo": "^0.24.0"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# shebang-regex [](https://travis-ci.org/sindresorhus/shebang-regex)
|
|
2
|
+
|
|
3
|
+
> Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
$ npm install shebang-regex
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
const shebangRegex = require('shebang-regex');
|
|
17
|
+
|
|
18
|
+
const string = '#!/usr/bin/env node\nconsole.log("unicorns");';
|
|
19
|
+
|
|
20
|
+
shebangRegex.test(string);
|
|
21
|
+
//=> true
|
|
22
|
+
|
|
23
|
+
shebangRegex.exec(string)[0];
|
|
24
|
+
//=> '#!/usr/bin/env node'
|
|
25
|
+
|
|
26
|
+
shebangRegex.exec(string)[1];
|
|
27
|
+
//=> '/usr/bin/env node'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## License
|
|
32
|
+
|
|
33
|
+
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# ShellJS - Unix shell commands for Node.js
|
|
2
2
|
|
|
3
3
|
[](https://github.com/shelljs/shelljs/actions/workflows/main.yml)
|
|
4
|
-
[](https://codecov.io/gh/shelljs/shelljs)
|
|
5
5
|
[](https://www.npmjs.com/package/shelljs)
|
|
6
6
|
[](https://www.npmjs.com/package/shelljs)
|
|
7
7
|
|
|
@@ -419,12 +419,18 @@ Available options:
|
|
|
419
419
|
+ `-l`: Print only filenames of matching files.
|
|
420
420
|
+ `-i`: Ignore case.
|
|
421
421
|
+ `-n`: Print line numbers.
|
|
422
|
+
+ `-B <num>`: Show `<num>` lines before each result.
|
|
423
|
+
+ `-A <num>`: Show `<num>` lines after each result.
|
|
424
|
+
+ `-C <num>`: Show `<num>` lines before and after each result. -B and -A override this option.
|
|
422
425
|
|
|
423
426
|
Examples:
|
|
424
427
|
|
|
425
428
|
```javascript
|
|
426
429
|
grep('-v', 'GLOBAL_VARIABLE', '*.js');
|
|
427
430
|
grep('GLOBAL_VARIABLE', '*.js');
|
|
431
|
+
grep('-B', 3, 'GLOBAL_VARIABLE', '*.js');
|
|
432
|
+
grep({ '-B': 3 }, 'GLOBAL_VARIABLE', '*.js');
|
|
433
|
+
grep({ '-B': 3, '-C': 2 }, 'GLOBAL_VARIABLE', '*.js');
|
|
428
434
|
```
|
|
429
435
|
|
|
430
436
|
Reads input string from given files and returns a
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/* eslint no-extend-native: 0 */
|
|
2
|
-
var shell = require('./shell
|
|
2
|
+
var shell = require('./shell');
|
|
3
3
|
var common = require('./src/common');
|
|
4
|
+
|
|
4
5
|
Object.keys(shell).forEach(function (cmd) {
|
|
5
6
|
global[cmd] = shell[cmd];
|
|
6
7
|
});
|
|
7
8
|
|
|
8
9
|
var _to = require('./src/to');
|
|
10
|
+
|
|
9
11
|
String.prototype.to = common.wrap('to', _to);
|
|
10
12
|
|
|
11
13
|
var _toEnd = require('./src/toEnd');
|
|
14
|
+
|
|
12
15
|
String.prototype.toEnd = common.wrap('toEnd', _toEnd);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shelljs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Portable Unix shell commands for Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shelljs",
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"make.js",
|
|
40
40
|
"plugin.js",
|
|
41
41
|
"shell.js",
|
|
42
|
-
"bin",
|
|
43
42
|
"src"
|
|
44
43
|
],
|
|
45
44
|
"scripts": {
|
|
@@ -55,17 +54,13 @@
|
|
|
55
54
|
"release:minor": "shelljs-release minor",
|
|
56
55
|
"release:patch": "shelljs-release patch"
|
|
57
56
|
},
|
|
58
|
-
"bin": {
|
|
59
|
-
"shjs": "./bin/shjs"
|
|
60
|
-
},
|
|
61
57
|
"dependencies": {
|
|
62
|
-
"execa": "^1.
|
|
63
|
-
"fast-glob": "^3.3.2"
|
|
64
|
-
"interpret": "^1.0.0",
|
|
65
|
-
"rechoir": "^0.6.2"
|
|
58
|
+
"execa": "^5.1.1",
|
|
59
|
+
"fast-glob": "^3.3.2"
|
|
66
60
|
},
|
|
67
61
|
"ava": {
|
|
68
62
|
"serial": true,
|
|
63
|
+
"workerThreads": false,
|
|
69
64
|
"powerAssert": false,
|
|
70
65
|
"files": [
|
|
71
66
|
"test/*.js"
|
|
@@ -76,7 +71,7 @@
|
|
|
76
71
|
]
|
|
77
72
|
},
|
|
78
73
|
"devDependencies": {
|
|
79
|
-
"ava": "^2.
|
|
74
|
+
"ava": "^6.2.0",
|
|
80
75
|
"chalk": "^4.1.2",
|
|
81
76
|
"coffee-script": "^1.12.7",
|
|
82
77
|
"eslint": "^8.2.0",
|
|
@@ -85,9 +80,9 @@
|
|
|
85
80
|
"js-yaml": "^4.1.0",
|
|
86
81
|
"nyc": "^17.1.0",
|
|
87
82
|
"shelljs-changelog": "^0.2.6",
|
|
88
|
-
"shelljs-release": "^0.5.
|
|
89
|
-
"shx": "^0.
|
|
90
|
-
"travis-check-changes": "^0.
|
|
83
|
+
"shelljs-release": "^0.5.3",
|
|
84
|
+
"shx": "^0.4.0",
|
|
85
|
+
"travis-check-changes": "^0.5.1"
|
|
91
86
|
},
|
|
92
87
|
"engines": {
|
|
93
88
|
"node": ">=18"
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
var common = require('./src/common');
|
|
10
10
|
|
|
11
|
+
module.exports = common.shell;
|
|
12
|
+
|
|
11
13
|
//@
|
|
12
14
|
//@ All commands run synchronously, unless otherwise stated.
|
|
13
15
|
//@ All commands accept standard bash globbing characters (`*`, `?`, etc.),
|
|
@@ -58,13 +60,13 @@ require('./src/which');
|
|
|
58
60
|
//@ ### exit(code)
|
|
59
61
|
//@
|
|
60
62
|
//@ Exits the current process with the given exit `code`.
|
|
61
|
-
exports.exit = function exit(code) {
|
|
63
|
+
module.exports.exit = function exit(code) {
|
|
62
64
|
common.state.error = null;
|
|
63
65
|
common.state.errorCode = 0;
|
|
64
66
|
if (code) {
|
|
65
67
|
common.error('exit', {
|
|
66
68
|
continue: true,
|
|
67
|
-
code
|
|
69
|
+
code,
|
|
68
70
|
prefix: '',
|
|
69
71
|
silent: true,
|
|
70
72
|
fatal: false,
|
|
@@ -76,20 +78,20 @@ exports.exit = function exit(code) {
|
|
|
76
78
|
};
|
|
77
79
|
|
|
78
80
|
//@include ./src/error.js
|
|
79
|
-
exports.error = require('./src/error');
|
|
81
|
+
module.exports.error = require('./src/error');
|
|
80
82
|
|
|
81
83
|
//@include ./src/errorCode.js
|
|
82
|
-
exports.errorCode = require('./src/errorCode');
|
|
84
|
+
module.exports.errorCode = require('./src/errorCode');
|
|
83
85
|
|
|
84
86
|
//@include ./src/common.js
|
|
85
|
-
exports.ShellString = common.ShellString;
|
|
87
|
+
module.exports.ShellString = common.ShellString;
|
|
86
88
|
|
|
87
89
|
//@
|
|
88
90
|
//@ ### env['VAR_NAME']
|
|
89
91
|
//@
|
|
90
92
|
//@ Object containing environment variables (both getter and setter). Shortcut
|
|
91
93
|
//@ to `process.env`.
|
|
92
|
-
exports.env = process.env;
|
|
94
|
+
module.exports.env = process.env;
|
|
93
95
|
|
|
94
96
|
//@
|
|
95
97
|
//@ ### Pipes
|
|
@@ -110,7 +112,7 @@ exports.env = process.env;
|
|
|
110
112
|
//@ ## Configuration
|
|
111
113
|
//@
|
|
112
114
|
|
|
113
|
-
exports.config = common.config;
|
|
115
|
+
module.exports.config = common.config;
|
|
114
116
|
|
|
115
117
|
//@
|
|
116
118
|
//@ ### config.silent
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var common = require('./common');
|
|
2
1
|
var execa = require('execa');
|
|
2
|
+
var common = require('./common');
|
|
3
3
|
|
|
4
4
|
var DEFAULT_MAXBUFFER_SIZE = 20 * 1024 * 1024;
|
|
5
5
|
var COMMAND_NOT_FOUND_ERROR_CODE = 127;
|
|
@@ -11,14 +11,22 @@ common.register('cmd', _cmd, {
|
|
|
11
11
|
wrapOutput: true,
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
function
|
|
14
|
+
function isCommandNotFound(execaResult) {
|
|
15
15
|
if (process.platform === 'win32') {
|
|
16
16
|
var str = 'is not recognized as an internal or external command';
|
|
17
|
-
return execaResult.
|
|
18
|
-
} else {
|
|
19
|
-
return execaResult.code &&
|
|
20
|
-
execaResult.stdout === null && execaResult.stderr === null;
|
|
17
|
+
return execaResult.exitCode && execaResult.stderr.includes(str);
|
|
21
18
|
}
|
|
19
|
+
return execaResult.failed && execaResult.code === 'ENOENT';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function isExecaInternalError(result) {
|
|
23
|
+
if (typeof result.stdout !== 'string') return true;
|
|
24
|
+
if (typeof result.stderr !== 'string') return true;
|
|
25
|
+
if (typeof result.exitCode !== 'number') return true;
|
|
26
|
+
if (result.exitCode === 0 && result.failed) return true;
|
|
27
|
+
// Otherwise assume this executed correctly. The command may still have exited
|
|
28
|
+
// with non-zero status, but that's not due to anything execa did.
|
|
29
|
+
return false;
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
//@
|
|
@@ -85,7 +93,7 @@ function _cmd(options, command, commandArgs, userOptions) {
|
|
|
85
93
|
// by the user.
|
|
86
94
|
var defaultOptions = {
|
|
87
95
|
maxBuffer: DEFAULT_MAXBUFFER_SIZE,
|
|
88
|
-
|
|
96
|
+
stripFinalNewline: false, // Preserve trailing newlines for consistency with unix.
|
|
89
97
|
reject: false, // Use ShellJS's error handling system.
|
|
90
98
|
};
|
|
91
99
|
|
|
@@ -103,16 +111,24 @@ function _cmd(options, command, commandArgs, userOptions) {
|
|
|
103
111
|
var stdout;
|
|
104
112
|
var stderr;
|
|
105
113
|
var code;
|
|
106
|
-
if (
|
|
114
|
+
if (isCommandNotFound(result)) {
|
|
107
115
|
// This can happen if `command` is not an executable binary, or possibly
|
|
108
116
|
// under other conditions.
|
|
109
117
|
stdout = '';
|
|
110
118
|
stderr = "'" + command + "': command not found";
|
|
111
119
|
code = COMMAND_NOT_FOUND_ERROR_CODE;
|
|
120
|
+
} else if (isExecaInternalError(result)) {
|
|
121
|
+
// Catch-all: execa tried to run `command` but it encountered some error
|
|
122
|
+
// (ex. maxBuffer, timeout).
|
|
123
|
+
stdout = result.stdout || '';
|
|
124
|
+
stderr = result.stderr ||
|
|
125
|
+
`'${command}' encountered an error during execution`;
|
|
126
|
+
code = result.exitCode !== undefined && result.exitCode > 0 ? result.exitCode : 1;
|
|
112
127
|
} else {
|
|
128
|
+
// Normal exit: execa was able to execute `command` and get a return value.
|
|
113
129
|
stdout = result.stdout.toString();
|
|
114
130
|
stderr = result.stderr.toString();
|
|
115
|
-
code = result.
|
|
131
|
+
code = result.exitCode;
|
|
116
132
|
}
|
|
117
133
|
|
|
118
134
|
// Pass `continue: true` so we can specify a value for stdout.
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
var os = require('os');
|
|
8
8
|
var fs = require('fs');
|
|
9
9
|
var glob = require('fast-glob');
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
var shell = {};
|
|
12
|
+
exports.shell = shell;
|
|
11
13
|
|
|
12
14
|
var shellMethods = Object.create(shell);
|
|
13
15
|
|
|
@@ -29,13 +31,13 @@ var DEFAULT_CONFIG = {
|
|
|
29
31
|
};
|
|
30
32
|
|
|
31
33
|
var config = {
|
|
32
|
-
reset
|
|
34
|
+
reset() {
|
|
33
35
|
Object.assign(this, DEFAULT_CONFIG);
|
|
34
36
|
if (!isElectron) {
|
|
35
37
|
this.execPath = process.execPath;
|
|
36
38
|
}
|
|
37
39
|
},
|
|
38
|
-
resetForTesting
|
|
40
|
+
resetForTesting() {
|
|
39
41
|
this.reset();
|
|
40
42
|
this.silent = true;
|
|
41
43
|
},
|
|
@@ -81,11 +83,12 @@ exports.convertErrorOutput = convertErrorOutput;
|
|
|
81
83
|
|
|
82
84
|
// An exception class to help propagate command errors (e.g., non-zero exit
|
|
83
85
|
// status) up to the top-level. {@param value} should be a ShellString.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
class CommandError extends Error {
|
|
87
|
+
constructor(value) {
|
|
88
|
+
super(value.toString());
|
|
89
|
+
this.returnValue = value;
|
|
90
|
+
}
|
|
86
91
|
}
|
|
87
|
-
CommandError.prototype = Object.create(Error.prototype);
|
|
88
|
-
CommandError.prototype.constructor = CommandError;
|
|
89
92
|
exports.CommandError = CommandError; // visible for testing
|
|
90
93
|
|
|
91
94
|
// Shows error message. Throws if fatal is true (defaults to config.fatal, overridable with options.fatal)
|
|
@@ -188,7 +191,7 @@ function parseOptions(opt, map, errorOptions) {
|
|
|
188
191
|
throw new TypeError('parseOptions() internal error: map must be an object');
|
|
189
192
|
} else if (!isObject(errorOptions)) {
|
|
190
193
|
throw new TypeError(
|
|
191
|
-
'parseOptions() internal error: errorOptions must be object'
|
|
194
|
+
'parseOptions() internal error: errorOptions must be object',
|
|
192
195
|
);
|
|
193
196
|
}
|
|
194
197
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var common = require('./common');
|
|
2
|
-
var _tempDir = require('./tempdir').tempDir;
|
|
3
|
-
var _pwd = require('./pwd');
|
|
4
1
|
var path = require('path');
|
|
5
2
|
var fs = require('fs');
|
|
6
3
|
var child = require('child_process');
|
|
4
|
+
var common = require('./common');
|
|
5
|
+
var _tempDir = require('./tempdir').tempDir;
|
|
6
|
+
var _pwd = require('./pwd');
|
|
7
7
|
|
|
8
8
|
var DEFAULT_MAXBUFFER_SIZE = 20 * 1024 * 1024;
|
|
9
9
|
var DEFAULT_ERROR_CODE = 1;
|
|
@@ -53,9 +53,9 @@ function execSync(cmd, opts, pipe) {
|
|
|
53
53
|
var paramsToSerialize = {
|
|
54
54
|
command: cmd,
|
|
55
55
|
execOptions: opts,
|
|
56
|
-
pipe
|
|
57
|
-
stdoutFile
|
|
58
|
-
stderrFile
|
|
56
|
+
pipe,
|
|
57
|
+
stdoutFile,
|
|
58
|
+
stderrFile,
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
// Create the files and ensure these are locked down (for read and write) to
|