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
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
|
|
5
5
|
// So, Core schema has no distinctions from JSON schema is JS-YAML.
|
|
6
6
|
|
|
7
|
+
'use strict'
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
module.exports = require('./json');
|
|
9
|
+
module.exports = require('./json')
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
// This schema is based on standard YAML's Core schema and includes most of
|
|
5
5
|
// extra types described at YAML tag repository. (http://yaml.org/type/)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
7
|
+
'use strict'
|
|
10
8
|
|
|
11
9
|
module.exports = require('./core').extend({
|
|
12
10
|
implicit: [
|
|
@@ -19,4 +17,4 @@ module.exports = require('./core').extend({
|
|
|
19
17
|
require('../type/pairs'),
|
|
20
18
|
require('../type/set')
|
|
21
19
|
]
|
|
22
|
-
})
|
|
20
|
+
})
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
// Standard YAML's Failsafe schema.
|
|
2
2
|
// http://www.yaml.org/spec/1.2/spec.html#id2802346
|
|
3
3
|
|
|
4
|
+
'use strict'
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var Schema = require('../schema');
|
|
9
|
-
|
|
6
|
+
const Schema = require('../schema')
|
|
10
7
|
|
|
11
8
|
module.exports = new Schema({
|
|
12
9
|
explicit: [
|
|
@@ -14,4 +11,4 @@ module.exports = new Schema({
|
|
|
14
11
|
require('../type/seq'),
|
|
15
12
|
require('../type/map')
|
|
16
13
|
]
|
|
17
|
-
})
|
|
14
|
+
})
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
// So, this schema is not such strict as defined in the YAML specification.
|
|
6
6
|
// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
'use strict';
|
|
10
|
-
|
|
8
|
+
'use strict'
|
|
11
9
|
|
|
12
10
|
module.exports = require('./failsafe').extend({
|
|
13
11
|
implicit: [
|
|
@@ -16,4 +14,4 @@ module.exports = require('./failsafe').extend({
|
|
|
16
14
|
require('../type/int'),
|
|
17
15
|
require('../type/float')
|
|
18
16
|
]
|
|
19
|
-
})
|
|
17
|
+
})
|
|
@@ -1,121 +1,109 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const YAMLException = require('./exception')
|
|
4
|
+
const Type = require('./type')
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function compileList(schema, name) {
|
|
10
|
-
var result = [];
|
|
6
|
+
function compileList (schema, name) {
|
|
7
|
+
const result = []
|
|
11
8
|
|
|
12
9
|
schema[name].forEach(function (currentType) {
|
|
13
|
-
|
|
10
|
+
let newIndex = result.length
|
|
14
11
|
|
|
15
12
|
result.forEach(function (previousType, previousIndex) {
|
|
16
13
|
if (previousType.tag === currentType.tag &&
|
|
17
14
|
previousType.kind === currentType.kind &&
|
|
18
15
|
previousType.multi === currentType.multi) {
|
|
19
|
-
|
|
20
|
-
newIndex = previousIndex;
|
|
16
|
+
newIndex = previousIndex
|
|
21
17
|
}
|
|
22
|
-
})
|
|
18
|
+
})
|
|
23
19
|
|
|
24
|
-
result[newIndex] = currentType
|
|
25
|
-
})
|
|
20
|
+
result[newIndex] = currentType
|
|
21
|
+
})
|
|
26
22
|
|
|
27
|
-
return result
|
|
23
|
+
return result
|
|
28
24
|
}
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
function collectType(type) {
|
|
26
|
+
function compileMap (/* lists... */) {
|
|
27
|
+
const result = {
|
|
28
|
+
scalar: {},
|
|
29
|
+
sequence: {},
|
|
30
|
+
mapping: {},
|
|
31
|
+
fallback: {},
|
|
32
|
+
multi: {
|
|
33
|
+
scalar: [],
|
|
34
|
+
sequence: [],
|
|
35
|
+
mapping: [],
|
|
36
|
+
fallback: []
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function collectType (type) {
|
|
46
40
|
if (type.multi) {
|
|
47
|
-
result.multi[type.kind].push(type)
|
|
48
|
-
result.multi['fallback'].push(type)
|
|
41
|
+
result.multi[type.kind].push(type)
|
|
42
|
+
result.multi['fallback'].push(type)
|
|
49
43
|
} else {
|
|
50
|
-
result[type.kind][type.tag] = result['fallback'][type.tag] = type
|
|
44
|
+
result[type.kind][type.tag] = result['fallback'][type.tag] = type
|
|
51
45
|
}
|
|
52
46
|
}
|
|
53
47
|
|
|
54
|
-
for (index = 0, length = arguments.length; index < length; index += 1) {
|
|
55
|
-
arguments[index].forEach(collectType)
|
|
48
|
+
for (let index = 0, length = arguments.length; index < length; index += 1) {
|
|
49
|
+
arguments[index].forEach(collectType)
|
|
56
50
|
}
|
|
57
|
-
return result
|
|
51
|
+
return result
|
|
58
52
|
}
|
|
59
53
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return this.extend(definition);
|
|
54
|
+
function Schema (definition) {
|
|
55
|
+
return this.extend(definition)
|
|
63
56
|
}
|
|
64
57
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var explicit = [];
|
|
58
|
+
Schema.prototype.extend = function extend (definition) {
|
|
59
|
+
let implicit = []
|
|
60
|
+
let explicit = []
|
|
69
61
|
|
|
70
62
|
if (definition instanceof Type) {
|
|
71
63
|
// Schema.extend(type)
|
|
72
|
-
explicit.push(definition)
|
|
73
|
-
|
|
64
|
+
explicit.push(definition)
|
|
74
65
|
} else if (Array.isArray(definition)) {
|
|
75
66
|
// Schema.extend([ type1, type2, ... ])
|
|
76
|
-
explicit = explicit.concat(definition)
|
|
77
|
-
|
|
67
|
+
explicit = explicit.concat(definition)
|
|
78
68
|
} else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
|
|
79
69
|
// Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })
|
|
80
|
-
if (definition.implicit) implicit = implicit.concat(definition.implicit)
|
|
81
|
-
if (definition.explicit) explicit = explicit.concat(definition.explicit)
|
|
82
|
-
|
|
70
|
+
if (definition.implicit) implicit = implicit.concat(definition.implicit)
|
|
71
|
+
if (definition.explicit) explicit = explicit.concat(definition.explicit)
|
|
83
72
|
} else {
|
|
84
73
|
throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' +
|
|
85
|
-
'or a schema definition ({ implicit: [...], explicit: [...] })')
|
|
74
|
+
'or a schema definition ({ implicit: [...], explicit: [...] })')
|
|
86
75
|
}
|
|
87
76
|
|
|
88
77
|
implicit.forEach(function (type) {
|
|
89
78
|
if (!(type instanceof Type)) {
|
|
90
|
-
throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.')
|
|
79
|
+
throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.')
|
|
91
80
|
}
|
|
92
81
|
|
|
93
82
|
if (type.loadKind && type.loadKind !== 'scalar') {
|
|
94
|
-
throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.')
|
|
83
|
+
throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.')
|
|
95
84
|
}
|
|
96
85
|
|
|
97
86
|
if (type.multi) {
|
|
98
|
-
throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.')
|
|
87
|
+
throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.')
|
|
99
88
|
}
|
|
100
|
-
})
|
|
89
|
+
})
|
|
101
90
|
|
|
102
91
|
explicit.forEach(function (type) {
|
|
103
92
|
if (!(type instanceof Type)) {
|
|
104
|
-
throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.')
|
|
93
|
+
throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.')
|
|
105
94
|
}
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
var result = Object.create(Schema.prototype);
|
|
95
|
+
})
|
|
109
96
|
|
|
110
|
-
result
|
|
111
|
-
result.explicit = (this.explicit || []).concat(explicit);
|
|
97
|
+
const result = Object.create(Schema.prototype)
|
|
112
98
|
|
|
113
|
-
result.
|
|
114
|
-
result.
|
|
115
|
-
result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
|
|
99
|
+
result.implicit = (this.implicit || []).concat(implicit)
|
|
100
|
+
result.explicit = (this.explicit || []).concat(explicit)
|
|
116
101
|
|
|
117
|
-
|
|
118
|
-
|
|
102
|
+
result.compiledImplicit = compileList(result, 'implicit')
|
|
103
|
+
result.compiledExplicit = compileList(result, 'explicit')
|
|
104
|
+
result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit)
|
|
119
105
|
|
|
106
|
+
return result
|
|
107
|
+
}
|
|
120
108
|
|
|
121
|
-
module.exports = Schema
|
|
109
|
+
module.exports = Schema
|
|
@@ -1,101 +1,96 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var common = require('./common');
|
|
1
|
+
'use strict'
|
|
5
2
|
|
|
3
|
+
const common = require('./common')
|
|
6
4
|
|
|
7
5
|
// get snippet for a single line, respecting maxLength
|
|
8
|
-
function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
function getLine (buffer, lineStart, lineEnd, position, maxLineLength) {
|
|
7
|
+
let head = ''
|
|
8
|
+
let tail = ''
|
|
9
|
+
const maxHalfLength = Math.floor(maxLineLength / 2) - 1
|
|
12
10
|
|
|
13
11
|
if (position - lineStart > maxHalfLength) {
|
|
14
|
-
head = ' ... '
|
|
15
|
-
lineStart = position - maxHalfLength + head.length
|
|
12
|
+
head = ' ... '
|
|
13
|
+
lineStart = position - maxHalfLength + head.length
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
if (lineEnd - position > maxHalfLength) {
|
|
19
|
-
tail = ' ...'
|
|
20
|
-
lineEnd = position + maxHalfLength - tail.length
|
|
17
|
+
tail = ' ...'
|
|
18
|
+
lineEnd = position + maxHalfLength - tail.length
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
return {
|
|
24
22
|
str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail,
|
|
25
23
|
pos: position - lineStart + head.length // relative position
|
|
26
|
-
}
|
|
24
|
+
}
|
|
27
25
|
}
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return common.repeat(' ', max - string.length) + string;
|
|
27
|
+
function padStart (string, max) {
|
|
28
|
+
return common.repeat(' ', max - string.length) + string
|
|
32
29
|
}
|
|
33
30
|
|
|
31
|
+
function makeSnippet (mark, options) {
|
|
32
|
+
options = Object.create(options || null)
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
options = Object.create(options || null);
|
|
37
|
-
|
|
38
|
-
if (!mark.buffer) return null;
|
|
34
|
+
if (!mark.buffer) return null
|
|
39
35
|
|
|
40
|
-
if (!options.maxLength) options.maxLength = 79
|
|
41
|
-
if (typeof options.indent
|
|
42
|
-
if (typeof options.linesBefore !== 'number') options.linesBefore = 3
|
|
43
|
-
if (typeof options.linesAfter
|
|
36
|
+
if (!options.maxLength) options.maxLength = 79
|
|
37
|
+
if (typeof options.indent !== 'number') options.indent = 1
|
|
38
|
+
if (typeof options.linesBefore !== 'number') options.linesBefore = 3
|
|
39
|
+
if (typeof options.linesAfter !== 'number') options.linesAfter = 2
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
const re = /\r?\n|\r|\0/g
|
|
42
|
+
const lineStarts = [0]
|
|
43
|
+
const lineEnds = []
|
|
44
|
+
let match
|
|
45
|
+
let foundLineNo = -1
|
|
50
46
|
|
|
51
47
|
while ((match = re.exec(mark.buffer))) {
|
|
52
|
-
lineEnds.push(match.index)
|
|
53
|
-
lineStarts.push(match.index + match[0].length)
|
|
48
|
+
lineEnds.push(match.index)
|
|
49
|
+
lineStarts.push(match.index + match[0].length)
|
|
54
50
|
|
|
55
51
|
if (mark.position <= match.index && foundLineNo < 0) {
|
|
56
|
-
foundLineNo = lineStarts.length - 2
|
|
52
|
+
foundLineNo = lineStarts.length - 2
|
|
57
53
|
}
|
|
58
54
|
}
|
|
59
55
|
|
|
60
|
-
if (foundLineNo < 0) foundLineNo = lineStarts.length - 1
|
|
56
|
+
if (foundLineNo < 0) foundLineNo = lineStarts.length - 1
|
|
61
57
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
let result = ''
|
|
59
|
+
const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length
|
|
60
|
+
const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3)
|
|
65
61
|
|
|
66
|
-
for (i = 1; i <= options.linesBefore; i++) {
|
|
67
|
-
if (foundLineNo - i < 0) break
|
|
68
|
-
line = getLine(
|
|
62
|
+
for (let i = 1; i <= options.linesBefore; i++) {
|
|
63
|
+
if (foundLineNo - i < 0) break
|
|
64
|
+
const line = getLine(
|
|
69
65
|
mark.buffer,
|
|
70
66
|
lineStarts[foundLineNo - i],
|
|
71
67
|
lineEnds[foundLineNo - i],
|
|
72
68
|
mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),
|
|
73
69
|
maxLineLength
|
|
74
|
-
)
|
|
70
|
+
)
|
|
75
71
|
result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +
|
|
76
|
-
' | ' + line.str + '\n' + result
|
|
72
|
+
' | ' + line.str + '\n' + result
|
|
77
73
|
}
|
|
78
74
|
|
|
79
|
-
line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength)
|
|
75
|
+
const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength)
|
|
80
76
|
result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +
|
|
81
|
-
' | ' + line.str + '\n'
|
|
82
|
-
result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'
|
|
77
|
+
' | ' + line.str + '\n'
|
|
78
|
+
result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'
|
|
83
79
|
|
|
84
|
-
for (i = 1; i <= options.linesAfter; i++) {
|
|
85
|
-
if (foundLineNo + i >= lineEnds.length) break
|
|
86
|
-
line = getLine(
|
|
80
|
+
for (let i = 1; i <= options.linesAfter; i++) {
|
|
81
|
+
if (foundLineNo + i >= lineEnds.length) break
|
|
82
|
+
const line = getLine(
|
|
87
83
|
mark.buffer,
|
|
88
84
|
lineStarts[foundLineNo + i],
|
|
89
85
|
lineEnds[foundLineNo + i],
|
|
90
86
|
mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),
|
|
91
87
|
maxLineLength
|
|
92
|
-
)
|
|
88
|
+
)
|
|
93
89
|
result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +
|
|
94
|
-
' | ' + line.str + '\n'
|
|
90
|
+
' | ' + line.str + '\n'
|
|
95
91
|
}
|
|
96
92
|
|
|
97
|
-
return result.replace(/\n$/, '')
|
|
93
|
+
return result.replace(/\n$/, '')
|
|
98
94
|
}
|
|
99
95
|
|
|
100
|
-
|
|
101
|
-
module.exports = makeSnippet;
|
|
96
|
+
module.exports = makeSnippet
|
|
@@ -1,119 +1,116 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
/*eslint-disable no-bitwise*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var Type = require('../type');
|
|
1
|
+
'use strict'
|
|
7
2
|
|
|
3
|
+
const Type = require('../type')
|
|
8
4
|
|
|
9
5
|
// [ 64, 65, 66 ] -> [ padding, CR, LF ]
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
const BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'
|
|
12
7
|
|
|
13
|
-
function resolveYamlBinary(data) {
|
|
14
|
-
if (data === null) return false
|
|
8
|
+
function resolveYamlBinary (data) {
|
|
9
|
+
if (data === null) return false
|
|
15
10
|
|
|
16
|
-
|
|
11
|
+
let bitlen = 0
|
|
12
|
+
const max = data.length
|
|
13
|
+
const map = BASE64_MAP
|
|
17
14
|
|
|
18
15
|
// Convert one by one.
|
|
19
|
-
for (idx = 0; idx < max; idx++) {
|
|
20
|
-
code = map.indexOf(data.charAt(idx))
|
|
16
|
+
for (let idx = 0; idx < max; idx++) {
|
|
17
|
+
const code = map.indexOf(data.charAt(idx))
|
|
21
18
|
|
|
22
19
|
// Skip CR/LF
|
|
23
|
-
if (code > 64) continue
|
|
20
|
+
if (code > 64) continue
|
|
24
21
|
|
|
25
22
|
// Fail on illegal characters
|
|
26
|
-
if (code < 0) return false
|
|
23
|
+
if (code < 0) return false
|
|
27
24
|
|
|
28
|
-
bitlen += 6
|
|
25
|
+
bitlen += 6
|
|
29
26
|
}
|
|
30
27
|
|
|
31
28
|
// If there are any bits left, source was corrupted
|
|
32
|
-
return (bitlen % 8) === 0
|
|
29
|
+
return (bitlen % 8) === 0
|
|
33
30
|
}
|
|
34
31
|
|
|
35
|
-
function constructYamlBinary(data) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
result = [];
|
|
32
|
+
function constructYamlBinary (data) {
|
|
33
|
+
const input = data.replace(/[\r\n=]/g, '') // remove CR/LF & padding to simplify scan
|
|
34
|
+
const max = input.length
|
|
35
|
+
const map = BASE64_MAP
|
|
36
|
+
let bits = 0
|
|
37
|
+
const result = []
|
|
42
38
|
|
|
43
39
|
// Collect by 6*4 bits (3 bytes)
|
|
44
40
|
|
|
45
|
-
for (idx = 0; idx < max; idx++) {
|
|
41
|
+
for (let idx = 0; idx < max; idx++) {
|
|
46
42
|
if ((idx % 4 === 0) && idx) {
|
|
47
|
-
result.push((bits >> 16) & 0xFF)
|
|
48
|
-
result.push((bits >> 8) & 0xFF)
|
|
49
|
-
result.push(bits & 0xFF)
|
|
43
|
+
result.push((bits >> 16) & 0xFF)
|
|
44
|
+
result.push((bits >> 8) & 0xFF)
|
|
45
|
+
result.push(bits & 0xFF)
|
|
50
46
|
}
|
|
51
47
|
|
|
52
|
-
bits = (bits << 6) | map.indexOf(input.charAt(idx))
|
|
48
|
+
bits = (bits << 6) | map.indexOf(input.charAt(idx))
|
|
53
49
|
}
|
|
54
50
|
|
|
55
51
|
// Dump tail
|
|
56
52
|
|
|
57
|
-
tailbits = (max % 4) * 6
|
|
53
|
+
const tailbits = (max % 4) * 6
|
|
58
54
|
|
|
59
55
|
if (tailbits === 0) {
|
|
60
|
-
result.push((bits >> 16) & 0xFF)
|
|
61
|
-
result.push((bits >> 8) & 0xFF)
|
|
62
|
-
result.push(bits & 0xFF)
|
|
56
|
+
result.push((bits >> 16) & 0xFF)
|
|
57
|
+
result.push((bits >> 8) & 0xFF)
|
|
58
|
+
result.push(bits & 0xFF)
|
|
63
59
|
} else if (tailbits === 18) {
|
|
64
|
-
result.push((bits >> 10) & 0xFF)
|
|
65
|
-
result.push((bits >> 2) & 0xFF)
|
|
60
|
+
result.push((bits >> 10) & 0xFF)
|
|
61
|
+
result.push((bits >> 2) & 0xFF)
|
|
66
62
|
} else if (tailbits === 12) {
|
|
67
|
-
result.push((bits >> 4) & 0xFF)
|
|
63
|
+
result.push((bits >> 4) & 0xFF)
|
|
68
64
|
}
|
|
69
65
|
|
|
70
|
-
return new Uint8Array(result)
|
|
66
|
+
return new Uint8Array(result)
|
|
71
67
|
}
|
|
72
68
|
|
|
73
|
-
function representYamlBinary(object /*, style*/) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
function representYamlBinary (object /*, style */) {
|
|
70
|
+
let result = ''
|
|
71
|
+
let bits = 0
|
|
72
|
+
const max = object.length
|
|
73
|
+
const map = BASE64_MAP
|
|
77
74
|
|
|
78
75
|
// Convert every three bytes to 4 ASCII characters.
|
|
79
76
|
|
|
80
|
-
for (idx = 0; idx < max; idx++) {
|
|
77
|
+
for (let idx = 0; idx < max; idx++) {
|
|
81
78
|
if ((idx % 3 === 0) && idx) {
|
|
82
|
-
result += map[(bits >> 18) & 0x3F]
|
|
83
|
-
result += map[(bits >> 12) & 0x3F]
|
|
84
|
-
result += map[(bits >> 6) & 0x3F]
|
|
85
|
-
result += map[bits & 0x3F]
|
|
79
|
+
result += map[(bits >> 18) & 0x3F]
|
|
80
|
+
result += map[(bits >> 12) & 0x3F]
|
|
81
|
+
result += map[(bits >> 6) & 0x3F]
|
|
82
|
+
result += map[bits & 0x3F]
|
|
86
83
|
}
|
|
87
84
|
|
|
88
|
-
bits = (bits << 8) + object[idx]
|
|
85
|
+
bits = (bits << 8) + object[idx]
|
|
89
86
|
}
|
|
90
87
|
|
|
91
88
|
// Dump tail
|
|
92
89
|
|
|
93
|
-
tail = max % 3
|
|
90
|
+
const tail = max % 3
|
|
94
91
|
|
|
95
92
|
if (tail === 0) {
|
|
96
|
-
result += map[(bits >> 18) & 0x3F]
|
|
97
|
-
result += map[(bits >> 12) & 0x3F]
|
|
98
|
-
result += map[(bits >> 6) & 0x3F]
|
|
99
|
-
result += map[bits & 0x3F]
|
|
93
|
+
result += map[(bits >> 18) & 0x3F]
|
|
94
|
+
result += map[(bits >> 12) & 0x3F]
|
|
95
|
+
result += map[(bits >> 6) & 0x3F]
|
|
96
|
+
result += map[bits & 0x3F]
|
|
100
97
|
} else if (tail === 2) {
|
|
101
|
-
result += map[(bits >> 10) & 0x3F]
|
|
102
|
-
result += map[(bits >> 4) & 0x3F]
|
|
103
|
-
result += map[(bits << 2) & 0x3F]
|
|
104
|
-
result += map[64]
|
|
98
|
+
result += map[(bits >> 10) & 0x3F]
|
|
99
|
+
result += map[(bits >> 4) & 0x3F]
|
|
100
|
+
result += map[(bits << 2) & 0x3F]
|
|
101
|
+
result += map[64]
|
|
105
102
|
} else if (tail === 1) {
|
|
106
|
-
result += map[(bits >> 2) & 0x3F]
|
|
107
|
-
result += map[(bits << 4) & 0x3F]
|
|
108
|
-
result += map[64]
|
|
109
|
-
result += map[64]
|
|
103
|
+
result += map[(bits >> 2) & 0x3F]
|
|
104
|
+
result += map[(bits << 4) & 0x3F]
|
|
105
|
+
result += map[64]
|
|
106
|
+
result += map[64]
|
|
110
107
|
}
|
|
111
108
|
|
|
112
|
-
return result
|
|
109
|
+
return result
|
|
113
110
|
}
|
|
114
111
|
|
|
115
|
-
function isBinary(obj) {
|
|
116
|
-
return Object.prototype.toString.call(obj) ===
|
|
112
|
+
function isBinary (obj) {
|
|
113
|
+
return Object.prototype.toString.call(obj) === '[object Uint8Array]'
|
|
117
114
|
}
|
|
118
115
|
|
|
119
116
|
module.exports = new Type('tag:yaml.org,2002:binary', {
|
|
@@ -122,4 +119,4 @@ module.exports = new Type('tag:yaml.org,2002:binary', {
|
|
|
122
119
|
construct: constructYamlBinary,
|
|
123
120
|
predicate: isBinary,
|
|
124
121
|
represent: representYamlBinary
|
|
125
|
-
})
|
|
122
|
+
})
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
'use strict'
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const Type = require('../type')
|
|
4
4
|
|
|
5
|
-
function resolveYamlBoolean(data) {
|
|
6
|
-
if (data === null) return false
|
|
5
|
+
function resolveYamlBoolean (data) {
|
|
6
|
+
if (data === null) return false
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const max = data.length
|
|
9
9
|
|
|
10
10
|
return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||
|
|
11
|
-
(max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'))
|
|
11
|
+
(max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'))
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
function constructYamlBoolean(data) {
|
|
14
|
+
function constructYamlBoolean (data) {
|
|
15
15
|
return data === 'true' ||
|
|
16
16
|
data === 'True' ||
|
|
17
|
-
data === 'TRUE'
|
|
17
|
+
data === 'TRUE'
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function isBoolean(object) {
|
|
21
|
-
return Object.prototype.toString.call(object) === '[object Boolean]'
|
|
20
|
+
function isBoolean (object) {
|
|
21
|
+
return Object.prototype.toString.call(object) === '[object Boolean]'
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
module.exports = new Type('tag:yaml.org,2002:bool', {
|
|
@@ -27,9 +27,9 @@ module.exports = new Type('tag:yaml.org,2002:bool', {
|
|
|
27
27
|
construct: constructYamlBoolean,
|
|
28
28
|
predicate: isBoolean,
|
|
29
29
|
represent: {
|
|
30
|
-
lowercase: function (object) { return object ? 'true' : 'false'
|
|
31
|
-
uppercase: function (object) { return object ? 'TRUE' : 'FALSE'
|
|
32
|
-
camelcase: function (object) { return object ? 'True' : 'False'
|
|
30
|
+
lowercase: function (object) { return object ? 'true' : 'false' },
|
|
31
|
+
uppercase: function (object) { return object ? 'TRUE' : 'FALSE' },
|
|
32
|
+
camelcase: function (object) { return object ? 'True' : 'False' }
|
|
33
33
|
},
|
|
34
34
|
defaultStyle: 'lowercase'
|
|
35
|
-
})
|
|
35
|
+
})
|