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,90 +1,92 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const common = require('../common')
|
|
4
|
+
const Type = require('../type')
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const YAML_FLOAT_PATTERN = new RegExp(
|
|
7
7
|
// 2.5e4, 2.5 and integers
|
|
8
|
-
'^(?:[-+]?(?:[0-9]
|
|
8
|
+
'^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' +
|
|
9
9
|
// .2e4, .2
|
|
10
10
|
// special case, seems not from spec
|
|
11
|
-
'|\\.[0-
|
|
11
|
+
'|\\.[0-9]+(?:[eE][-+]?[0-9]+)?' +
|
|
12
12
|
// .inf
|
|
13
13
|
'|[-+]?\\.(?:inf|Inf|INF)' +
|
|
14
14
|
// .nan
|
|
15
|
-
'|\\.(?:nan|NaN|NAN))$')
|
|
15
|
+
'|\\.(?:nan|NaN|NAN))$')
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const YAML_FLOAT_SPECIAL_PATTERN = new RegExp(
|
|
18
|
+
'^(?:' +
|
|
19
|
+
// .inf
|
|
20
|
+
'[-+]?\\.(?:inf|Inf|INF)' +
|
|
21
|
+
// .nan
|
|
22
|
+
'|\\.(?:nan|NaN|NAN))$')
|
|
23
|
+
|
|
24
|
+
function resolveYamlFloat (data) {
|
|
25
|
+
if (data === null) return false
|
|
19
26
|
|
|
20
|
-
if (!YAML_FLOAT_PATTERN.test(data)
|
|
21
|
-
|
|
22
|
-
// Probably should update regexp & check speed
|
|
23
|
-
data[data.length - 1] === '_') {
|
|
24
|
-
return false;
|
|
27
|
+
if (!YAML_FLOAT_PATTERN.test(data)) {
|
|
28
|
+
return false
|
|
25
29
|
}
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
if (Number.isFinite(parseFloat(data, 10))) {
|
|
32
|
+
return true
|
|
33
|
+
}
|
|
29
34
|
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
return YAML_FLOAT_SPECIAL_PATTERN.test(data)
|
|
36
|
+
}
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
function constructYamlFloat (data) {
|
|
39
|
+
let value = data.toLowerCase()
|
|
40
|
+
const sign = value[0] === '-' ? -1 : 1
|
|
35
41
|
|
|
36
42
|
if ('+-'.indexOf(value[0]) >= 0) {
|
|
37
|
-
value = value.slice(1)
|
|
43
|
+
value = value.slice(1)
|
|
38
44
|
}
|
|
39
45
|
|
|
40
46
|
if (value === '.inf') {
|
|
41
|
-
return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY
|
|
42
|
-
|
|
47
|
+
return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY
|
|
43
48
|
} else if (value === '.nan') {
|
|
44
|
-
return NaN
|
|
49
|
+
return NaN
|
|
45
50
|
}
|
|
46
|
-
return sign * parseFloat(value, 10)
|
|
51
|
+
return sign * parseFloat(value, 10)
|
|
47
52
|
}
|
|
48
53
|
|
|
54
|
+
const SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/
|
|
49
55
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
function representYamlFloat(object, style) {
|
|
53
|
-
var res;
|
|
54
|
-
|
|
56
|
+
function representYamlFloat (object, style) {
|
|
55
57
|
if (isNaN(object)) {
|
|
56
58
|
switch (style) {
|
|
57
|
-
case 'lowercase': return '.nan'
|
|
58
|
-
case 'uppercase': return '.NAN'
|
|
59
|
-
case 'camelcase': return '.NaN'
|
|
59
|
+
case 'lowercase': return '.nan'
|
|
60
|
+
case 'uppercase': return '.NAN'
|
|
61
|
+
case 'camelcase': return '.NaN'
|
|
60
62
|
}
|
|
61
63
|
} else if (Number.POSITIVE_INFINITY === object) {
|
|
62
64
|
switch (style) {
|
|
63
|
-
case 'lowercase': return '.inf'
|
|
64
|
-
case 'uppercase': return '.INF'
|
|
65
|
-
case 'camelcase': return '.Inf'
|
|
65
|
+
case 'lowercase': return '.inf'
|
|
66
|
+
case 'uppercase': return '.INF'
|
|
67
|
+
case 'camelcase': return '.Inf'
|
|
66
68
|
}
|
|
67
69
|
} else if (Number.NEGATIVE_INFINITY === object) {
|
|
68
70
|
switch (style) {
|
|
69
|
-
case 'lowercase': return '-.inf'
|
|
70
|
-
case 'uppercase': return '-.INF'
|
|
71
|
-
case 'camelcase': return '-.Inf'
|
|
71
|
+
case 'lowercase': return '-.inf'
|
|
72
|
+
case 'uppercase': return '-.INF'
|
|
73
|
+
case 'camelcase': return '-.Inf'
|
|
72
74
|
}
|
|
73
75
|
} else if (common.isNegativeZero(object)) {
|
|
74
|
-
return '-0.0'
|
|
76
|
+
return '-0.0'
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
res = object.toString(10)
|
|
79
|
+
const res = object.toString(10)
|
|
78
80
|
|
|
79
81
|
// JS stringifier can build scientific format without dots: 5e-100,
|
|
80
82
|
// while YAML requres dot: 5.e-100. Fix it with simple hack
|
|
81
83
|
|
|
82
|
-
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res
|
|
84
|
+
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
function isFloat(object) {
|
|
87
|
+
function isFloat (object) {
|
|
86
88
|
return (Object.prototype.toString.call(object) === '[object Number]') &&
|
|
87
|
-
(object % 1 !== 0 || common.isNegativeZero(object))
|
|
89
|
+
(object % 1 !== 0 || common.isNegativeZero(object))
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
module.exports = new Type('tag:yaml.org,2002:float', {
|
|
@@ -94,4 +96,4 @@ module.exports = new Type('tag:yaml.org,2002:float', {
|
|
|
94
96
|
predicate: isFloat,
|
|
95
97
|
represent: representYamlFloat,
|
|
96
98
|
defaultStyle: 'lowercase'
|
|
97
|
-
})
|
|
99
|
+
})
|
|
@@ -1,137 +1,124 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const common = require('../common')
|
|
4
|
+
const Type = require('../type')
|
|
5
5
|
|
|
6
|
-
function isHexCode(c) {
|
|
7
|
-
return ((0x30/* 0 */
|
|
8
|
-
((0x41/* A */
|
|
9
|
-
((0x61/* a */
|
|
6
|
+
function isHexCode (c) {
|
|
7
|
+
return ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) ||
|
|
8
|
+
((c >= 0x41/* A */) && (c <= 0x46/* F */)) ||
|
|
9
|
+
((c >= 0x61/* a */) && (c <= 0x66/* f */))
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function isOctCode(c) {
|
|
13
|
-
return ((0x30/* 0 */
|
|
12
|
+
function isOctCode (c) {
|
|
13
|
+
return ((c >= 0x30/* 0 */) && (c <= 0x37/* 7 */))
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
function isDecCode(c) {
|
|
17
|
-
return ((0x30/* 0 */
|
|
16
|
+
function isDecCode (c) {
|
|
17
|
+
return ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */))
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function resolveYamlInteger(data) {
|
|
21
|
-
if (data === null) return false
|
|
20
|
+
function resolveYamlInteger (data) {
|
|
21
|
+
if (data === null) return false
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
ch;
|
|
23
|
+
const max = data.length
|
|
24
|
+
let index = 0
|
|
25
|
+
let hasDigits = false
|
|
27
26
|
|
|
28
|
-
if (!max) return false
|
|
27
|
+
if (!max) return false
|
|
29
28
|
|
|
30
|
-
ch = data[index]
|
|
29
|
+
let ch = data[index]
|
|
31
30
|
|
|
32
31
|
// sign
|
|
33
32
|
if (ch === '-' || ch === '+') {
|
|
34
|
-
ch = data[++index]
|
|
33
|
+
ch = data[++index]
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
if (ch === '0') {
|
|
38
37
|
// 0
|
|
39
|
-
if (index + 1 === max) return true
|
|
40
|
-
ch = data[++index]
|
|
38
|
+
if (index + 1 === max) return true
|
|
39
|
+
ch = data[++index]
|
|
41
40
|
|
|
42
41
|
// base 2, base 8, base 16
|
|
43
42
|
|
|
44
43
|
if (ch === 'b') {
|
|
45
44
|
// base 2
|
|
46
|
-
index
|
|
45
|
+
index++
|
|
47
46
|
|
|
48
47
|
for (; index < max; index++) {
|
|
49
|
-
ch = data[index]
|
|
50
|
-
if (ch
|
|
51
|
-
|
|
52
|
-
hasDigits = true;
|
|
48
|
+
ch = data[index]
|
|
49
|
+
if (ch !== '0' && ch !== '1') return false
|
|
50
|
+
hasDigits = true
|
|
53
51
|
}
|
|
54
|
-
return hasDigits &&
|
|
52
|
+
return hasDigits && Number.isFinite(parseYamlInteger(data))
|
|
55
53
|
}
|
|
56
54
|
|
|
57
|
-
|
|
58
55
|
if (ch === 'x') {
|
|
59
56
|
// base 16
|
|
60
|
-
index
|
|
57
|
+
index++
|
|
61
58
|
|
|
62
59
|
for (; index < max; index++) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (!isHexCode(data.charCodeAt(index))) return false;
|
|
66
|
-
hasDigits = true;
|
|
60
|
+
if (!isHexCode(data.charCodeAt(index))) return false
|
|
61
|
+
hasDigits = true
|
|
67
62
|
}
|
|
68
|
-
return hasDigits &&
|
|
63
|
+
return hasDigits && Number.isFinite(parseYamlInteger(data))
|
|
69
64
|
}
|
|
70
65
|
|
|
71
|
-
|
|
72
66
|
if (ch === 'o') {
|
|
73
67
|
// base 8
|
|
74
|
-
index
|
|
68
|
+
index++
|
|
75
69
|
|
|
76
70
|
for (; index < max; index++) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (!isOctCode(data.charCodeAt(index))) return false;
|
|
80
|
-
hasDigits = true;
|
|
71
|
+
if (!isOctCode(data.charCodeAt(index))) return false
|
|
72
|
+
hasDigits = true
|
|
81
73
|
}
|
|
82
|
-
return hasDigits &&
|
|
74
|
+
return hasDigits && Number.isFinite(parseYamlInteger(data))
|
|
83
75
|
}
|
|
84
76
|
}
|
|
85
77
|
|
|
86
78
|
// base 10 (except 0)
|
|
87
79
|
|
|
88
|
-
// value should not start with `_`;
|
|
89
|
-
if (ch === '_') return false;
|
|
90
|
-
|
|
91
80
|
for (; index < max; index++) {
|
|
92
|
-
ch = data[index];
|
|
93
|
-
if (ch === '_') continue;
|
|
94
81
|
if (!isDecCode(data.charCodeAt(index))) {
|
|
95
|
-
return false
|
|
82
|
+
return false
|
|
96
83
|
}
|
|
97
|
-
hasDigits = true
|
|
84
|
+
hasDigits = true
|
|
98
85
|
}
|
|
99
86
|
|
|
100
|
-
|
|
101
|
-
if (!hasDigits || ch === '_') return false;
|
|
87
|
+
if (!hasDigits) return false
|
|
102
88
|
|
|
103
|
-
return
|
|
89
|
+
return Number.isFinite(parseYamlInteger(data))
|
|
104
90
|
}
|
|
105
91
|
|
|
106
|
-
function
|
|
107
|
-
|
|
92
|
+
function parseYamlInteger (data) {
|
|
93
|
+
let value = data
|
|
94
|
+
let sign = 1
|
|
108
95
|
|
|
109
|
-
|
|
110
|
-
value = value.replace(/_/g, '');
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
ch = value[0];
|
|
96
|
+
let ch = value[0]
|
|
114
97
|
|
|
115
98
|
if (ch === '-' || ch === '+') {
|
|
116
|
-
if (ch === '-') sign = -1
|
|
117
|
-
value = value.slice(1)
|
|
118
|
-
ch = value[0]
|
|
99
|
+
if (ch === '-') sign = -1
|
|
100
|
+
value = value.slice(1)
|
|
101
|
+
ch = value[0]
|
|
119
102
|
}
|
|
120
103
|
|
|
121
|
-
if (value === '0') return 0
|
|
104
|
+
if (value === '0') return 0
|
|
122
105
|
|
|
123
106
|
if (ch === '0') {
|
|
124
|
-
if (value[1] === 'b') return sign * parseInt(value.slice(2), 2)
|
|
125
|
-
if (value[1] === 'x') return sign * parseInt(value.slice(2), 16)
|
|
126
|
-
if (value[1] === 'o') return sign * parseInt(value.slice(2), 8)
|
|
107
|
+
if (value[1] === 'b') return sign * parseInt(value.slice(2), 2)
|
|
108
|
+
if (value[1] === 'x') return sign * parseInt(value.slice(2), 16)
|
|
109
|
+
if (value[1] === 'o') return sign * parseInt(value.slice(2), 8)
|
|
127
110
|
}
|
|
128
111
|
|
|
129
|
-
return sign * parseInt(value, 10)
|
|
112
|
+
return sign * parseInt(value, 10)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function constructYamlInteger (data) {
|
|
116
|
+
return parseYamlInteger(data)
|
|
130
117
|
}
|
|
131
118
|
|
|
132
|
-
function isInteger(object) {
|
|
119
|
+
function isInteger (object) {
|
|
133
120
|
return (Object.prototype.toString.call(object)) === '[object Number]' &&
|
|
134
|
-
(object % 1 === 0 && !common.isNegativeZero(object))
|
|
121
|
+
(object % 1 === 0 && !common.isNegativeZero(object))
|
|
135
122
|
}
|
|
136
123
|
|
|
137
124
|
module.exports = new Type('tag:yaml.org,2002:int', {
|
|
@@ -140,17 +127,16 @@ module.exports = new Type('tag:yaml.org,2002:int', {
|
|
|
140
127
|
construct: constructYamlInteger,
|
|
141
128
|
predicate: isInteger,
|
|
142
129
|
represent: {
|
|
143
|
-
binary:
|
|
144
|
-
octal:
|
|
145
|
-
decimal:
|
|
146
|
-
|
|
147
|
-
hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }
|
|
130
|
+
binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1) },
|
|
131
|
+
octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1) },
|
|
132
|
+
decimal: function (obj) { return obj.toString(10) },
|
|
133
|
+
hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1) }
|
|
148
134
|
},
|
|
149
135
|
defaultStyle: 'decimal',
|
|
150
136
|
styleAliases: {
|
|
151
|
-
binary:
|
|
152
|
-
octal:
|
|
153
|
-
decimal:
|
|
154
|
-
hexadecimal: [
|
|
137
|
+
binary: [2, 'bin'],
|
|
138
|
+
octal: [8, 'oct'],
|
|
139
|
+
decimal: [10, 'dec'],
|
|
140
|
+
hexadecimal: [16, 'hex']
|
|
155
141
|
}
|
|
156
|
-
})
|
|
142
|
+
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const Type = require('../type')
|
|
4
4
|
|
|
5
5
|
module.exports = new Type('tag:yaml.org,2002:map', {
|
|
6
6
|
kind: 'mapping',
|
|
7
|
-
construct: function (data) { return data !== null ? data : {}
|
|
8
|
-
})
|
|
7
|
+
construct: function (data) { return data !== null ? data : {} }
|
|
8
|
+
})
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const Type = require('../type')
|
|
4
4
|
|
|
5
|
-
function resolveYamlMerge(data) {
|
|
6
|
-
return data === '<<' || data === null
|
|
5
|
+
function resolveYamlMerge (data) {
|
|
6
|
+
return data === '<<' || data === null
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
module.exports = new Type('tag:yaml.org,2002:merge', {
|
|
10
10
|
kind: 'scalar',
|
|
11
11
|
resolve: resolveYamlMerge
|
|
12
|
-
})
|
|
12
|
+
})
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const Type = require('../type')
|
|
4
4
|
|
|
5
|
-
function resolveYamlNull(data) {
|
|
6
|
-
if (data === null) return true
|
|
5
|
+
function resolveYamlNull (data) {
|
|
6
|
+
if (data === null) return true
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const max = data.length
|
|
9
9
|
|
|
10
10
|
return (max === 1 && data === '~') ||
|
|
11
|
-
(max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'))
|
|
11
|
+
(max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'))
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
function constructYamlNull() {
|
|
15
|
-
return null
|
|
14
|
+
function constructYamlNull () {
|
|
15
|
+
return null
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
function isNull(object) {
|
|
19
|
-
return object === null
|
|
18
|
+
function isNull (object) {
|
|
19
|
+
return object === null
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
module.exports = new Type('tag:yaml.org,2002:null', {
|
|
@@ -25,11 +25,11 @@ module.exports = new Type('tag:yaml.org,2002:null', {
|
|
|
25
25
|
construct: constructYamlNull,
|
|
26
26
|
predicate: isNull,
|
|
27
27
|
represent: {
|
|
28
|
-
canonical: function () { return '~'
|
|
29
|
-
lowercase: function () { return 'null'
|
|
30
|
-
uppercase: function () { return 'NULL'
|
|
31
|
-
camelcase: function () { return 'Null'
|
|
32
|
-
empty:
|
|
28
|
+
canonical: function () { return '~' },
|
|
29
|
+
lowercase: function () { return 'null' },
|
|
30
|
+
uppercase: function () { return 'NULL' },
|
|
31
|
+
camelcase: function () { return 'Null' },
|
|
32
|
+
empty: function () { return '' }
|
|
33
33
|
},
|
|
34
34
|
defaultStyle: 'lowercase'
|
|
35
|
-
})
|
|
35
|
+
})
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const Type = require('../type')
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const _hasOwnProperty = Object.prototype.hasOwnProperty
|
|
6
|
+
const _toString = Object.prototype.toString
|
|
7
7
|
|
|
8
|
-
function resolveYamlOmap(data) {
|
|
9
|
-
if (data === null) return true
|
|
8
|
+
function resolveYamlOmap (data) {
|
|
9
|
+
if (data === null) return true
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const objectKeys = []
|
|
12
|
+
const object = data
|
|
13
13
|
|
|
14
|
-
for (index = 0, length = object.length; index < length; index += 1) {
|
|
15
|
-
pair = object[index]
|
|
16
|
-
pairHasKey = false
|
|
14
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
15
|
+
const pair = object[index]
|
|
16
|
+
let pairHasKey = false
|
|
17
17
|
|
|
18
|
-
if (_toString.call(pair) !== '[object Object]') return false
|
|
18
|
+
if (_toString.call(pair) !== '[object Object]') return false
|
|
19
19
|
|
|
20
|
+
let pairKey
|
|
20
21
|
for (pairKey in pair) {
|
|
21
22
|
if (_hasOwnProperty.call(pair, pairKey)) {
|
|
22
|
-
if (!pairHasKey) pairHasKey = true
|
|
23
|
-
else return false
|
|
23
|
+
if (!pairHasKey) pairHasKey = true
|
|
24
|
+
else return false
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
if (!pairHasKey) return false
|
|
28
|
+
if (!pairHasKey) return false
|
|
28
29
|
|
|
29
|
-
if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey)
|
|
30
|
-
else return false
|
|
30
|
+
if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey)
|
|
31
|
+
else return false
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
return true
|
|
34
|
+
return true
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
function constructYamlOmap(data) {
|
|
37
|
-
return data !== null ? data : []
|
|
37
|
+
function constructYamlOmap (data) {
|
|
38
|
+
return data !== null ? data : []
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
module.exports = new Type('tag:yaml.org,2002:omap', {
|
|
41
42
|
kind: 'sequence',
|
|
42
43
|
resolve: resolveYamlOmap,
|
|
43
44
|
construct: constructYamlOmap
|
|
44
|
-
})
|
|
45
|
+
})
|
|
@@ -1,53 +1,50 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const Type = require('../type')
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const _toString = Object.prototype.toString
|
|
6
6
|
|
|
7
|
-
function resolveYamlPairs(data) {
|
|
8
|
-
if (data === null) return true
|
|
7
|
+
function resolveYamlPairs (data) {
|
|
8
|
+
if (data === null) return true
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
object = data;
|
|
10
|
+
const object = data
|
|
12
11
|
|
|
13
|
-
result = new Array(object.length)
|
|
12
|
+
const result = new Array(object.length)
|
|
14
13
|
|
|
15
|
-
for (index = 0, length = object.length; index < length; index += 1) {
|
|
16
|
-
pair = object[index]
|
|
14
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
15
|
+
const pair = object[index]
|
|
17
16
|
|
|
18
|
-
if (_toString.call(pair) !== '[object Object]') return false
|
|
17
|
+
if (_toString.call(pair) !== '[object Object]') return false
|
|
19
18
|
|
|
20
|
-
keys = Object.keys(pair)
|
|
19
|
+
const keys = Object.keys(pair)
|
|
21
20
|
|
|
22
|
-
if (keys.length !== 1) return false
|
|
21
|
+
if (keys.length !== 1) return false
|
|
23
22
|
|
|
24
|
-
result[index] = [
|
|
23
|
+
result[index] = [keys[0], pair[keys[0]]]
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
return true
|
|
26
|
+
return true
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
function constructYamlPairs(data) {
|
|
31
|
-
if (data === null) return []
|
|
29
|
+
function constructYamlPairs (data) {
|
|
30
|
+
if (data === null) return []
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const object = data
|
|
33
|
+
const result = new Array(object.length)
|
|
35
34
|
|
|
36
|
-
|
|
35
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
36
|
+
const pair = object[index]
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
pair = object[index];
|
|
38
|
+
const keys = Object.keys(pair)
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
result[index] = [ keys[0], pair[keys[0]] ];
|
|
40
|
+
result[index] = [keys[0], pair[keys[0]]]
|
|
44
41
|
}
|
|
45
42
|
|
|
46
|
-
return result
|
|
43
|
+
return result
|
|
47
44
|
}
|
|
48
45
|
|
|
49
46
|
module.exports = new Type('tag:yaml.org,2002:pairs', {
|
|
50
47
|
kind: 'sequence',
|
|
51
48
|
resolve: resolveYamlPairs,
|
|
52
49
|
construct: constructYamlPairs
|
|
53
|
-
})
|
|
50
|
+
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const Type = require('../type')
|
|
4
4
|
|
|
5
5
|
module.exports = new Type('tag:yaml.org,2002:seq', {
|
|
6
6
|
kind: 'sequence',
|
|
7
|
-
construct: function (data) { return data !== null ? data : []
|
|
8
|
-
})
|
|
7
|
+
construct: function (data) { return data !== null ? data : [] }
|
|
8
|
+
})
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const Type = require('../type')
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const _hasOwnProperty = Object.prototype.hasOwnProperty
|
|
6
6
|
|
|
7
|
-
function resolveYamlSet(data) {
|
|
8
|
-
if (data === null) return true
|
|
7
|
+
function resolveYamlSet (data) {
|
|
8
|
+
if (data === null) return true
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const object = data
|
|
11
11
|
|
|
12
|
-
for (key in object) {
|
|
12
|
+
for (const key in object) {
|
|
13
13
|
if (_hasOwnProperty.call(object, key)) {
|
|
14
|
-
if (object[key] !== null) return false
|
|
14
|
+
if (object[key] !== null) return false
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
return true
|
|
18
|
+
return true
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function constructYamlSet(data) {
|
|
22
|
-
return data !== null ? data : {}
|
|
21
|
+
function constructYamlSet (data) {
|
|
22
|
+
return data !== null ? data : {}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
module.exports = new Type('tag:yaml.org,2002:set', {
|
|
26
26
|
kind: 'mapping',
|
|
27
27
|
resolve: resolveYamlSet,
|
|
28
28
|
construct: constructYamlSet
|
|
29
|
-
})
|
|
29
|
+
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const Type = require('../type')
|
|
4
4
|
|
|
5
5
|
module.exports = new Type('tag:yaml.org,2002:str', {
|
|
6
6
|
kind: 'scalar',
|
|
7
|
-
construct: function (data) { return data !== null ? data : ''
|
|
8
|
-
})
|
|
7
|
+
construct: function (data) { return data !== null ? data : '' }
|
|
8
|
+
})
|