projen 0.99.71 → 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 +3 -3
- 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 +11 -2
- package/node_modules/semver/package.json +2 -2
- 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 +5 -2
- 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
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
'^([0-9][0-9][0-9][0-9])'
|
|
7
|
-
'-([0-9][0-9])'
|
|
8
|
-
'-([0-9][0-9])$')
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
'^([0-9][0-9][0-9][0-9])'
|
|
12
|
-
'-([0-9][0-9]?)'
|
|
13
|
-
'-([0-9][0-9]?)'
|
|
14
|
-
'(?:[Tt]|[ \\t]+)'
|
|
15
|
-
'([0-9][0-9]?)'
|
|
16
|
-
':([0-9][0-9])'
|
|
17
|
-
':([0-9][0-9])'
|
|
18
|
-
'(?:\\.([0-9]*))?'
|
|
19
|
-
'(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10]
|
|
20
|
-
'(?::([0-9][0-9]))?))?$')
|
|
21
|
-
|
|
22
|
-
function resolveYamlTimestamp(data) {
|
|
23
|
-
if (data === null) return false
|
|
24
|
-
if (YAML_DATE_REGEXP.exec(data) !== null) return true
|
|
25
|
-
if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true
|
|
26
|
-
return false
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const Type = require('../type')
|
|
4
|
+
|
|
5
|
+
const YAML_DATE_REGEXP = new RegExp(
|
|
6
|
+
'^([0-9][0-9][0-9][0-9])' + // [1] year
|
|
7
|
+
'-([0-9][0-9])' + // [2] month
|
|
8
|
+
'-([0-9][0-9])$') // [3] day
|
|
9
|
+
|
|
10
|
+
const YAML_TIMESTAMP_REGEXP = new RegExp(
|
|
11
|
+
'^([0-9][0-9][0-9][0-9])' + // [1] year
|
|
12
|
+
'-([0-9][0-9]?)' + // [2] month
|
|
13
|
+
'-([0-9][0-9]?)' + // [3] day
|
|
14
|
+
'(?:[Tt]|[ \\t]+)' + // ...
|
|
15
|
+
'([0-9][0-9]?)' + // [4] hour
|
|
16
|
+
':([0-9][0-9])' + // [5] minute
|
|
17
|
+
':([0-9][0-9])' + // [6] second
|
|
18
|
+
'(?:\\.([0-9]*))?' + // [7] fraction
|
|
19
|
+
'(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tzHour
|
|
20
|
+
'(?::([0-9][0-9]))?))?$') // [11] tzMinute
|
|
21
|
+
|
|
22
|
+
function resolveYamlTimestamp (data) {
|
|
23
|
+
if (data === null) return false
|
|
24
|
+
if (YAML_DATE_REGEXP.exec(data) !== null) return true
|
|
25
|
+
if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true
|
|
26
|
+
return false
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function constructYamlTimestamp(data) {
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
function constructYamlTimestamp (data) {
|
|
30
|
+
let fraction = 0
|
|
31
|
+
let delta = null
|
|
32
32
|
|
|
33
|
-
match = YAML_DATE_REGEXP.exec(data)
|
|
34
|
-
if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data)
|
|
33
|
+
let match = YAML_DATE_REGEXP.exec(data)
|
|
34
|
+
if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data)
|
|
35
35
|
|
|
36
|
-
if (match === null) throw new Error('Date resolve error')
|
|
36
|
+
if (match === null) throw new Error('Date resolve error')
|
|
37
37
|
|
|
38
38
|
// match: [1] year [2] month [3] day
|
|
39
39
|
|
|
40
|
-
year = +(match[1])
|
|
41
|
-
month = +(match[2]) - 1
|
|
42
|
-
day = +(match[3])
|
|
40
|
+
const year = +(match[1])
|
|
41
|
+
const month = +(match[2]) - 1 // JS month starts with 0
|
|
42
|
+
const day = +(match[3])
|
|
43
43
|
|
|
44
44
|
if (!match[4]) { // no hour
|
|
45
|
-
return new Date(Date.UTC(year, month, day))
|
|
45
|
+
return new Date(Date.UTC(year, month, day))
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
// match: [4] hour [5] minute [6] second [7] fraction
|
|
49
49
|
|
|
50
|
-
hour = +(match[4])
|
|
51
|
-
minute = +(match[5])
|
|
52
|
-
second = +(match[6])
|
|
50
|
+
const hour = +(match[4])
|
|
51
|
+
const minute = +(match[5])
|
|
52
|
+
const second = +(match[6])
|
|
53
53
|
|
|
54
54
|
if (match[7]) {
|
|
55
|
-
fraction = match[7].slice(0, 3)
|
|
55
|
+
fraction = match[7].slice(0, 3)
|
|
56
56
|
while (fraction.length < 3) { // milli-seconds
|
|
57
|
-
fraction += '0'
|
|
57
|
+
fraction += '0'
|
|
58
58
|
}
|
|
59
|
-
fraction = +fraction
|
|
59
|
+
fraction = +fraction
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
// match: [8] tz [9] tz_sign [10]
|
|
62
|
+
// match: [8] tz [9] tz_sign [10] tzHour [11] tzMinute
|
|
63
63
|
|
|
64
64
|
if (match[9]) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
delta = (
|
|
68
|
-
if (match[9] === '-') delta = -delta
|
|
65
|
+
const tzHour = +(match[10])
|
|
66
|
+
const tzMinute = +(match[11] || 0)
|
|
67
|
+
delta = (tzHour * 60 + tzMinute) * 60000 // delta in mili-seconds
|
|
68
|
+
if (match[9] === '-') delta = -delta
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction))
|
|
71
|
+
const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction))
|
|
72
72
|
|
|
73
|
-
if (delta) date.setTime(date.getTime() - delta)
|
|
73
|
+
if (delta) date.setTime(date.getTime() - delta)
|
|
74
74
|
|
|
75
|
-
return date
|
|
75
|
+
return date
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
function representYamlTimestamp(object /*, style*/) {
|
|
79
|
-
return object.toISOString()
|
|
78
|
+
function representYamlTimestamp (object /*, style */) {
|
|
79
|
+
return object.toISOString()
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
module.exports = new Type('tag:yaml.org,2002:timestamp', {
|
|
@@ -85,4 +85,4 @@ module.exports = new Type('tag:yaml.org,2002:timestamp', {
|
|
|
85
85
|
construct: constructYamlTimestamp,
|
|
86
86
|
instanceOf: Date,
|
|
87
87
|
represent: representYamlTimestamp
|
|
88
|
-
})
|
|
88
|
+
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const YAMLException = require('./exception')
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const TYPE_CONSTRUCTOR_OPTIONS = [
|
|
6
6
|
'kind',
|
|
7
7
|
'multi',
|
|
8
8
|
'resolve',
|
|
@@ -13,54 +13,54 @@ var TYPE_CONSTRUCTOR_OPTIONS = [
|
|
|
13
13
|
'representName',
|
|
14
14
|
'defaultStyle',
|
|
15
15
|
'styleAliases'
|
|
16
|
-
]
|
|
16
|
+
]
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const YAML_NODE_KINDS = [
|
|
19
19
|
'scalar',
|
|
20
20
|
'sequence',
|
|
21
21
|
'mapping'
|
|
22
|
-
]
|
|
22
|
+
]
|
|
23
23
|
|
|
24
|
-
function compileStyleAliases(map) {
|
|
25
|
-
|
|
24
|
+
function compileStyleAliases (map) {
|
|
25
|
+
const result = {}
|
|
26
26
|
|
|
27
27
|
if (map !== null) {
|
|
28
28
|
Object.keys(map).forEach(function (style) {
|
|
29
29
|
map[style].forEach(function (alias) {
|
|
30
|
-
result[String(alias)] = style
|
|
31
|
-
})
|
|
32
|
-
})
|
|
30
|
+
result[String(alias)] = style
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
return result
|
|
35
|
+
return result
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function Type(tag, options) {
|
|
39
|
-
options = options || {}
|
|
38
|
+
function Type (tag, options) {
|
|
39
|
+
options = options || {}
|
|
40
40
|
|
|
41
41
|
Object.keys(options).forEach(function (name) {
|
|
42
42
|
if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
|
|
43
|
-
throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.')
|
|
43
|
+
throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.')
|
|
44
44
|
}
|
|
45
|
-
})
|
|
45
|
+
})
|
|
46
46
|
|
|
47
47
|
// TODO: Add tag format check.
|
|
48
|
-
this.options
|
|
49
|
-
this.tag
|
|
50
|
-
this.kind
|
|
51
|
-
this.resolve
|
|
52
|
-
this.construct
|
|
53
|
-
this.instanceOf
|
|
54
|
-
this.predicate
|
|
55
|
-
this.represent
|
|
56
|
-
this.representName = options['representName'] || null
|
|
57
|
-
this.defaultStyle
|
|
58
|
-
this.multi
|
|
59
|
-
this.styleAliases
|
|
48
|
+
this.options = options // keep original options in case user wants to extend this type later
|
|
49
|
+
this.tag = tag
|
|
50
|
+
this.kind = options['kind'] || null
|
|
51
|
+
this.resolve = options['resolve'] || function () { return true }
|
|
52
|
+
this.construct = options['construct'] || function (data) { return data }
|
|
53
|
+
this.instanceOf = options['instanceOf'] || null
|
|
54
|
+
this.predicate = options['predicate'] || null
|
|
55
|
+
this.represent = options['represent'] || null
|
|
56
|
+
this.representName = options['representName'] || null
|
|
57
|
+
this.defaultStyle = options['defaultStyle'] || null
|
|
58
|
+
this.multi = options['multi'] || false
|
|
59
|
+
this.styleAliases = compileStyleAliases(options['styleAliases'] || null)
|
|
60
60
|
|
|
61
61
|
if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
|
|
62
|
-
throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.')
|
|
62
|
+
throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.')
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
module.exports = Type
|
|
66
|
+
module.exports = Type
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js-yaml",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "YAML 1.2 parser and serializer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yaml",
|
|
@@ -16,6 +16,16 @@
|
|
|
16
16
|
],
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"repository": "nodeca/js-yaml",
|
|
19
|
+
"funding": [
|
|
20
|
+
{
|
|
21
|
+
"type": "github",
|
|
22
|
+
"url": "https://github.com/sponsors/puzrin"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "github",
|
|
26
|
+
"url": "https://github.com/sponsors/nodeca"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
19
29
|
"files": [
|
|
20
30
|
"index.js",
|
|
21
31
|
"lib/",
|
|
@@ -35,12 +45,16 @@
|
|
|
35
45
|
},
|
|
36
46
|
"scripts": {
|
|
37
47
|
"lint": "eslint .",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
48
|
+
"lint-fix": "eslint . --fix",
|
|
49
|
+
"test": "npm run lint && npm run test:core && npm run test:build",
|
|
50
|
+
"test:core": "node --test test/core/*.test.*",
|
|
51
|
+
"test:build": "npm run build && node --test test/build/*.test.*",
|
|
52
|
+
"coverage": "npm run build && c8 --include 'lib/**' -r text -r html -r lcov node --test test/core/*.test.*",
|
|
53
|
+
"build": "node support/build-dist.mjs",
|
|
54
|
+
"build:demo": "npm run lint && node support/build_demo.mjs",
|
|
55
|
+
"gh-demo": "npm run build:demo && gh-pages -d demo -f",
|
|
56
|
+
"prepack": "npm test && npm run build && npm run build:demo",
|
|
57
|
+
"postpublish": "npm run gh-demo"
|
|
44
58
|
},
|
|
45
59
|
"unpkg": "dist/js-yaml.min.js",
|
|
46
60
|
"jsdelivr": "dist/js-yaml.min.js",
|
|
@@ -48,19 +62,16 @@
|
|
|
48
62
|
"argparse": "^2.0.1"
|
|
49
63
|
},
|
|
50
64
|
"devDependencies": {
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
63
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
64
|
-
"shelljs": "^0.8.4"
|
|
65
|
+
"c8": "^11.0.0",
|
|
66
|
+
"codemirror": "^5.65.21",
|
|
67
|
+
"eslint": "^9.39.4",
|
|
68
|
+
"fast-check": "^4.8.0",
|
|
69
|
+
"gh-pages": "^6.3.0",
|
|
70
|
+
"neostandard": "^0.13.0",
|
|
71
|
+
"tinybench": "^6.0.2",
|
|
72
|
+
"vite": "^8.0.14",
|
|
73
|
+
"vite-plugin-node-polyfills": "^0.28.0",
|
|
74
|
+
"vite-plugin-singlefile": "^2.3.3",
|
|
75
|
+
"workerpool": "^10.0.2"
|
|
65
76
|
}
|
|
66
77
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) Stephen Sugden <me@stephensugden.com> (stephensugden.com)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# merge-stream
|
|
2
|
+
|
|
3
|
+
Merge (interleave) a bunch of streams.
|
|
4
|
+
|
|
5
|
+
[](http://travis-ci.org/grncdr/merge-stream)
|
|
6
|
+
|
|
7
|
+
## Synopsis
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
var stream1 = new Stream();
|
|
11
|
+
var stream2 = new Stream();
|
|
12
|
+
|
|
13
|
+
var merged = mergeStream(stream1, stream2);
|
|
14
|
+
|
|
15
|
+
var stream3 = new Stream();
|
|
16
|
+
merged.add(stream3);
|
|
17
|
+
merged.isEmpty();
|
|
18
|
+
//=> false
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Description
|
|
22
|
+
|
|
23
|
+
This is adapted from [event-stream](https://github.com/dominictarr/event-stream) separated into a new module, using Streams3.
|
|
24
|
+
|
|
25
|
+
## API
|
|
26
|
+
|
|
27
|
+
### `mergeStream`
|
|
28
|
+
|
|
29
|
+
Type: `function`
|
|
30
|
+
|
|
31
|
+
Merges an arbitrary number of streams. Returns a merged stream.
|
|
32
|
+
|
|
33
|
+
#### `merged.add`
|
|
34
|
+
|
|
35
|
+
A method to dynamically add more sources to the stream. The argument supplied to `add` can be either a source or an array of sources.
|
|
36
|
+
|
|
37
|
+
#### `merged.isEmpty`
|
|
38
|
+
|
|
39
|
+
A method that tells you if the merged stream is empty.
|
|
40
|
+
|
|
41
|
+
When a stream is "empty" (aka. no sources were added), it could not be returned to a gulp task.
|
|
42
|
+
|
|
43
|
+
So, we could do something like this:
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
stream = require('merge-stream')();
|
|
47
|
+
// Something like a loop to add some streams to the merge stream
|
|
48
|
+
// stream.add(streamA);
|
|
49
|
+
// stream.add(streamB);
|
|
50
|
+
return stream.isEmpty() ? null : stream;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Gulp example
|
|
54
|
+
|
|
55
|
+
An example use case for **merge-stream** is to combine parts of a task in a project's **gulpfile.js** like this:
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
const gulp = require('gulp');
|
|
59
|
+
const htmlValidator = require('gulp-w3c-html-validator');
|
|
60
|
+
const jsHint = require('gulp-jshint');
|
|
61
|
+
const mergeStream = require('merge-stream');
|
|
62
|
+
|
|
63
|
+
function lint() {
|
|
64
|
+
return mergeStream(
|
|
65
|
+
gulp.src('src/*.html')
|
|
66
|
+
.pipe(htmlValidator())
|
|
67
|
+
.pipe(htmlValidator.reporter()),
|
|
68
|
+
gulp.src('src/*.js')
|
|
69
|
+
.pipe(jsHint())
|
|
70
|
+
.pipe(jsHint.reporter())
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
gulp.task('lint', lint);
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## License
|
|
77
|
+
|
|
78
|
+
MIT
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { PassThrough } = require('stream');
|
|
4
|
+
|
|
5
|
+
module.exports = function (/*streams...*/) {
|
|
6
|
+
var sources = []
|
|
7
|
+
var output = new PassThrough({objectMode: true})
|
|
8
|
+
|
|
9
|
+
output.setMaxListeners(0)
|
|
10
|
+
|
|
11
|
+
output.add = add
|
|
12
|
+
output.isEmpty = isEmpty
|
|
13
|
+
|
|
14
|
+
output.on('unpipe', remove)
|
|
15
|
+
|
|
16
|
+
Array.prototype.slice.call(arguments).forEach(add)
|
|
17
|
+
|
|
18
|
+
return output
|
|
19
|
+
|
|
20
|
+
function add (source) {
|
|
21
|
+
if (Array.isArray(source)) {
|
|
22
|
+
source.forEach(add)
|
|
23
|
+
return this
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
sources.push(source);
|
|
27
|
+
source.once('end', remove.bind(null, source))
|
|
28
|
+
source.once('error', output.emit.bind(output, 'error'))
|
|
29
|
+
source.pipe(output, {end: false})
|
|
30
|
+
return this
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function isEmpty () {
|
|
34
|
+
return sources.length == 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function remove (source) {
|
|
38
|
+
sources = sources.filter(function (it) { return it !== source })
|
|
39
|
+
if (!sources.length && output.readable) { output.end() }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "merge-stream",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Create a stream that emits events from multiple other streams",
|
|
5
|
+
"files": [
|
|
6
|
+
"index.js"
|
|
7
|
+
],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"test": "istanbul cover test.js && istanbul check-cover --statements 100 --branches 100"
|
|
10
|
+
},
|
|
11
|
+
"repository": "grncdr/merge-stream",
|
|
12
|
+
"author": "Stephen Sugden <me@stephensugden.com>",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"dependencies": {},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"from2": "^2.0.3",
|
|
17
|
+
"istanbul": "^0.4.5"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
declare const mimicFn: {
|
|
2
|
+
/**
|
|
3
|
+
Make a function mimic another one. It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
|
|
4
|
+
|
|
5
|
+
@param to - Mimicking function.
|
|
6
|
+
@param from - Function to mimic.
|
|
7
|
+
@returns The modified `to` function.
|
|
8
|
+
|
|
9
|
+
@example
|
|
10
|
+
```
|
|
11
|
+
import mimicFn = require('mimic-fn');
|
|
12
|
+
|
|
13
|
+
function foo() {}
|
|
14
|
+
foo.unicorn = '🦄';
|
|
15
|
+
|
|
16
|
+
function wrapper() {
|
|
17
|
+
return foo();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
console.log(wrapper.name);
|
|
21
|
+
//=> 'wrapper'
|
|
22
|
+
|
|
23
|
+
mimicFn(wrapper, foo);
|
|
24
|
+
|
|
25
|
+
console.log(wrapper.name);
|
|
26
|
+
//=> 'foo'
|
|
27
|
+
|
|
28
|
+
console.log(wrapper.unicorn);
|
|
29
|
+
//=> '🦄'
|
|
30
|
+
```
|
|
31
|
+
*/
|
|
32
|
+
<
|
|
33
|
+
ArgumentsType extends unknown[],
|
|
34
|
+
ReturnType,
|
|
35
|
+
FunctionType extends (...arguments: ArgumentsType) => ReturnType
|
|
36
|
+
>(
|
|
37
|
+
to: (...arguments: ArgumentsType) => ReturnType,
|
|
38
|
+
from: FunctionType
|
|
39
|
+
): FunctionType;
|
|
40
|
+
|
|
41
|
+
// TODO: Remove this for the next major release, refactor the whole definition to:
|
|
42
|
+
// declare function mimicFn<
|
|
43
|
+
// ArgumentsType extends unknown[],
|
|
44
|
+
// ReturnType,
|
|
45
|
+
// FunctionType extends (...arguments: ArgumentsType) => ReturnType
|
|
46
|
+
// >(
|
|
47
|
+
// to: (...arguments: ArgumentsType) => ReturnType,
|
|
48
|
+
// from: FunctionType
|
|
49
|
+
// ): FunctionType;
|
|
50
|
+
// export = mimicFn;
|
|
51
|
+
default: typeof mimicFn;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export = mimicFn;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const mimicFn = (to, from) => {
|
|
4
|
+
for (const prop of Reflect.ownKeys(from)) {
|
|
5
|
+
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
return to;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
module.exports = mimicFn;
|
|
12
|
+
// TODO: Remove this for the next major release
|
|
13
|
+
module.exports.default = mimicFn;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mimic-fn",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "Make a function mimic another one",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/mimic-fn",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Sindre Sorhus",
|
|
9
|
+
"email": "sindresorhus@gmail.com",
|
|
10
|
+
"url": "sindresorhus.com"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=6"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "xo && ava && tsd"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.js",
|
|
20
|
+
"index.d.ts"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"function",
|
|
24
|
+
"mimic",
|
|
25
|
+
"imitate",
|
|
26
|
+
"rename",
|
|
27
|
+
"copy",
|
|
28
|
+
"inherit",
|
|
29
|
+
"properties",
|
|
30
|
+
"name",
|
|
31
|
+
"func",
|
|
32
|
+
"fn",
|
|
33
|
+
"set",
|
|
34
|
+
"infer",
|
|
35
|
+
"change"
|
|
36
|
+
],
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"ava": "^1.4.1",
|
|
39
|
+
"tsd": "^0.7.1",
|
|
40
|
+
"xo": "^0.24.0"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# mimic-fn [](https://travis-ci.org/sindresorhus/mimic-fn)
|
|
2
|
+
|
|
3
|
+
> Make a function mimic another one
|
|
4
|
+
|
|
5
|
+
Useful when you wrap a function in another function and like to preserve the original name and other properties.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
$ npm install mimic-fn
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
const mimicFn = require('mimic-fn');
|
|
19
|
+
|
|
20
|
+
function foo() {}
|
|
21
|
+
foo.unicorn = '🦄';
|
|
22
|
+
|
|
23
|
+
function wrapper() {
|
|
24
|
+
return foo();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
console.log(wrapper.name);
|
|
28
|
+
//=> 'wrapper'
|
|
29
|
+
|
|
30
|
+
mimicFn(wrapper, foo);
|
|
31
|
+
|
|
32
|
+
console.log(wrapper.name);
|
|
33
|
+
//=> 'foo'
|
|
34
|
+
|
|
35
|
+
console.log(wrapper.unicorn);
|
|
36
|
+
//=> '🦄'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## API
|
|
41
|
+
|
|
42
|
+
It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
|
|
43
|
+
|
|
44
|
+
### mimicFn(to, from)
|
|
45
|
+
|
|
46
|
+
Modifies the `to` function and returns it.
|
|
47
|
+
|
|
48
|
+
#### to
|
|
49
|
+
|
|
50
|
+
Type: `Function`
|
|
51
|
+
|
|
52
|
+
Mimicking function.
|
|
53
|
+
|
|
54
|
+
#### from
|
|
55
|
+
|
|
56
|
+
Type: `Function`
|
|
57
|
+
|
|
58
|
+
Function to mimic.
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
## Related
|
|
62
|
+
|
|
63
|
+
- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function
|
|
64
|
+
- [keep-func-props](https://github.com/ehmicky/keep-func-props) - Wrap a function without changing its name, length and other properties
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT © [Sindre Sorhus](https://sindresorhus.com)
|