diff --git a/.github/workflows/__analyze-ref-input.yml b/.github/workflows/__analyze-ref-input.yml index 9c4bf8e5ef..84b99876fe 100644 --- a/.github/workflows/__analyze-ref-input.yml +++ b/.github/workflows/__analyze-ref-input.yml @@ -26,23 +26,23 @@ jobs: matrix: include: - os: ubuntu-20.04 - version: stable-20210308 + version: stable-20211005 - os: macos-latest - version: stable-20210308 + version: stable-20211005 - os: windows-2019 - version: stable-20210308 + version: stable-20211005 - os: ubuntu-20.04 - version: stable-20210319 + version: stable-20220120 - os: macos-latest - version: stable-20210319 + version: stable-20220120 - os: windows-2019 - version: stable-20210319 - - os: ubuntu-20.04 - version: stable-20210809 + version: stable-20220120 + - os: ubuntu-latest + version: stable-20220401 - os: macos-latest - version: stable-20210809 - - os: windows-2019 - version: stable-20210809 + version: stable-20220401 + - os: windows-latest + version: stable-20220401 - os: ubuntu-latest version: cached - os: macos-latest @@ -72,6 +72,11 @@ jobs: uses: ./.github/prepare-test with: version: ${{ matrix.version }} + - name: Set up Go + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019' + uses: actions/setup-go@v3 + with: + go-version: ^1.13.1 - uses: ./../action/init with: tools: ${{ steps.prepare-test.outputs.tools-url }} diff --git a/.github/workflows/__go-custom-queries.yml b/.github/workflows/__go-custom-queries.yml index 23334160bb..3b4da7b4ed 100644 --- a/.github/workflows/__go-custom-queries.yml +++ b/.github/workflows/__go-custom-queries.yml @@ -26,23 +26,23 @@ jobs: matrix: include: - os: ubuntu-20.04 - version: stable-20210308 + version: stable-20211005 - os: macos-latest - version: stable-20210308 + version: stable-20211005 - os: windows-2019 - version: stable-20210308 + version: stable-20211005 - os: ubuntu-20.04 - version: stable-20210319 + version: stable-20220120 - os: macos-latest - version: stable-20210319 + version: stable-20220120 - os: windows-2019 - version: stable-20210319 - - os: ubuntu-20.04 - version: stable-20210809 + version: stable-20220120 + - os: ubuntu-latest + version: stable-20220401 - os: macos-latest - version: stable-20210809 - - os: windows-2019 - version: stable-20210809 + version: stable-20220401 + - os: windows-latest + version: stable-20220401 - os: ubuntu-latest version: cached - os: macos-latest @@ -72,7 +72,9 @@ jobs: uses: ./.github/prepare-test with: version: ${{ matrix.version }} - - uses: actions/setup-go@v3 + - name: Set up Go + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019' + uses: actions/setup-go@v3 with: go-version: ^1.13.1 - uses: ./../action/init diff --git a/.github/workflows/__go-tracing-autobuilder.yml b/.github/workflows/__go-tracing-autobuilder.yml index 5d2c2a6193..0de99293de 100644 --- a/.github/workflows/__go-tracing-autobuilder.yml +++ b/.github/workflows/__go-tracing-autobuilder.yml @@ -26,17 +26,17 @@ jobs: matrix: include: - os: ubuntu-20.04 - version: stable-20210308 + version: stable-20211005 - os: macos-latest - version: stable-20210308 + version: stable-20211005 - os: ubuntu-20.04 - version: stable-20210319 + version: stable-20220120 - os: macos-latest - version: stable-20210319 - - os: ubuntu-20.04 - version: stable-20210809 + version: stable-20220120 + - os: ubuntu-latest + version: stable-20220401 - os: macos-latest - version: stable-20210809 + version: stable-20220401 - os: ubuntu-latest version: cached - os: macos-latest @@ -60,7 +60,9 @@ jobs: uses: ./.github/prepare-test with: version: ${{ matrix.version }} - - uses: actions/setup-go@v3 + - name: Set up Go + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019' + uses: actions/setup-go@v3 with: go-version: ^1.13.1 - uses: ./../action/init diff --git a/.github/workflows/__go-tracing-custom-build-steps.yml b/.github/workflows/__go-tracing-custom-build-steps.yml index 473910f7ac..e9877327d1 100644 --- a/.github/workflows/__go-tracing-custom-build-steps.yml +++ b/.github/workflows/__go-tracing-custom-build-steps.yml @@ -26,17 +26,17 @@ jobs: matrix: include: - os: ubuntu-20.04 - version: stable-20210308 + version: stable-20211005 - os: macos-latest - version: stable-20210308 + version: stable-20211005 - os: ubuntu-20.04 - version: stable-20210319 + version: stable-20220120 - os: macos-latest - version: stable-20210319 - - os: ubuntu-20.04 - version: stable-20210809 + version: stable-20220120 + - os: ubuntu-latest + version: stable-20220401 - os: macos-latest - version: stable-20210809 + version: stable-20220401 - os: ubuntu-latest version: cached - os: macos-latest @@ -60,7 +60,9 @@ jobs: uses: ./.github/prepare-test with: version: ${{ matrix.version }} - - uses: actions/setup-go@v3 + - name: Set up Go + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019' + uses: actions/setup-go@v3 with: go-version: ^1.13.1 - uses: ./../action/init diff --git a/.github/workflows/__go-tracing-legacy-workflow.yml b/.github/workflows/__go-tracing-legacy-workflow.yml index dae64022b7..77aa3793db 100644 --- a/.github/workflows/__go-tracing-legacy-workflow.yml +++ b/.github/workflows/__go-tracing-legacy-workflow.yml @@ -26,17 +26,17 @@ jobs: matrix: include: - os: ubuntu-20.04 - version: stable-20210308 + version: stable-20211005 - os: macos-latest - version: stable-20210308 + version: stable-20211005 - os: ubuntu-20.04 - version: stable-20210319 + version: stable-20220120 - os: macos-latest - version: stable-20210319 - - os: ubuntu-20.04 - version: stable-20210809 + version: stable-20220120 + - os: ubuntu-latest + version: stable-20220401 - os: macos-latest - version: stable-20210809 + version: stable-20220401 - os: ubuntu-latest version: cached - os: macos-latest @@ -60,7 +60,9 @@ jobs: uses: ./.github/prepare-test with: version: ${{ matrix.version }} - - uses: actions/setup-go@v3 + - name: Set up Go + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019' + uses: actions/setup-go@v3 with: go-version: ^1.13.1 - uses: ./../action/init diff --git a/.github/workflows/__ml-powered-queries.yml b/.github/workflows/__ml-powered-queries.yml index 699323e578..5c73023747 100644 --- a/.github/workflows/__ml-powered-queries.yml +++ b/.github/workflows/__ml-powered-queries.yml @@ -25,11 +25,11 @@ jobs: strategy: matrix: include: - - os: ubuntu-latest + - os: ubuntu-20.04 version: stable-20220120 - os: macos-latest version: stable-20220120 - - os: windows-latest + - os: windows-2019 version: stable-20220120 - os: ubuntu-latest version: cached @@ -60,6 +60,11 @@ jobs: uses: ./.github/prepare-test with: version: ${{ matrix.version }} + - name: Set up Go + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019' + uses: actions/setup-go@v3 + with: + go-version: ^1.13.1 - uses: ./../action/init with: languages: javascript @@ -85,24 +90,19 @@ jobs: - name: Check sarif uses: ./../action/.github/check-sarif - if: matrix.os != 'windows-latest' || matrix.version == 'latest' || matrix.version - == 'nightly-latest' + # Running on Windows requires CodeQL CLI 2.9.0+. + if: "!(matrix.version == 'stable-20220120' && (matrix.os == 'windows-latest'\ + \ || matrix.os == 'windows-2019'))" with: sarif-file: ${{ runner.temp }}/results/javascript.sarif queries-run: js/ml-powered/nosql-injection,js/ml-powered/path-injection,js/ml-powered/sql-injection,js/ml-powered/xss queries-not-run: foo,bar - name: Check results - # Running ML-powered queries on Windows requires CodeQL CLI 2.9.0+. We don't run these checks - # against Windows and `cached` while CodeQL CLI 2.9.0 makes its way into `cached` to avoid the - # test starting to fail when the cached CodeQL Bundle gets updated. Once the CodeQL Bundle - # containing CodeQL CLI 2.9.0 has been fully released, we can drop this line and start running - # these checks on Windows and `cached`. - if: matrix.os != 'windows-latest' || matrix.version != 'cached' env: - # Running on Windows requires CodeQL CLI 2.9.0+, which has so far only made it to 'latest'. - SHOULD_RUN_ML_POWERED_QUERIES: ${{ matrix.os != 'windows-latest' || matrix.version - == 'latest' || matrix.version == 'nightly-latest' }} + # Running on Windows requires CodeQL CLI 2.9.0+. + SHOULD_RUN_ML_POWERED_QUERIES: ${{ !(matrix.version == 'stable-20220120' && + (matrix.os == 'windows-latest' || matrix.os == 'windows-2019')) }} shell: bash run: | echo "Expecting ML-powered queries to be run: ${SHOULD_RUN_ML_POWERED_QUERIES}" diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index e7378f4b17..c990a6ed09 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -26,17 +26,17 @@ jobs: matrix: include: - os: ubuntu-20.04 - version: stable-20210308 + version: stable-20211005 - os: macos-latest - version: stable-20210308 + version: stable-20211005 - os: ubuntu-20.04 - version: stable-20210319 + version: stable-20220120 - os: macos-latest - version: stable-20210319 - - os: ubuntu-20.04 - version: stable-20210809 + version: stable-20220120 + - os: ubuntu-latest + version: stable-20220401 - os: macos-latest - version: stable-20210809 + version: stable-20220401 - os: ubuntu-latest version: cached - os: macos-latest @@ -60,6 +60,11 @@ jobs: uses: ./.github/prepare-test with: version: ${{ matrix.version }} + - name: Set up Go + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019' + uses: actions/setup-go@v3 + with: + go-version: ^1.13.1 - uses: ./../action/init with: db-location: ${{ runner.temp }}/customDbLocation diff --git a/.github/workflows/__remote-config.yml b/.github/workflows/__remote-config.yml index 15fec5a514..948d6bf936 100644 --- a/.github/workflows/__remote-config.yml +++ b/.github/workflows/__remote-config.yml @@ -26,23 +26,23 @@ jobs: matrix: include: - os: ubuntu-20.04 - version: stable-20210308 + version: stable-20211005 - os: macos-latest - version: stable-20210308 + version: stable-20211005 - os: windows-2019 - version: stable-20210308 + version: stable-20211005 - os: ubuntu-20.04 - version: stable-20210319 + version: stable-20220120 - os: macos-latest - version: stable-20210319 + version: stable-20220120 - os: windows-2019 - version: stable-20210319 - - os: ubuntu-20.04 - version: stable-20210809 + version: stable-20220120 + - os: ubuntu-latest + version: stable-20220401 - os: macos-latest - version: stable-20210809 - - os: windows-2019 - version: stable-20210809 + version: stable-20220401 + - os: windows-latest + version: stable-20220401 - os: ubuntu-latest version: cached - os: macos-latest @@ -72,6 +72,11 @@ jobs: uses: ./.github/prepare-test with: version: ${{ matrix.version }} + - name: Set up Go + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019' + uses: actions/setup-go@v3 + with: + go-version: ^1.13.1 - uses: ./../action/init with: tools: ${{ steps.prepare-test.outputs.tools-url }} diff --git a/.github/workflows/unset-environment-new-cli.yml b/.github/workflows/__unset-environment.yml similarity index 87% rename from .github/workflows/unset-environment-new-cli.yml rename to .github/workflows/__unset-environment.yml index de9d0d4ee0..dcb8b0693c 100644 --- a/.github/workflows/unset-environment-new-cli.yml +++ b/.github/workflows/__unset-environment.yml @@ -1,5 +1,9 @@ -# See `unset-environment-old-cli.yml` for reasoning behind the separate tests. -name: PR Check - Test unsetting environment variables for CLI version >= 2.5.1 +# Warning: This file is generated automatically, and should not be modified. +# Instead, please modify the template in the pr-checks directory and run: +# pip install ruamel.yaml && python3 sync.py +# to regenerate this file. + +name: PR Check - Test unsetting environment variables env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GO111MODULE: auto @@ -22,7 +26,11 @@ jobs: matrix: include: - os: ubuntu-20.04 - version: stable-20210809 + version: stable-20211005 + - os: ubuntu-20.04 + version: stable-20220120 + - os: ubuntu-latest + version: stable-20220401 - os: ubuntu-latest version: cached - os: ubuntu-latest @@ -40,7 +48,9 @@ jobs: uses: ./.github/prepare-test with: version: ${{ matrix.version }} - - uses: actions/setup-go@v3 + - name: Set up Go + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019' + uses: actions/setup-go@v3 with: go-version: ^1.13.1 - uses: ./../action/init diff --git a/.github/workflows/__upload-ref-sha-input.yml b/.github/workflows/__upload-ref-sha-input.yml index 91a6b528c0..d9c29bd703 100644 --- a/.github/workflows/__upload-ref-sha-input.yml +++ b/.github/workflows/__upload-ref-sha-input.yml @@ -26,23 +26,23 @@ jobs: matrix: include: - os: ubuntu-20.04 - version: stable-20210308 + version: stable-20211005 - os: macos-latest - version: stable-20210308 + version: stable-20211005 - os: windows-2019 - version: stable-20210308 + version: stable-20211005 - os: ubuntu-20.04 - version: stable-20210319 + version: stable-20220120 - os: macos-latest - version: stable-20210319 + version: stable-20220120 - os: windows-2019 - version: stable-20210319 - - os: ubuntu-20.04 - version: stable-20210809 + version: stable-20220120 + - os: ubuntu-latest + version: stable-20220401 - os: macos-latest - version: stable-20210809 - - os: windows-2019 - version: stable-20210809 + version: stable-20220401 + - os: windows-latest + version: stable-20220401 - os: ubuntu-latest version: cached - os: macos-latest @@ -72,6 +72,11 @@ jobs: uses: ./.github/prepare-test with: version: ${{ matrix.version }} + - name: Set up Go + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019' + uses: actions/setup-go@v3 + with: + go-version: ^1.13.1 - uses: ./../action/init with: tools: ${{ steps.prepare-test.outputs.tools-url }} diff --git a/.github/workflows/__with-checkout-path.yml b/.github/workflows/__with-checkout-path.yml index b679c2da9a..29d9cfbb92 100644 --- a/.github/workflows/__with-checkout-path.yml +++ b/.github/workflows/__with-checkout-path.yml @@ -26,23 +26,23 @@ jobs: matrix: include: - os: ubuntu-20.04 - version: stable-20210308 + version: stable-20211005 - os: macos-latest - version: stable-20210308 + version: stable-20211005 - os: windows-2019 - version: stable-20210308 + version: stable-20211005 - os: ubuntu-20.04 - version: stable-20210319 + version: stable-20220120 - os: macos-latest - version: stable-20210319 + version: stable-20220120 - os: windows-2019 - version: stable-20210319 - - os: ubuntu-20.04 - version: stable-20210809 + version: stable-20220120 + - os: ubuntu-latest + version: stable-20220401 - os: macos-latest - version: stable-20210809 - - os: windows-2019 - version: stable-20210809 + version: stable-20220401 + - os: windows-latest + version: stable-20220401 - os: ubuntu-latest version: cached - os: macos-latest @@ -72,6 +72,11 @@ jobs: uses: ./.github/prepare-test with: version: ${{ matrix.version }} + - name: Set up Go + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019' + uses: actions/setup-go@v3 + with: + go-version: ^1.13.1 - uses: actions/checkout@v3 with: ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 diff --git a/.github/workflows/debug-artifacts.yml b/.github/workflows/debug-artifacts.yml index 55cc4dc35c..0a65f5d0af 100644 --- a/.github/workflows/debug-artifacts.yml +++ b/.github/workflows/debug-artifacts.yml @@ -20,30 +20,30 @@ jobs: strategy: matrix: include: - - os: ubuntu-20.04 - version: stable-20210308 - - os: macos-latest - version: stable-20210308 - - os: ubuntu-20.04 - version: stable-20210319 - - os: macos-latest - version: stable-20210319 - - os: ubuntu-20.04 - version: stable-20210809 - - os: macos-latest - version: stable-20210809 - - os: ubuntu-latest - version: cached - - os: macos-latest - version: cached - - os: ubuntu-latest - version: latest - - os: macos-latest - version: latest - - os: ubuntu-latest - version: nightly-latest - - os: macos-latest - version: nightly-latest + - os: ubuntu-20.04 + version: stable-20211005 + - os: macos-latest + version: stable-20211005 + - os: ubuntu-20.04 + version: stable-20220120 + - os: macos-latest + version: stable-20220120 + - os: ubuntu-latest + version: stable-20220401 + - os: macos-latest + version: stable-20220401 + - os: ubuntu-latest + version: cached + - os: macos-latest + version: cached + - os: ubuntu-latest + version: latest + - os: macos-latest + version: latest + - os: ubuntu-latest + version: nightly-latest + - os: macos-latest + version: nightly-latest name: Upload debug artifacts timeout-minutes: 45 runs-on: ${{ matrix.os }} @@ -84,10 +84,10 @@ jobs: - name: Check expected artifacts exist shell: bash run: | - VERSIONS="stable-20210308 stable-20210319 stable-20210809 cached latest nightly-latest" + VERSIONS="stable-20211005 stable-20220120 stable-20220401 cached latest nightly-latest" LANGUAGES="cpp csharp go java javascript python" for version in $VERSIONS; do - if [[ "$version" =~ stable-(20210308|20210319|20210809) ]]; then + if [[ "$version" =~ stable-(20211005|20220120|20210809) ]]; then # Note the absence of the period in "ubuntu-2004": this is present in the image name # but not the artifact name OPERATING_SYSTEMS="ubuntu-2004 macos-latest" diff --git a/.github/workflows/unset-environment-old-cli.yml b/.github/workflows/unset-environment-old-cli.yml deleted file mode 100644 index d06e867ec6..0000000000 --- a/.github/workflows/unset-environment-old-cli.yml +++ /dev/null @@ -1,92 +0,0 @@ -# There was a bug, fixed in CLI v2.5.1, that didn't propagate environment -# variables that the Java tracer needed. Here we test all languages -# except Java for these CLI versions. In `unset-environment-new-cli.yml` -# we test all languages for recent CLI versions. -name: PR Check - Test unsetting environment variables for CLI version < 2.5.1 -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GO111MODULE: auto -on: - push: - branches: - - main - - releases/v1 - - releases/v2 - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review - workflow_dispatch: {} -jobs: - unset-environment: - strategy: - matrix: - include: - - os: ubuntu-20.04 - version: stable-20210308 - - os: ubuntu-20.04 - version: stable-20210319 - name: Test unsetting environment variables - timeout-minutes: 45 - runs-on: ${{ matrix.os }} - steps: - - name: Check out repository - uses: actions/checkout@v3 - - name: Prepare test - id: prepare-test - uses: ./.github/prepare-test - with: - version: ${{ matrix.version }} - - uses: actions/setup-go@v3 - with: - go-version: ^1.13.1 - - uses: ./../action/init - with: - languages: csharp,cpp,go,javascript,python - db-location: ${{ runner.temp }}/customDbLocation - tools: ${{ steps.prepare-test.outputs.tools-url }} - env: - TEST_MODE: true - - name: Build code - shell: bash - run: env -i PATH="$PATH" HOME="$HOME" ./build.sh - - uses: ./../action/analyze - id: analysis - env: - TEST_MODE: true - - shell: bash - run: | - CPP_DB="${{ fromJson(steps.analysis.outputs.db-locations).cpp }}" - if [[ ! -d "$CPP_DB" ]] || [[ ! "$CPP_DB" == "${RUNNER_TEMP}/customDbLocation/cpp" ]]; then - echo "::error::Did not create a database for CPP, or created it in the wrong location." \ - "Expected location was '${RUNNER_TEMP}/customDbLocation/cpp' but actual was '${CPP_DB}'" - exit 1 - fi - CSHARP_DB="${{ fromJson(steps.analysis.outputs.db-locations).csharp }}" - if [[ ! -d "$CSHARP_DB" ]] || [[ ! "$CSHARP_DB" == "${RUNNER_TEMP}/customDbLocation/csharp" ]]; then - echo "::error::Did not create a database for C Sharp, or created it in the wrong location." \ - "Expected location was '${RUNNER_TEMP}/customDbLocation/csharp' but actual was '${CSHARP_DB}'" - exit 1 - fi - GO_DB="${{ fromJson(steps.analysis.outputs.db-locations).go }}" - if [[ ! -d "$GO_DB" ]] || [[ ! "$GO_DB" == "${RUNNER_TEMP}/customDbLocation/go" ]]; then - echo "::error::Did not create a database for Go, or created it in the wrong location." \ - "Expected location was '${RUNNER_TEMP}/customDbLocation/go' but actual was '${GO_DB}'" - exit 1 - fi - JAVASCRIPT_DB="${{ fromJson(steps.analysis.outputs.db-locations).javascript }}" - if [[ ! -d "$JAVASCRIPT_DB" ]] || [[ ! "$JAVASCRIPT_DB" == "${RUNNER_TEMP}/customDbLocation/javascript" ]]; then - echo "::error::Did not create a database for Javascript, or created it in the wrong location." \ - "Expected location was '${RUNNER_TEMP}/customDbLocation/javascript' but actual was '${JAVASCRIPT_DB}'" - exit 1 - fi - PYTHON_DB="${{ fromJson(steps.analysis.outputs.db-locations).python }}" - if [[ ! -d "$PYTHON_DB" ]] || [[ ! "$PYTHON_DB" == "${RUNNER_TEMP}/customDbLocation/python" ]]; then - echo "::error::Did not create a database for Python, or created it in the wrong location." \ - "Expected location was '${RUNNER_TEMP}/customDbLocation/python' but actual was '${PYTHON_DB}'" - exit 1 - fi - env: - INTERNAL_CODEQL_ACTION_DEBUG_LOC: true diff --git a/CHANGELOG.md b/CHANGELOG.md index a12cf80ef5..9c5eb9cfac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Update default CodeQL bundle version to 2.11.3. [#1348](https://github.com/github/codeql-action/pull/1348) - Update the ML-powered additional query pack for JavaScript to version 0.4.0. [#1351](https://github.com/github/codeql-action/pull/1351) +- Bump the minimum CodeQL bundle version to 2.6.3. [#1358](https://github.com/github/codeql-action/pull/1358) ## 2.1.31 - 04 Nov 2022 diff --git a/lib/analyze.js b/lib/analyze.js index a6bc4be2b6..174775f650 100644 --- a/lib/analyze.js +++ b/lib/analyze.js @@ -32,7 +32,6 @@ const yaml = __importStar(require("js-yaml")); const analysisPaths = __importStar(require("./analysis-paths")); const codeql_1 = require("./codeql"); const configUtils = __importStar(require("./config-utils")); -const count_loc_1 = require("./count-loc"); const languages_1 = require("./languages"); const sharedEnv = __importStar(require("./shared-environment")); const tracer_config_1 = require("./tracer-config"); @@ -124,17 +123,6 @@ async function finalizeDatabaseCreation(config, threadsFlag, memoryFlag, logger) // Runs queries and creates sarif files in the given folder async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, automationDetailsId, config, logger, featureEnablement) { const statusReport = {}; - let locPromise = Promise.resolve({}); - const cliCanCountBaseline = await cliCanCountLoC(); - const countLocDebugMode = process.env["INTERNAL_CODEQL_ACTION_DEBUG_LOC"] || config.debugMode; - if (!cliCanCountBaseline || countLocDebugMode) { - // count the number of lines in the background - locPromise = (0, count_loc_1.countLoc)(path.resolve(), - // config.paths specifies external directories. the current - // directory is included in the analysis by default. Replicate - // that here. - config.paths, config.pathsIgnore, config.languages, logger); - } const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd); await util.logCodeScanningConfigInCli(codeql, featureEnablement, logger); for (const language of config.languages) { @@ -145,11 +133,11 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, const hasCustomQueries = (queries === null || queries === void 0 ? void 0 : queries.custom.length) > 0; const hasPackWithCustomQueries = packsWithVersion.length > 0; if (!hasBuiltinQueries && !hasCustomQueries && !hasPackWithCustomQueries) { - throw new Error(`Unable to analyse ${language} as no queries were selected for this language`); + throw new Error(`Unable to analyze ${language} as no queries were selected for this language`); } try { if (await util.useCodeScanningConfigInCli(codeql, featureEnablement)) { - // If we are using the codescanning config in the CLI, + // If we are using the code scanning config in the CLI, // much of the work needed to generate the query suites // is done in the CLI. We just need to make a single // call to run all the queries for each language and @@ -200,20 +188,12 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, const startTimeInterpretResults = new Date().getTime(); const sarifFile = path.join(sarifFolder, `${language}.sarif`); const analysisSummary = await runInterpretResults(language, querySuitePaths, sarifFile, config.debugMode); - if (!cliCanCountBaseline) { - await injectLinesOfCode(sarifFile, language, locPromise); - } statusReport[`interpret_results_${language}_duration_ms`] = new Date().getTime() - startTimeInterpretResults; logger.endGroup(); logger.info(analysisSummary); } - if (!cliCanCountBaseline || countLocDebugMode) { - printLinesOfCodeSummary(logger, language, await locPromise); - } - if (cliCanCountBaseline) { - logger.info(await runPrintLinesOfCode(language)); - } + logger.info(await runPrintLinesOfCode(language)); } catch (e) { logger.info(String(e)); @@ -229,9 +209,6 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, const databasePath = util.getCodeQLDatabasePath(config, language); return await codeql.databaseInterpretResults(databasePath, queries, sarifFile, addSnippetsFlag, threadsFlag, enableDebugLogging ? "-vv" : "-v", automationDetailsId, featureEnablement); } - async function cliCanCountLoC() { - return await util.codeQlVersionAbove(await (0, codeql_1.getCodeQL)(config.codeQLCmd), codeql_1.CODEQL_VERSION_COUNTS_LINES); - } async function runPrintLinesOfCode(language) { const databasePath = util.getCodeQLDatabasePath(config, language); return await codeql.databasePrintBaseline(databasePath); @@ -323,34 +300,6 @@ async function runCleanup(config, cleanupLevel, logger) { logger.endGroup(); } exports.runCleanup = runCleanup; -async function injectLinesOfCode(sarifFile, language, locPromise) { - var _a; - const lineCounts = await locPromise; - if (language in lineCounts) { - const sarif = JSON.parse(fs.readFileSync(sarifFile, "utf8")); - if (Array.isArray(sarif.runs)) { - for (const run of sarif.runs) { - run.properties = run.properties || {}; - run.properties.metricResults = run.properties.metricResults || []; - for (const metric of run.properties.metricResults) { - // Baseline is inserted when matching rule has tag lines-of-code - if (metric.rule && metric.rule.toolComponent) { - const matchingRule = run.tool.extensions[metric.rule.toolComponent.index].rules[metric.rule.index]; - if ((_a = matchingRule.properties.tags) === null || _a === void 0 ? void 0 : _a.includes("lines-of-code")) { - metric.baseline = lineCounts[language]; - } - } - } - } - } - fs.writeFileSync(sarifFile, JSON.stringify(sarif)); - } -} -function printLinesOfCodeSummary(logger, language, lineCounts) { - if (language in lineCounts) { - logger.info(`Counted a baseline of ${lineCounts[language]} lines of code for ${language}.`); - } -} // exported for testing function validateQueryFilters(queryFilters) { if (!queryFilters) { diff --git a/lib/analyze.js.map b/lib/analyze.js.map index 7845322346..998cbc80d0 100644 --- a/lib/analyze.js.map +++ b/lib/analyze.js.map @@ -1 +1 @@ -{"version":3,"file":"analyze.js","sourceRoot":"","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M,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC7B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACrB,MAAM,CAAC,IAAI,CACT,2CAA2C,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAChE,CAAC;SACH;QACD,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;YAC7C,MAAM,CAAC,IAAI,CACT,qDAAqD,IAAI,CAAC,SAAS,CACjE,EAAE,CACH,EAAE,CACJ,CAAC;SACH;KACF;IAED,IAAI,MAAM,CAAC,MAAM,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KAChE;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAjCD,oDAiCC"} \ No newline at end of file diff --git a/lib/analyze.test.js b/lib/analyze.test.js index abbd66e86f..a00781a050 100644 --- a/lib/analyze.test.js +++ b/lib/analyze.test.js @@ -26,10 +26,8 @@ const fs = __importStar(require("fs")); const path = __importStar(require("path")); const ava_1 = __importDefault(require("ava")); const yaml = __importStar(require("js-yaml")); -const sinon = __importStar(require("sinon")); const analyze_1 = require("./analyze"); const codeql_1 = require("./codeql"); -const count = __importStar(require("./count-loc")); const languages_1 = require("./languages"); const logging_1 = require("./logging"); const testing_utils_1 = require("./testing-utils"); @@ -39,12 +37,6 @@ const util = __importStar(require("./util")); // and correct case of builtin or custom. Also checks the correct search // paths are set in the database analyze invocation. (0, ava_1.default)("status report fields and search path setting", async (t) => { - const mockLinesOfCode = Object.values(languages_1.Language).reduce((obj, lang, i) => { - // use a different line count for each language - obj[lang] = i + 1; - return obj; - }, {}); - sinon.stub(count, "countLoc").resolves(mockLinesOfCode); let searchPathsUsed = []; return await util.withTmpDir(async (tmpDir) => { (0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir); @@ -98,6 +90,7 @@ const util = __importStar(require("./util")); })); return ""; }, + databasePrintBaseline: async () => "", }); searchPathsUsed = []; const config = { @@ -166,32 +159,8 @@ const util = __importStar(require("./util")); t.deepEqual(searchPathsUsed, expectedSearchPathsUsed); t.true(`interpret_results_${language}_duration_ms` in customStatusReport); } - verifyLineCounts(tmpDir); verifyQuerySuites(tmpDir); }); - function verifyLineCounts(tmpDir) { - // eslint-disable-next-line github/array-foreach - Object.keys(languages_1.Language).forEach((lang, i) => { - verifyLineCountForFile(path.join(tmpDir, `${lang}.sarif`), i + 1); - }); - } - function verifyLineCountForFile(filePath, lineCount) { - const sarif = JSON.parse(fs.readFileSync(filePath, "utf8")); - t.deepEqual(sarif.runs[0].properties.metricResults, [ - { - rule: { - index: 0, - toolComponent: { - index: 0, - }, - }, - value: 123, - baseline: lineCount, - }, - ]); - // when the rule doesn't exist, it should not be added - t.deepEqual(sarif.runs[1].properties.metricResults, []); - } function verifyQuerySuites(tmpDir) { const qlsContent = [ { diff --git a/lib/analyze.test.js.map b/lib/analyze.test.js.map index dfec606080..4913f6d39a 100644 --- a/lib/analyze.test.js.map +++ b/lib/analyze.test.js.map @@ -1 +1 @@ -{"version":3,"file":"analyze.test.js","sourceRoot":"","sources":["../src/analyze.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,8CAA6C;AAC7C,8CAAgC;AAChC,6CAA+B;AAE/B,uCAKmB;AACnB,qCAAqC;AAErC,mDAAqC;AACrC,2CAAuC;AACvC,uCAA4C;AAC5C,mDAA+E;AAC/E,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,yEAAyE;AACzE,wEAAwE;AACxE,oDAAoD;AACpD,IAAA,aAAI,EAAC,8CAA8C,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC/D,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,oBAAQ,CAAC,CAAC,M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AAC,CAAC;AAEH,IAAA,aAAI,EAAC,0BAA0B,EAAE,CAAC,CAAC,EAAE,EAAE;IACrC,MAAM,UAAU,GAAG,IAAA,kCAAwB,EACzC,CAAC,WAAW,EAAE,WAAW,CAAC,EAC1B;QACE;YACE,OAAO,EAAE,EAAE,kBAAkB,EAAE,gBAAgB,EAAE;SAClD;QACD;YACE,OAAO,EAAE,EAAE,kBAAkB,EAAE,gBAAgB,EAAE;SAClD;KACF,CACF,CAAC;IACF,MAAM,QAAQ,GAAG;;;;;;CAMlB,CAAC;IAEA,CAAC,CAAC,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/codeql.js b/lib/codeql.js index 313018e295..deee9433d0 100644 --- a/lib/codeql.js +++ b/lib/codeql.js @@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getExtraOptions = exports.getCodeQLForTesting = exports.getCachedCodeQL = exports.setCodeQL = exports.getCodeQL = exports.convertToSemVer = exports.getCodeQLURLVersion = exports.setupCodeQL = exports.getCodeQLActionRepository = exports.CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES = exports.CODEQL_VERSION_ML_POWERED_QUERIES_WINDOWS = exports.CODEQL_VERSION_TRACING_GLIBC_2_34 = exports.CODEQL_VERSION_NEW_TRACING = exports.CODEQL_VERSION_GHES_PACK_DOWNLOAD = exports.CODEQL_VERSION_CONFIG_FILES = exports.CODEQL_VERSION_COUNTS_LINES = exports.CODEQL_DEFAULT_ACTION_REPOSITORY = exports.CommandInvocationError = void 0; +exports.getExtraOptions = exports.getCodeQLForTesting = exports.getCachedCodeQL = exports.setCodeQL = exports.getCodeQL = exports.convertToSemVer = exports.getCodeQLURLVersion = exports.setupCodeQL = exports.getCodeQLActionRepository = exports.CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES = exports.CODEQL_VERSION_ML_POWERED_QUERIES_WINDOWS = exports.CODEQL_VERSION_TRACING_GLIBC_2_34 = exports.CODEQL_VERSION_NEW_TRACING = exports.CODEQL_VERSION_GHES_PACK_DOWNLOAD = exports.CODEQL_VERSION_CONFIG_FILES = exports.CODEQL_DEFAULT_ACTION_REPOSITORY = exports.CommandInvocationError = void 0; const fs = __importStar(require("fs")); const path = __importStar(require("path")); const toolrunner = __importStar(require("@actions/exec/lib/toolrunner")); @@ -60,25 +60,18 @@ const CODEQL_BUNDLE_VERSION = defaults.bundleVersion; exports.CODEQL_DEFAULT_ACTION_REPOSITORY = "github/codeql-action"; /** * The oldest version of CodeQL that the Action will run with. This should be - * at least three minor versions behind the current version. The version flags - * below can be used to conditionally enable certain features on versions newer - * than this. Please record the reason we cannot support an older version. + * at least three minor versions behind the current version and must include the + * CLI versions shipped with each supported version of GHES. * - * Reason: First version containing fix for the "We still have not reached - * idleness" deadlock. + * The version flags below can be used to conditionally enable certain features + * on versions newer than this. */ -const CODEQL_MINIMUM_VERSION = "2.4.5"; +const CODEQL_MINIMUM_VERSION = "2.6.3"; /** * Versions of CodeQL that version-flag certain functionality in the Action. * For convenience, please keep these in descending order. Once a version * flag is older than the oldest supported version above, it may be removed. */ -const CODEQL_VERSION_RAM_FINALIZE = "2.5.8"; -const CODEQL_VERSION_DIAGNOSTICS = "2.5.6"; -const CODEQL_VERSION_METRICS = "2.5.5"; -const CODEQL_VERSION_GROUP_RULES = "2.5.5"; -const CODEQL_VERSION_SARIF_GROUP = "2.5.3"; -exports.CODEQL_VERSION_COUNTS_LINES = "2.6.2"; const CODEQL_VERSION_CUSTOM_QUERY_HELP = "2.7.1"; const CODEQL_VERSION_LUA_TRACER_CONFIG = "2.10.0"; exports.CODEQL_VERSION_CONFIG_FILES = "2.10.1"; @@ -521,7 +514,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { extraArgs.push("--no-internal-use-lua-tracing"); } } - const configLocation = await generateCodescanningConfig(codeql, config, featureEnablement); + const configLocation = await generateCodeScanningConfig(codeql, config, featureEnablement); if (configLocation) { extraArgs.push(`--codescanning-config=${configLocation}`); } @@ -607,11 +600,10 @@ async function getCodeQLForCmd(cmd, checkVersion) { "finalize", "--finalize-dataset", threadsFlag, + memoryFlag, ...getExtraOptionsFromEnv(["database", "finalize"]), databasePath, ]; - if (await util.codeQlVersionAbove(this, CODEQL_VERSION_RAM_FINALIZE)) - args.push(memoryFlag); await (0, toolrunner_error_catcher_1.toolrunnerErrorCatcher)(cmd, args, error_matcher_1.errorMatchers); }, async resolveLanguages() { @@ -692,18 +684,14 @@ async function getCodeQLForCmd(cmd, checkVersion) { verbosityFlag, `--output=${sarifFile}`, addSnippetsFlag, + "--print-diagnostics-summary", + "--print-metrics-summary", + "--sarif-group-rules-by-pack", ...getExtraOptionsFromEnv(["database", "interpret-results"]), ]; - if (await util.codeQlVersionAbove(this, CODEQL_VERSION_DIAGNOSTICS)) - codeqlArgs.push("--print-diagnostics-summary"); - if (await util.codeQlVersionAbove(this, CODEQL_VERSION_METRICS)) - codeqlArgs.push("--print-metrics-summary"); - if (await util.codeQlVersionAbove(this, CODEQL_VERSION_GROUP_RULES)) - codeqlArgs.push("--sarif-group-rules-by-pack"); if (await util.codeQlVersionAbove(this, CODEQL_VERSION_CUSTOM_QUERY_HELP)) codeqlArgs.push("--sarif-add-query-help"); - if (automationDetailsId !== undefined && - (await util.codeQlVersionAbove(this, CODEQL_VERSION_SARIF_GROUP))) { + if (automationDetailsId !== undefined) { codeqlArgs.push("--sarif-category", automationDetailsId); } if (await featureEnablement.getValue(feature_flags_1.Feature.FileBaselineInformationEnabled, this)) { @@ -791,8 +779,8 @@ async function getCodeQLForCmd(cmd, checkVersion) { await new toolrunner.ToolRunner(cmd, args).exec(); }, }; - // To ensure that status reports include the CodeQL CLI version whereever - // possbile, we want to call getVersion(), which populates the version value + // To ensure that status reports include the CodeQL CLI version wherever + // possible, we want to call getVersion(), which populates the version value // used by status reporting, at the earliest opportunity. But invoking // getVersion() directly here breaks tests that only pretend to create a // CodeQL object. So instead we rely on the assumption that all non-test @@ -886,7 +874,7 @@ async function runTool(cmd, args = []) { * @param config The configuration to use. * @returns the path to the generated user configuration file. */ -async function generateCodescanningConfig(codeql, config, featureEnablement) { +async function generateCodeScanningConfig(codeql, config, featureEnablement) { var _a; if (!(await util.useCodeScanningConfigInCli(codeql, featureEnablement))) { return; diff --git a/lib/codeql.js.map b/lib/codeql.js.map index a666d2944f..d1a952195d 100644 --- a/lib/codeql.js.map +++ b/lib/codeql.js.map @@ -1 +1 @@ -{"version":3,"file":"codeql.js","sourceRoot":"","sources":["../src/codeql.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AAEzB,2CAA6B;AAE7B,yEAA2D;AAC3D,+DAAiD;AACjD,sEAAuD;AACvD,8CAAgC;AAChC,gEAAsD;AACtD,+CAAiC;AACjC,+BAAoC;AAEpC,iDAA6E;AAC7E,kDAAoC;AAEpC,0DAA4C,CAAC,2CAA2C;AACxF,mDAAgD;AAChD,mDAA6D;AAC7D,2CAAyD;AAEzD,yEAAoE;AACpE,iDAGwB;AACxB,6CAA+B;AAC/B,iCAAuC;AAuBvC,MAAa,sBAAuB,SAAQ,KAAK;IAC/C,YACE,GAAW,EACX,IAAc,EACd,QAAgB,EAChB,KAAa,EACN,MAAc;QAErB,KAAK,CACH,oBAAoB,GAAG,mBAAmB,IAAI;kBAClC,QAAQ;QAClB,KAAK,EAAE,CACV,CAAC;QANK,WAAM,GAAN,MAAM,CAAQ;IAOvB,CAAC;CACF;AAdD,wDAcC;AAgKD;;;GAGG;AACH,IAAI,YAAY,GAAuB,SAAS,CAAC;AAEjD,MAAM,qBAAqB,GAAG,QAAQ,CAAC,aAAa,CAAC;AACxC,QAAA,gCAAgC,GAAG,sBAAsB,CAAC;AAEvE;;;;;;;;GAQG;AACH,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAEvC;;;;GAIG;AACH,MAAM,2BAA2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AC,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;aACpD;SACF;aAAM;YACL,eAAe,CAAC,KAAK,GAAG,MAAM,CAAC,sBAAsB,CAAC,UAAU,CAAC;SAClE;KACF;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,EAAE;QACzE,OAAO,eAAe,CAAC,KAAK,CAAC;KAC9B;IACD,IAAI,MAAM,CAAC,sBAAsB,CAAC,iBAAiB,EAAE;QACnD,uEAAuE;QACvE,0DAA0D;QAC1D,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC;QAEhE,IAAI,eAAe,CAAC,KAAK,KAAK,SAAS;YAAE,eAAe,CAAC,KAAK,GAAG,EAAE,CAAC;QACpE,IAAI,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE;YACxC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SACxC;aAAM;YACL,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU;gBACnC,eAAe,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;YAC3C,eAAe,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SACtD;KACF;IAED,EAAE,CAAC,aAAa,CAAC,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAC7D,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,SAAS,WAAW,CAAC,GAAQ;IAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AACzC,CAAC"} \ No newline at end of file diff --git a/lib/count-loc.js b/lib/count-loc.js deleted file mode 100644 index 533c220d0b..0000000000 --- a/lib/count-loc.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.countLoc = void 0; -const github_linguist_1 = require("github-linguist"); -const languages_1 = require("./languages"); -// Map from linguist language names to language prefixes used in the action and codeql -const linguistToMetrics = { - c: languages_1.Language.cpp, - "c++": languages_1.Language.cpp, - "c#": languages_1.Language.csharp, - go: languages_1.Language.go, - java: languages_1.Language.java, - javascript: languages_1.Language.javascript, - python: languages_1.Language.python, - ruby: languages_1.Language.ruby, - swift: languages_1.Language.swift, - typescript: languages_1.Language.javascript, -}; -const nameToLinguist = Object.entries(linguistToMetrics).reduce((obj, [key, name]) => { - if (!obj[name]) { - obj[name] = []; - } - obj[name].push(key); - return obj; -}, {}); -/** - * Count the lines of code of the specified language using the include - * and exclude glob paths. - * - * @param cwd the root directory to start the count from - * @param include glob patterns to include in the search for relevant files - * @param exclude glob patterns to exclude in the search for relevant files - * @param dbLanguages list of languages to include in the results - * @param logger object to log results - */ -async function countLoc(cwd, include, exclude, dbLanguages, logger) { - const result = await new github_linguist_1.LocDir({ - cwd, - include: Array.isArray(include) && include.length > 0 ? include : ["**"], - exclude, - analysisLanguages: dbLanguages.flatMap((lang) => nameToLinguist[lang]), - }).loadInfo(); - // The analysis counts LoC in all languages. We need to - // extract the languages we care about. Also, note that - // the analysis uses slightly different names for language. - const lineCounts = Object.entries(result.languages).reduce((obj, [language, { code }]) => { - const metricsLanguage = linguistToMetrics[language]; - if (metricsLanguage && dbLanguages.includes(metricsLanguage)) { - obj[metricsLanguage] = code + (obj[metricsLanguage] || 0); - } - return obj; - }, {}); - if (Object.keys(lineCounts).length) { - logger.debug("Lines of code count:"); - for (const [language, count] of Object.entries(lineCounts)) { - logger.debug(` ${language}: ${count}`); - } - } - else { - logger.info("Could not determine the baseline lines of code count in this repository. " + - "Because of this, it will not be possible to compare the lines " + - "of code analyzed by code scanning with the baseline. This will not affect " + - "the results produced by code scanning. If you have any questions, you can " + - "raise an issue at https://github.com/github/codeql-action/issues. Please " + - "include a link to the repository if public, or otherwise information about " + - "the code scanning workflow you are using."); - } - return lineCounts; -} -exports.countLoc = countLoc; -//# sourceMappingURL=count-loc.js.map \ No newline at end of file diff --git a/lib/count-loc.js.map b/lib/count-loc.js.map deleted file mode 100644 index f174522aa2..0000000000 --- a/lib/count-loc.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"count-loc.js","sourceRoot":"","sources":["../src/count-loc.ts"],"names":[],"mappings":";;;AAAA,qDAAyC;AAEzC,2CAAuC;AAGvC,sFAAsF;AACtF,MAAM,iBAAiB,GAA6B;IAClD,CAAC,EAAE,oBAAQ,CAAC,GAAG;IACf,KAAK,EAAE,oBAAQ,CAAC,GAAG;IACnB,IAAI,EAAE,oBAAQ,CAAC,MAAM;IACrB,EAAE,EAAE,oBAAQ,CAAC,EAAE;IACf,IAAI,EAAE,oBAAQ,CAAC,IAAI;IACnB,UAAU,EAAE,oBAAQ,CAAC,UAAU;IAC/B,MAAM,EAAE,oBAAQ,CAAC,MAAM;IACvB,IAAI,EAAE,oBAAQ,CAAC,IAAI;IACnB,KAAK,EAAE,oBAAQ,CAAC,KAAK;IACrB,UAAU,EAAE,oBAAQ,CAAC,UAAU;CAChC,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAC7D,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE;IACnB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACd,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;KAChB;IACD,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpB,OAAO,GAAG,CAAC;AACb,CAAC,EACD,EAAgC,CACjC,CAAC;AAEF;;;;;;;;;GASG;AACI,KAAK,UAAU,QAAQ,CAC5B,GAAW,EACX,OAAiB,EACjB,OAAiB,EACjB,WAAuB,EACvB,MA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E,4EAA4E;YAC5E,4EAA4E;YAC5E,2EAA2E;YAC3E,6EAA6E;YAC7E,2CAA2C,CAC9C,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AA9CD,4BA8CC"} \ No newline at end of file diff --git a/lib/count-loc.test.js b/lib/count-loc.test.js deleted file mode 100644 index 278e6f5a10..0000000000 --- a/lib/count-loc.test.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const path = __importStar(require("path")); -const ava_1 = __importDefault(require("ava")); -const count_loc_1 = require("./count-loc"); -const languages_1 = require("./languages"); -const logging_1 = require("./logging"); -const testing_utils_1 = require("./testing-utils"); -(0, testing_utils_1.setupTests)(ava_1.default); -(0, ava_1.default)("ensure lines of code works for cpp and js", async (t) => { - const results = await (0, count_loc_1.countLoc)(path.join(__dirname, "../tests/multi-language-repo"), [], [], [languages_1.Language.cpp, languages_1.Language.javascript], (0, logging_1.getRunnerLogger)(true)); - t.deepEqual(results, { - cpp: 6, - javascript: 9, - }); -}); -(0, ava_1.default)("ensure lines of code works for csharp", async (t) => { - const results = await (0, count_loc_1.countLoc)(path.join(__dirname, "../tests/multi-language-repo"), [], [], [languages_1.Language.csharp], (0, logging_1.getRunnerLogger)(true)); - t.deepEqual(results, { - csharp: 10, - }); -}); -(0, ava_1.default)("ensure lines of code can handle undefined language", async (t) => { - const results = await (0, count_loc_1.countLoc)(path.join(__dirname, "../tests/multi-language-repo"), [], [], [languages_1.Language.javascript, languages_1.Language.python, "hucairz"], (0, logging_1.getRunnerLogger)(true)); - t.deepEqual(results, { - javascript: 9, - python: 5, - }); -}); -(0, ava_1.default)("ensure lines of code can handle empty languages", async (t) => { - const results = await (0, count_loc_1.countLoc)(path.join(__dirname, "../tests/multi-language-repo"), [], [], [], (0, logging_1.getRunnerLogger)(true)); - t.deepEqual(results, {}); -}); -(0, ava_1.default)("ensure lines of code can handle includes", async (t) => { - // note that "**" is always included. The includes are for extra - // directories outside the normal structure. - const results = await (0, count_loc_1.countLoc)(path.join(__dirname, "../tests/multi-language-repo"), ["../../src/testdata"], [], [languages_1.Language.javascript], (0, logging_1.getRunnerLogger)(true)); - t.deepEqual(results, { - javascript: 12, - }); -}); -(0, ava_1.default)("ensure lines of code can handle empty includes", async (t) => { - // note that "**" is always included. The includes are for extra - // directories outside the normal structure. - const results = await (0, count_loc_1.countLoc)(path.join(__dirname, "../tests/multi-language-repo"), ["idontexist"], [], [languages_1.Language.javascript], (0, logging_1.getRunnerLogger)(true)); - t.deepEqual(results, { - // should get no results - }); -}); -(0, ava_1.default)("ensure lines of code can handle exclude", async (t) => { - const results = await (0, count_loc_1.countLoc)(path.join(__dirname, "../tests/multi-language-repo"), [], ["**/*.py"], [languages_1.Language.javascript, languages_1.Language.python], (0, logging_1.getRunnerLogger)(true)); - t.deepEqual(results, { - javascript: 9, - }); -}); -//# sourceMappingURL=count-loc.test.js.map \ No newline at end of file diff --git a/lib/count-loc.test.js.map b/lib/count-loc.test.js.map deleted file mode 100644 index 192ed7d4d9..0000000000 --- a/lib/count-loc.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"count-loc.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,CAAC,YAAY,CAAC,EACd,EAAE,EACF,CAAC,oBAAQ,CAAC,UAAU,CAAC,EACrB,IAAA,yBAAe,EAAC,IAAI,CAAC,CACtB,CAAC;IAEF,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE;IACnB,wBAAwB;KACzB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,IAAA,aAAI,EAAC,yCAAyC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC1D,MAAM,OAAO,GAAG,MAAM,IAAA,oBAAQ,EAC5B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,8BAA8B,CAAC,EACpD,EAAE,EACF,CAAC,SAAS,CAAC,EACX,CAAC,oBAAQ,CAAC,UAAU,EAAE,oBAAQ,CAAC,MAAM,CAAC,EACtC,IAAA,yBAAe,EAAC,IAAI,CAAC,CACtB,CAAC;IAEF,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE;QACnB,UAAU,EAAE,CAAC;KACd,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/.bin/loc b/node_modules/.bin/loc deleted file mode 120000 index 966723a58b..0000000000 --- a/node_modules/.bin/loc +++ /dev/null @@ -1 +0,0 @@ -../github-linguist/dist/cli.js \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index be398706c9..77d7dcd1c0 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1185,6 +1185,7 @@ "node_modules/ansi-styles": { "version": "3.2.1", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -1244,14 +1245,6 @@ "node": ">=8" } }, - "node_modules/array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array.prototype.flat": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", @@ -1632,6 +1625,7 @@ "node_modules/chalk": { "version": "2.4.2", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -1799,13 +1793,15 @@ "node_modules/color-convert": { "version": "1.9.3", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, "dependencies": { "color-name": "1.1.3" } }, "node_modules/color-name": { "version": "1.1.3", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true }, "node_modules/combined-stream": { "version": "1.0.8", @@ -2117,6 +2113,7 @@ "node_modules/escape-string-regexp": { "version": "1.0.5", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, "engines": { "node": ">=0.8.0" } @@ -3108,15 +3105,6 @@ "version": "0.0.1-security", "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" }, - "node_modules/fs-extra": { - "version": "4.0.3", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" @@ -3186,77 +3174,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/github-linguist": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/github-linguist/-/github-linguist-2.4.4.tgz", - "integrity": "sha512-QSw/HfSTqA13t7eqNeGLd62ghnTsTQAUrJQKkUG100NZqqzpsKB9c7gH7lFaGU1ZWGmNSWfhG6q1Ok/xotOA/g==", - "dependencies": { - "chalk": "^2.2.0", - "commander": "^2.11.0", - "fs-extra": "^4.0.3", - "globby": "^6.1.0", - "language-map": "^1.3.0", - "slash2": "^2.0.0" - }, - "bin": { - "loc": "dist/cli.js" - } - }, - "node_modules/github-linguist/node_modules/array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dependencies": { - "array-uniq": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/github-linguist/node_modules/commander": { - "version": "2.20.3", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "node_modules/github-linguist/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/github-linguist/node_modules/globby": { - "version": "6.1.0", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dependencies": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/github-linguist/node_modules/pify": { - "version": "2.3.0", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/glob": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.1.tgz", @@ -3369,6 +3286,7 @@ "node_modules/has-flag": { "version": "3.0.0", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, "engines": { "node": ">=4" } @@ -3794,13 +3712,6 @@ "json5": "lib/cli.js" } }, - "node_modules/jsonfile": { - "version": "4.0.0", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, "node_modules/jsonschema": { "version": "1.2.6", "integrity": "sha512-SqhURKZG07JyKKeo/ir24QnS4/BV7a6gQy93bUSe4lUdNp0QNpIz2c9elWJQ9dpc5cQYY6cvCzgRwy0MQCLyqA==", @@ -3814,10 +3725,6 @@ "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", "dev": true }, - "node_modules/language-map": { - "version": "1.4.0", - "integrity": "sha512-5XHMCqKQ/14VXwJTKZX7MZwsVyTrR0bwCsRBwrBq3nP4w7liMJiR0ixXgI29EF/T1/U6be8cYK2y0ibWW9kx2w==" - }, "node_modules/levn": { "version": "0.4.1", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", @@ -4190,13 +4097,6 @@ "node": ">=8" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", @@ -4466,23 +4366,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pinkie": { - "version": "2.0.4", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/pkg-conf": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz", @@ -5090,13 +4973,6 @@ "node": ">=8" } }, - "node_modules/slash2": { - "version": "2.0.0", - "integrity": "sha512-7ElvBydJPi3MHU/KEOblFSbO/skl4Z69jKkFCpYIYVOMSIZsKi4gYU43HGeZPmjxCXrHekoDAAewphPQNnsqtA==", - "engines": { - "node": ">=6" - } - }, "node_modules/slice-ansi": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", @@ -5354,6 +5230,7 @@ "node_modules/supports-color": { "version": "5.5.0", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, "dependencies": { "has-flag": "^3.0.0" }, diff --git a/node_modules/array-uniq/index.js b/node_modules/array-uniq/index.js deleted file mode 100644 index edd09f8114..0000000000 --- a/node_modules/array-uniq/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -// there's 3 implementations written in increasing order of efficiency - -// 1 - no Set type is defined -function uniqNoSet(arr) { - var ret = []; - - for (var i = 0; i < arr.length; i++) { - if (ret.indexOf(arr[i]) === -1) { - ret.push(arr[i]); - } - } - - return ret; -} - -// 2 - a simple Set type is defined -function uniqSet(arr) { - var seen = new Set(); - return arr.filter(function (el) { - if (!seen.has(el)) { - seen.add(el); - return true; - } - - return false; - }); -} - -// 3 - a standard Set type is defined and it has a forEach method -function uniqSetWithForEach(arr) { - var ret = []; - - (new Set(arr)).forEach(function (el) { - ret.push(el); - }); - - return ret; -} - -// V8 currently has a broken implementation -// https://github.com/joyent/node/issues/8449 -function doesForEachActuallyWork() { - var ret = false; - - (new Set([true])).forEach(function (el) { - ret = el; - }); - - return ret === true; -} - -if ('Set' in global) { - if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) { - module.exports = uniqSetWithForEach; - } else { - module.exports = uniqSet; - } -} else { - module.exports = uniqNoSet; -} diff --git a/node_modules/array-uniq/license b/node_modules/array-uniq/license deleted file mode 100644 index 654d0bfe94..0000000000 --- a/node_modules/array-uniq/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/array-uniq/package.json b/node_modules/array-uniq/package.json deleted file mode 100644 index 106a3a95ff..0000000000 --- a/node_modules/array-uniq/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "array-uniq", - "version": "1.0.3", - "description": "Create an array without duplicates", - "license": "MIT", - "repository": "sindresorhus/array-uniq", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "array", - "arr", - "set", - "uniq", - "unique", - "es6", - "duplicate", - "remove" - ], - "devDependencies": { - "ava": "*", - "es6-set": "^0.1.0", - "require-uncached": "^1.0.2", - "xo": "*" - } -} diff --git a/node_modules/array-uniq/readme.md b/node_modules/array-uniq/readme.md deleted file mode 100644 index f0bd98c4f0..0000000000 --- a/node_modules/array-uniq/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq) - -> Create an array without duplicates - -It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays). - - -## Install - -``` -$ npm install --save array-uniq -``` - - -## Usage - -```js -const arrayUniq = require('array-uniq'); - -arrayUniq([1, 1, 2, 3, 3]); -//=> [1, 2, 3] - -arrayUniq(['foo', 'foo', 'bar', 'foo']); -//=> ['foo', 'bar'] -``` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/fs-extra/CHANGELOG.md b/node_modules/fs-extra/CHANGELOG.md deleted file mode 100644 index 29a37b521e..0000000000 --- a/node_modules/fs-extra/CHANGELOG.md +++ /dev/null @@ -1,796 +0,0 @@ -4.0.3 / 2017-12-05 ------------------- - -- Fix wrong `chmod` values in `fs.remove()` [#501](https://github.com/jprichardson/node-fs-extra/pull/501) -- Fix `TypeError` on systems that don't have some `fs` operations like `lchown` [#520](https://github.com/jprichardson/node-fs-extra/pull/520) - -4.0.2 / 2017-09-12 ------------------- - -- Added `EOL` option to `writeJson*` & `outputJson*` (via upgrade to jsonfile v4) -- Added promise support to [`fs.copyFile()`](https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_flags_callback) in Node 8.5+ -- Added `.js` extension to `main` field in `package.json` for better tooling compatibility. [#485](https://github.com/jprichardson/node-fs-extra/pull/485) - -4.0.1 / 2017-07-31 ------------------- - -### Fixed - -- Previously, `ensureFile()` & `ensureFileSync()` would do nothing if the path was a directory. Now, they error out for consistency with `ensureDir()`. [#465](https://github.com/jprichardson/node-fs-extra/issues/465), [#466](https://github.com/jprichardson/node-fs-extra/pull/466), [#470](https://github.com/jprichardson/node-fs-extra/issues/470) - -4.0.0 / 2017-07-14 ------------------- - -### Changed - -- **BREAKING:** The promisified versions of `fs.read()` & `fs.write()` now return objects. See [the docs](docs/fs-read-write.md) for details. [#436](https://github.com/jprichardson/node-fs-extra/issues/436), [#449](https://github.com/jprichardson/node-fs-extra/pull/449) -- `fs.move()` now errors out when destination is a subdirectory of source. [#458](https://github.com/jprichardson/node-fs-extra/pull/458) -- Applied upstream fixes from `rimraf` to `fs.remove()` & `fs.removeSync()`. [#459](https://github.com/jprichardson/node-fs-extra/pull/459) - -### Fixed - -- Got `fs.outputJSONSync()` working again; it was broken due to refactoring. [#428](https://github.com/jprichardson/node-fs-extra/pull/428) - -Also clarified the docs in a few places. - -3.0.1 / 2017-05-04 ------------------- - -- Fix bug in `move()` & `moveSync()` when source and destination are the same, and source does not exist. [#415](https://github.com/jprichardson/node-fs-extra/pull/415) - -3.0.0 / 2017-04-27 ------------------- - -### Added - -- **BREAKING:** Added Promise support. All asynchronous native fs methods and fs-extra methods now return a promise if the callback is not passed. [#403](https://github.com/jprichardson/node-fs-extra/pull/403) -- `pathExists()`, a replacement for the deprecated `fs.exists`. `pathExists` has a normal error-first callback signature. Also added `pathExistsSync`, an alias to `fs.existsSync`, for completeness. [#406](https://github.com/jprichardson/node-fs-extra/pull/406) - -### Removed - -- **BREAKING:** Removed support for setting the default spaces for `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()`. This was undocumented. [#402](https://github.com/jprichardson/node-fs-extra/pull/402) - -### Changed - -- Upgraded jsonfile dependency to v3.0.0: - - **BREAKING:** Changed behavior of `throws` option for `readJsonSync()`; now does not throw filesystem errors when `throws` is `false`. -- **BREAKING:** `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()` now output minified JSON by default for consistency with `JSON.stringify()`; set the `spaces` option to `2` to override this new behavior. [#402](https://github.com/jprichardson/node-fs-extra/pull/402) -- Use `Buffer.allocUnsafe()` instead of `new Buffer()` in environments that support it. [#394](https://github.com/jprichardson/node-fs-extra/pull/394) - -### Fixed - -- `removeSync()` silently failed on Windows in some cases. Now throws an `EBUSY` error. [#408](https://github.com/jprichardson/node-fs-extra/pull/408) - -2.1.2 / 2017-03-16 ------------------- - -### Fixed - -- Weird windows bug that resulted in `ensureDir()`'s callback being called twice in some cases. This bug may have also affected `remove()`. See [#392](https://github.com/jprichardson/node-fs-extra/issues/392), [#393](https://github.com/jprichardson/node-fs-extra/pull/393) - -2.1.1 / 2017-03-15 ------------------- - -### Fixed - -- Reverted [`5597bd`](https://github.com/jprichardson/node-fs-extra/commit/5597bd5b67f7d060f5f5bf26e9635be48330f5d7), this broke compatibility with Node.js versions v4+ but less than `v4.5.0`. -- Remove `Buffer.alloc()` usage in `moveSync()`. - -2.1.0 / 2017-03-15 ------------------- - -Thanks to [Mani Maghsoudlou (@manidlou)](https://github.com/manidlou) & [Jan Peer Stöcklmair (@JPeer264)](https://github.com/JPeer264) for their extraordinary help with this release! - -### Added -- `moveSync()` See [#309], [#381](https://github.com/jprichardson/node-fs-extra/pull/381). ([@manidlou](https://github.com/manidlou)) -- `copy()` and `copySync()`'s `filter` option now gets the destination path passed as the second parameter. [#366](https://github.com/jprichardson/node-fs-extra/pull/366) ([@manidlou](https://github.com/manidlou)) - -### Changed -- Use `Buffer.alloc()` instead of deprecated `new Buffer()` in `copySync()`. [#380](https://github.com/jprichardson/node-fs-extra/pull/380) ([@manidlou](https://github.com/manidlou)) -- Refactored entire codebase to use ES6 features supported by Node.js v4+ [#355](https://github.com/jprichardson/node-fs-extra/issues/355). [(@JPeer264)](https://github.com/JPeer264) -- Refactored docs. ([@manidlou](https://github.com/manidlou)) - -### Fixed - -- `move()` shouldn't error out when source and dest are the same. [#377](https://github.com/jprichardson/node-fs-extra/issues/377), [#378](https://github.com/jprichardson/node-fs-extra/pull/378) ([@jdalton](https://github.com/jdalton)) - -2.0.0 / 2017-01-16 ------------------- - -### Removed -- **BREAKING:** Removed support for Node `v0.12`. The Node foundation stopped officially supporting it -on Jan 1st, 2017. -- **BREAKING:** Remove `walk()` and `walkSync()`. `walkSync()` was only part of `fs-extra` for a little -over two months. Use [klaw](https://github.com/jprichardson/node-klaw) instead of `walk()`, in fact, `walk()` was just -an alias to klaw. For `walkSync()` use [klaw-sync](https://github.com/mawni/node-klaw-sync). See: [#338], [#339] - -### Changed -- **BREAKING:** Renamed `clobber` to `overwrite`. This affects `copy()`, `copySync()`, and `move()`. [#330], [#333] -- Moved docs, to `docs/`. [#340] - -### Fixed -- Apply filters to directories in `copySync()` like in `copy()`. [#324] -- A specific condition when disk is under heavy use, `copy()` can fail. [#326] - - -1.0.0 / 2016-11-01 ------------------- - -After five years of development, we finally have reach the 1.0.0 milestone! Big thanks goes -to [Ryan Zim](https://github.com/RyanZim) for leading the charge on this release! - -### Added -- `walkSync()` - -### Changed -- **BREAKING**: dropped Node v0.10 support. -- disabled `rimaf` globbing, wasn't used. [#280] -- deprecate `copy()/copySync()` option `filter` if it's a `RegExp`. `filter` should now be a function. -- inline `rimraf`. This is temporary and was done because `rimraf` depended upon the beefy `glob` which `fs-extra` does not use. [#300] - -### Fixed -- bug fix proper closing of file handle on `utimesMillis()` [#271] -- proper escaping of files with dollar signs [#291] -- `copySync()` failed if user didn't own file. [#199], [#301] - - -0.30.0 / 2016-04-28 -------------------- -- Brought back Node v0.10 support. I didn't realize there was still demand. Official support will end **2016-10-01**. - -0.29.0 / 2016-04-27 -------------------- -- **BREAKING**: removed support for Node v0.10. If you still want to use Node v0.10, everything should work except for `ensureLink()/ensureSymlink()`. Node v0.12 is still supported but will be dropped in the near future as well. - -0.28.0 / 2016-04-17 -------------------- -- **BREAKING**: removed `createOutputStream()`. Use https://www.npmjs.com/package/create-output-stream. See: [#192][#192] -- `mkdirs()/mkdirsSync()` check for invalid win32 path chars. See: [#209][#209], [#237][#237] -- `mkdirs()/mkdirsSync()` if drive not mounted, error. See: [#93][#93] - -0.27.0 / 2016-04-15 -------------------- -- add `dereference` option to `copySync()`. [#235][#235] - -0.26.7 / 2016-03-16 -------------------- -- fixed `copy()` if source and dest are the same. [#230][#230] - -0.26.6 / 2016-03-15 -------------------- -- fixed if `emptyDir()` does not have a callback: [#229][#229] - -0.26.5 / 2016-01-27 -------------------- -- `copy()` with two arguments (w/o callback) was broken. See: [#215][#215] - -0.26.4 / 2016-01-05 -------------------- -- `copySync()` made `preserveTimestamps` default consistent with `copy()` which is `false`. See: [#208][#208] - -0.26.3 / 2015-12-17 -------------------- -- fixed `copy()` hangup in copying blockDevice / characterDevice / `/dev/null`. See: [#193][#193] - -0.26.2 / 2015-11-02 -------------------- -- fixed `outputJson{Sync}()` spacing adherence to `fs.spaces` - -0.26.1 / 2015-11-02 -------------------- -- fixed `copySync()` when `clogger=true` and the destination is read only. See: [#190][#190] - -0.26.0 / 2015-10-25 -------------------- -- extracted the `walk()` function into its own module [`klaw`](https://github.com/jprichardson/node-klaw). - -0.25.0 / 2015-10-24 -------------------- -- now has a file walker `walk()` - -0.24.0 / 2015-08-28 -------------------- -- removed alias `delete()` and `deleteSync()`. See: [#171][#171] - -0.23.1 / 2015-08-07 -------------------- -- Better handling of errors for `move()` when moving across devices. [#170][#170] -- `ensureSymlink()` and `ensureLink()` should not throw errors if link exists. [#169][#169] - -0.23.0 / 2015-08-06 -------------------- -- added `ensureLink{Sync}()` and `ensureSymlink{Sync}()`. See: [#165][#165] - -0.22.1 / 2015-07-09 -------------------- -- Prevent calling `hasMillisResSync()` on module load. See: [#149][#149]. -Fixes regression that was introduced in `0.21.0`. - -0.22.0 / 2015-07-09 -------------------- -- preserve permissions / ownership in `copy()`. See: [#54][#54] - -0.21.0 / 2015-07-04 -------------------- -- add option to preserve timestamps in `copy()` and `copySync()`. See: [#141][#141] -- updated `graceful-fs@3.x` to `4.x`. This brings in features from `amazing-graceful-fs` (much cleaner code / less hacks) - -0.20.1 / 2015-06-23 -------------------- -- fixed regression caused by latest jsonfile update: See: https://github.com/jprichardson/node-jsonfile/issues/26 - -0.20.0 / 2015-06-19 -------------------- -- removed `jsonfile` aliases with `File` in the name, they weren't documented and probably weren't in use e.g. -this package had both `fs.readJsonFile` and `fs.readJson` that were aliases to each other, now use `fs.readJson`. -- preliminary walker created. Intentionally not documented. If you use it, it will almost certainly change and break your code. -- started moving tests inline -- upgraded to `jsonfile@2.1.0`, can now pass JSON revivers/replacers to `readJson()`, `writeJson()`, `outputJson()` - -0.19.0 / 2015-06-08 -------------------- -- `fs.copy()` had support for Node v0.8, dropped support - -0.18.4 / 2015-05-22 -------------------- -- fixed license field according to this: [#136][#136] and https://github.com/npm/npm/releases/tag/v2.10.0 - -0.18.3 / 2015-05-08 -------------------- -- bugfix: handle `EEXIST` when clobbering on some Linux systems. [#134][#134] - -0.18.2 / 2015-04-17 -------------------- -- bugfix: allow `F_OK` ([#120][#120]) - -0.18.1 / 2015-04-15 -------------------- -- improved windows support for `move()` a bit. https://github.com/jprichardson/node-fs-extra/commit/92838980f25dc2ee4ec46b43ee14d3c4a1d30c1b -- fixed a lot of tests for Windows (appveyor) - -0.18.0 / 2015-03-31 -------------------- -- added `emptyDir()` and `emptyDirSync()` - -0.17.0 / 2015-03-28 -------------------- -- `copySync` added `clobber` option (before always would clobber, now if `clobber` is `false` it throws an error if the destination exists). -**Only works with files at the moment.** -- `createOutputStream()` added. See: [#118][#118] - -0.16.5 / 2015-03-08 -------------------- -- fixed `fs.move` when `clobber` is `true` and destination is a directory, it should clobber. [#114][#114] - -0.16.4 / 2015-03-01 -------------------- -- `fs.mkdirs` fix infinite loop on Windows. See: See https://github.com/substack/node-mkdirp/pull/74 and https://github.com/substack/node-mkdirp/issues/66 - -0.16.3 / 2015-01-28 -------------------- -- reverted https://github.com/jprichardson/node-fs-extra/commit/1ee77c8a805eba5b99382a2591ff99667847c9c9 - - -0.16.2 / 2015-01-28 -------------------- -- fixed `fs.copy` for Node v0.8 (support is temporary and will be removed in the near future) - -0.16.1 / 2015-01-28 -------------------- -- if `setImmediate` is not available, fall back to `process.nextTick` - -0.16.0 / 2015-01-28 -------------------- -- bugfix `fs.move()` into itself. Closes [#104] -- bugfix `fs.move()` moving directory across device. Closes [#108] -- added coveralls support -- bugfix: nasty multiple callback `fs.copy()` bug. Closes [#98] -- misc fs.copy code cleanups - -0.15.0 / 2015-01-21 -------------------- -- dropped `ncp`, imported code in -- because of previous, now supports `io.js` -- `graceful-fs` is now a dependency - -0.14.0 / 2015-01-05 -------------------- -- changed `copy`/`copySync` from `fs.copy(src, dest, [filters], callback)` to `fs.copy(src, dest, [options], callback)` [#100][#100] -- removed mockfs tests for mkdirp (this may be temporary, but was getting in the way of other tests) - -0.13.0 / 2014-12-10 -------------------- -- removed `touch` and `touchSync` methods (they didn't handle permissions like UNIX touch) -- updated `"ncp": "^0.6.0"` to `"ncp": "^1.0.1"` -- imported `mkdirp` => `minimist` and `mkdirp` are no longer dependences, should now appease people who wanted `mkdirp` to be `--use_strict` safe. See [#59]([#59][#59]) - -0.12.0 / 2014-09-22 -------------------- -- copy symlinks in `copySync()` [#85][#85] - -0.11.1 / 2014-09-02 -------------------- -- bugfix `copySync()` preserve file permissions [#80][#80] - -0.11.0 / 2014-08-11 -------------------- -- upgraded `"ncp": "^0.5.1"` to `"ncp": "^0.6.0"` -- upgrade `jsonfile": "^1.2.0"` to `jsonfile": "^2.0.0"` => on write, json files now have `\n` at end. Also adds `options.throws` to `readJsonSync()` -see https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options for more details. - -0.10.0 / 2014-06-29 ------------------- -* bugfix: upgaded `"jsonfile": "~1.1.0"` to `"jsonfile": "^1.2.0"`, bumped minor because of `jsonfile` dep change -from `~` to `^`. [#67] - -0.9.1 / 2014-05-22 ------------------- -* removed Node.js `0.8.x` support, `0.9.0` was published moments ago and should have been done there - -0.9.0 / 2014-05-22 ------------------- -* upgraded `ncp` from `~0.4.2` to `^0.5.1`, [#58] -* upgraded `rimraf` from `~2.2.6` to `^2.2.8` -* upgraded `mkdirp` from `0.3.x` to `^0.5.0` -* added methods `ensureFile()`, `ensureFileSync()` -* added methods `ensureDir()`, `ensureDirSync()` [#31] -* added `move()` method. From: https://github.com/andrewrk/node-mv - - -0.8.1 / 2013-10-24 ------------------- -* copy failed to return an error to the callback if a file doesn't exist (ulikoehler [#38], [#39]) - -0.8.0 / 2013-10-14 ------------------- -* `filter` implemented on `copy()` and `copySync()`. (Srirangan / [#36]) - -0.7.1 / 2013-10-12 ------------------- -* `copySync()` implemented (Srirangan / [#33]) -* updated to the latest `jsonfile` version `1.1.0` which gives `options` params for the JSON methods. Closes [#32] - -0.7.0 / 2013-10-07 ------------------- -* update readme conventions -* `copy()` now works if destination directory does not exist. Closes [#29] - -0.6.4 / 2013-09-05 ------------------- -* changed `homepage` field in package.json to remove NPM warning - -0.6.3 / 2013-06-28 ------------------- -* changed JSON spacing default from `4` to `2` to follow Node conventions -* updated `jsonfile` dep -* updated `rimraf` dep - -0.6.2 / 2013-06-28 ------------------- -* added .npmignore, [#25] - -0.6.1 / 2013-05-14 ------------------- -* modified for `strict` mode, closes [#24] -* added `outputJson()/outputJsonSync()`, closes [#23] - -0.6.0 / 2013-03-18 ------------------- -* removed node 0.6 support -* added node 0.10 support -* upgraded to latest `ncp` and `rimraf`. -* optional `graceful-fs` support. Closes [#17] - - -0.5.0 / 2013-02-03 ------------------- -* Removed `readTextFile`. -* Renamed `readJSONFile` to `readJSON` and `readJson`, same with write. -* Restructured documentation a bit. Added roadmap. - -0.4.0 / 2013-01-28 ------------------- -* Set default spaces in `jsonfile` from 4 to 2. -* Updated `testutil` deps for tests. -* Renamed `touch()` to `createFile()` -* Added `outputFile()` and `outputFileSync()` -* Changed creation of testing diretories so the /tmp dir is not littered. -* Added `readTextFile()` and `readTextFileSync()`. - -0.3.2 / 2012-11-01 ------------------- -* Added `touch()` and `touchSync()` methods. - -0.3.1 / 2012-10-11 ------------------- -* Fixed some stray globals. - -0.3.0 / 2012-10-09 ------------------- -* Removed all CoffeeScript from tests. -* Renamed `mkdir` to `mkdirs`/`mkdirp`. - -0.2.1 / 2012-09-11 ------------------- -* Updated `rimraf` dep. - -0.2.0 / 2012-09-10 ------------------- -* Rewrote module into JavaScript. (Must still rewrite tests into JavaScript) -* Added all methods of [jsonfile](https://github.com/jprichardson/node-jsonfile) -* Added Travis-CI. - -0.1.3 / 2012-08-13 ------------------- -* Added method `readJSONFile`. - -0.1.2 / 2012-06-15 ------------------- -* Bug fix: `deleteSync()` didn't exist. -* Verified Node v0.8 compatibility. - -0.1.1 / 2012-06-15 ------------------- -* Fixed bug in `remove()`/`delete()` that wouldn't execute the function if a callback wasn't passed. - -0.1.0 / 2012-05-31 ------------------- -* Renamed `copyFile()` to `copy()`. `copy()` can now copy directories (recursively) too. -* Renamed `rmrf()` to `remove()`. -* `remove()` aliased with `delete()`. -* Added `mkdirp` capabilities. Named: `mkdir()`. Hides Node.js native `mkdir()`. -* Instead of exporting the native `fs` module with new functions, I now copy over the native methods to a new object and export that instead. - -0.0.4 / 2012-03-14 ------------------- -* Removed CoffeeScript dependency - -0.0.3 / 2012-01-11 ------------------- -* Added methods rmrf and rmrfSync -* Moved tests from Jasmine to Mocha - - -[#344]: https://github.com/jprichardson/node-fs-extra/issues/344 "Licence Year" -[#343]: https://github.com/jprichardson/node-fs-extra/pull/343 "Add klaw-sync link to readme" -[#342]: https://github.com/jprichardson/node-fs-extra/pull/342 "allow preserveTimestamps when use move" -[#341]: https://github.com/jprichardson/node-fs-extra/issues/341 "mkdirp(path.dirname(dest) in move() logic needs cleaning up [question]" -[#340]: https://github.com/jprichardson/node-fs-extra/pull/340 "Move docs to seperate docs folder [documentation]" -[#339]: https://github.com/jprichardson/node-fs-extra/pull/339 "Remove walk() & walkSync() [feature-walk]" -[#338]: https://github.com/jprichardson/node-fs-extra/issues/338 "Remove walk() and walkSync() [feature-walk]" -[#337]: https://github.com/jprichardson/node-fs-extra/issues/337 "copy doesn't return a yieldable value" -[#336]: https://github.com/jprichardson/node-fs-extra/pull/336 "Docs enhanced walk sync [documentation, feature-walk]" -[#335]: https://github.com/jprichardson/node-fs-extra/pull/335 "Refactor move() tests [feature-move]" -[#334]: https://github.com/jprichardson/node-fs-extra/pull/334 "Cleanup lib/move/index.js [feature-move]" -[#333]: https://github.com/jprichardson/node-fs-extra/pull/333 "Rename clobber to overwrite [feature-copy, feature-move]" -[#332]: https://github.com/jprichardson/node-fs-extra/pull/332 "BREAKING: Drop Node v0.12 & io.js support" -[#331]: https://github.com/jprichardson/node-fs-extra/issues/331 "Add support for chmodr [enhancement, future]" -[#330]: https://github.com/jprichardson/node-fs-extra/pull/330 "BREAKING: Do not error when copy destination exists & clobber: false [feature-copy]" -[#329]: https://github.com/jprichardson/node-fs-extra/issues/329 "Does .walk() scale to large directories? [question]" -[#328]: https://github.com/jprichardson/node-fs-extra/issues/328 "Copying files corrupts [feature-copy, needs-confirmed]" -[#327]: https://github.com/jprichardson/node-fs-extra/pull/327 "Use writeStream 'finish' event instead of 'close' [bug, feature-copy]" -[#326]: https://github.com/jprichardson/node-fs-extra/issues/326 "fs.copy fails with chmod error when disk under heavy use [bug, feature-copy]" -[#325]: https://github.com/jprichardson/node-fs-extra/issues/325 "ensureDir is difficult to promisify [enhancement]" -[#324]: https://github.com/jprichardson/node-fs-extra/pull/324 "copySync() should apply filter to directories like copy() [bug, feature-copy]" -[#323]: https://github.com/jprichardson/node-fs-extra/issues/323 "Support for `dest` being a directory when using `copy*()`?" -[#322]: https://github.com/jprichardson/node-fs-extra/pull/322 "Add fs-promise as fs-extra-promise alternative" -[#321]: https://github.com/jprichardson/node-fs-extra/issues/321 "fs.copy() with clobber set to false return EEXIST error [feature-copy]" -[#320]: https://github.com/jprichardson/node-fs-extra/issues/320 "fs.copySync: Error: EPERM: operation not permitted, unlink " -[#319]: https://github.com/jprichardson/node-fs-extra/issues/319 "Create directory if not exists" -[#318]: https://github.com/jprichardson/node-fs-extra/issues/318 "Support glob patterns [enhancement, future]" -[#317]: https://github.com/jprichardson/node-fs-extra/pull/317 "Adding copy sync test for src file without write perms" -[#316]: https://github.com/jprichardson/node-fs-extra/pull/316 "Remove move()'s broken limit option [feature-move]" -[#315]: https://github.com/jprichardson/node-fs-extra/pull/315 "Fix move clobber tests to work around graceful-fs bug." -[#314]: https://github.com/jprichardson/node-fs-extra/issues/314 "move() limit option [documentation, enhancement, feature-move]" -[#313]: https://github.com/jprichardson/node-fs-extra/pull/313 "Test that remove() ignores glob characters." -[#312]: https://github.com/jprichardson/node-fs-extra/pull/312 "Enhance walkSync() to return items with path and stats [feature-walk]" -[#311]: https://github.com/jprichardson/node-fs-extra/issues/311 "move() not work when dest name not provided [feature-move]" -[#310]: https://github.com/jprichardson/node-fs-extra/issues/310 "Edit walkSync to return items like what walk emits [documentation, enhancement, feature-walk]" -[#309]: https://github.com/jprichardson/node-fs-extra/issues/309 "moveSync support [enhancement, feature-move]" -[#308]: https://github.com/jprichardson/node-fs-extra/pull/308 "Fix incorrect anchor link" -[#307]: https://github.com/jprichardson/node-fs-extra/pull/307 "Fix coverage" -[#306]: https://github.com/jprichardson/node-fs-extra/pull/306 "Update devDeps, fix lint error" -[#305]: https://github.com/jprichardson/node-fs-extra/pull/305 "Re-add Coveralls" -[#304]: https://github.com/jprichardson/node-fs-extra/pull/304 "Remove path-is-absolute [enhancement]" -[#303]: https://github.com/jprichardson/node-fs-extra/pull/303 "Document copySync filter inconsistency [documentation, feature-copy]" -[#302]: https://github.com/jprichardson/node-fs-extra/pull/302 "fix(console): depreciated -> deprecated" -[#301]: https://github.com/jprichardson/node-fs-extra/pull/301 "Remove chmod call from copySync [feature-copy]" -[#300]: https://github.com/jprichardson/node-fs-extra/pull/300 "Inline Rimraf [enhancement, feature-move, feature-remove]" -[#299]: https://github.com/jprichardson/node-fs-extra/pull/299 "Warn when filter is a RegExp [feature-copy]" -[#298]: https://github.com/jprichardson/node-fs-extra/issues/298 "API Docs [documentation]" -[#297]: https://github.com/jprichardson/node-fs-extra/pull/297 "Warn about using preserveTimestamps on 32-bit node" -[#296]: https://github.com/jprichardson/node-fs-extra/pull/296 "Improve EEXIST error message for copySync [enhancement]" -[#295]: https://github.com/jprichardson/node-fs-extra/pull/295 "Depreciate using regular expressions for copy's filter option [documentation]" -[#294]: https://github.com/jprichardson/node-fs-extra/pull/294 "BREAKING: Refactor lib/copy/ncp.js [feature-copy]" -[#293]: https://github.com/jprichardson/node-fs-extra/pull/293 "Update CI configs" -[#292]: https://github.com/jprichardson/node-fs-extra/issues/292 "Rewrite lib/copy/ncp.js [enhancement, feature-copy]" -[#291]: https://github.com/jprichardson/node-fs-extra/pull/291 "Escape '$' in replacement string for async file copying" -[#290]: https://github.com/jprichardson/node-fs-extra/issues/290 "Exclude files pattern while copying using copy.config.js [question]" -[#289]: https://github.com/jprichardson/node-fs-extra/pull/289 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error" -[#288]: https://github.com/jprichardson/node-fs-extra/pull/288 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error" -[#287]: https://github.com/jprichardson/node-fs-extra/issues/287 "emptyDir() callback arguments are inconsistent [enhancement, feature-remove]" -[#286]: https://github.com/jprichardson/node-fs-extra/pull/286 "Added walkSync function" -[#285]: https://github.com/jprichardson/node-fs-extra/issues/285 "CITGM test failing on s390" -[#284]: https://github.com/jprichardson/node-fs-extra/issues/284 "outputFile method is missing a check to determine if existing item is a folder or not" -[#283]: https://github.com/jprichardson/node-fs-extra/pull/283 "Apply filter also on directories and symlinks for copySync()" -[#282]: https://github.com/jprichardson/node-fs-extra/pull/282 "Apply filter also on directories and symlinks for copySync()" -[#281]: https://github.com/jprichardson/node-fs-extra/issues/281 "remove function executes 'successfully' but doesn't do anything?" -[#280]: https://github.com/jprichardson/node-fs-extra/pull/280 "Disable rimraf globbing" -[#279]: https://github.com/jprichardson/node-fs-extra/issues/279 "Some code is vendored instead of included [awaiting-reply]" -[#278]: https://github.com/jprichardson/node-fs-extra/issues/278 "copy() does not preserve file/directory ownership" -[#277]: https://github.com/jprichardson/node-fs-extra/pull/277 "Mention defaults for clobber and dereference options" -[#276]: https://github.com/jprichardson/node-fs-extra/issues/276 "Cannot connect to Shared Folder [awaiting-reply]" -[#275]: https://github.com/jprichardson/node-fs-extra/issues/275 "EMFILE, too many open files on Mac OS with JSON API" -[#274]: https://github.com/jprichardson/node-fs-extra/issues/274 "Use with memory-fs? [enhancement, future]" -[#273]: https://github.com/jprichardson/node-fs-extra/pull/273 "tests: rename `remote.test.js` to `remove.test.js`" -[#272]: https://github.com/jprichardson/node-fs-extra/issues/272 "Copy clobber flag never err even when true [bug, feature-copy]" -[#271]: https://github.com/jprichardson/node-fs-extra/issues/271 "Unclosed file handle on futimes error" -[#270]: https://github.com/jprichardson/node-fs-extra/issues/270 "copy not working as desired on Windows [feature-copy, platform-windows]" -[#269]: https://github.com/jprichardson/node-fs-extra/issues/269 "Copying with preserveTimeStamps: true is inaccurate using 32bit node [feature-copy]" -[#268]: https://github.com/jprichardson/node-fs-extra/pull/268 "port fix for mkdirp issue #111" -[#267]: https://github.com/jprichardson/node-fs-extra/issues/267 "WARN deprecated wrench@1.5.9: wrench.js is deprecated!" -[#266]: https://github.com/jprichardson/node-fs-extra/issues/266 "fs-extra" -[#265]: https://github.com/jprichardson/node-fs-extra/issues/265 "Link the `fs.stat fs.exists` etc. methods for replace the `fs` module forever?" -[#264]: https://github.com/jprichardson/node-fs-extra/issues/264 "Renaming a file using move fails when a file inside is open (at least on windows) [wont-fix]" -[#263]: https://github.com/jprichardson/node-fs-extra/issues/263 "ENOSYS: function not implemented, link [needs-confirmed]" -[#262]: https://github.com/jprichardson/node-fs-extra/issues/262 "Add .exists() and .existsSync()" -[#261]: https://github.com/jprichardson/node-fs-extra/issues/261 "Cannot read property 'prototype' of undefined" -[#260]: https://github.com/jprichardson/node-fs-extra/pull/260 "use more specific path for method require" -[#259]: https://github.com/jprichardson/node-fs-extra/issues/259 "Feature Request: isEmpty" -[#258]: https://github.com/jprichardson/node-fs-extra/issues/258 "copy files does not preserve file timestamp" -[#257]: https://github.com/jprichardson/node-fs-extra/issues/257 "Copying a file on windows fails" -[#256]: https://github.com/jprichardson/node-fs-extra/pull/256 "Updated Readme " -[#255]: https://github.com/jprichardson/node-fs-extra/issues/255 "Update rimraf required version" -[#254]: https://github.com/jprichardson/node-fs-extra/issues/254 "request for readTree, readTreeSync, walkSync method" -[#253]: https://github.com/jprichardson/node-fs-extra/issues/253 "outputFile does not touch mtime when file exists" -[#252]: https://github.com/jprichardson/node-fs-extra/pull/252 "Fixing problem when copying file with no write permission" -[#251]: https://github.com/jprichardson/node-fs-extra/issues/251 "Just wanted to say thank you" -[#250]: https://github.com/jprichardson/node-fs-extra/issues/250 "`fs.remove()` not removing files (works with `rm -rf`)" -[#249]: https://github.com/jprichardson/node-fs-extra/issues/249 "Just a Question ... Remove Servers" -[#248]: https://github.com/jprichardson/node-fs-extra/issues/248 "Allow option to not preserve permissions for copy" -[#247]: https://github.com/jprichardson/node-fs-extra/issues/247 "Add TypeScript typing directly in the fs-extra package" -[#246]: https://github.com/jprichardson/node-fs-extra/issues/246 "fse.remove() && fse.removeSync() don't throw error on ENOENT file" -[#245]: https://github.com/jprichardson/node-fs-extra/issues/245 "filter for empty dir [enhancement]" -[#244]: https://github.com/jprichardson/node-fs-extra/issues/244 "copySync doesn't apply the filter to directories" -[#243]: https://github.com/jprichardson/node-fs-extra/issues/243 "Can I request fs.walk() to be synchronous?" -[#242]: https://github.com/jprichardson/node-fs-extra/issues/242 "Accidentally truncates file names ending with $$ [bug, feature-copy]" -[#241]: https://github.com/jprichardson/node-fs-extra/pull/241 "Remove link to createOutputStream" -[#240]: https://github.com/jprichardson/node-fs-extra/issues/240 "walkSync request" -[#239]: https://github.com/jprichardson/node-fs-extra/issues/239 "Depreciate regular expressions for copy's filter [documentation, feature-copy]" -[#238]: https://github.com/jprichardson/node-fs-extra/issues/238 "Can't write to files while in a worker thread." -[#237]: https://github.com/jprichardson/node-fs-extra/issues/237 ".ensureDir(..) fails silently when passed an invalid path..." -[#236]: https://github.com/jprichardson/node-fs-extra/issues/236 "[Removed] Filed under wrong repo" -[#235]: https://github.com/jprichardson/node-fs-extra/pull/235 "Adds symlink dereference option to `fse.copySync` (#191)" -[#234]: https://github.com/jprichardson/node-fs-extra/issues/234 "ensureDirSync fails silent when EACCES: permission denied on travis-ci" -[#233]: https://github.com/jprichardson/node-fs-extra/issues/233 "please make sure the first argument in callback is error object [feature-copy]" -[#232]: https://github.com/jprichardson/node-fs-extra/issues/232 "Copy a folder content to its child folder. " -[#231]: https://github.com/jprichardson/node-fs-extra/issues/231 "Adding read/write/output functions for YAML" -[#230]: https://github.com/jprichardson/node-fs-extra/pull/230 "throw error if src and dest are the same to avoid zeroing out + test" -[#229]: https://github.com/jprichardson/node-fs-extra/pull/229 "fix 'TypeError: callback is not a function' in emptyDir" -[#228]: https://github.com/jprichardson/node-fs-extra/pull/228 "Throw error when target is empty so file is not accidentally zeroed out" -[#227]: https://github.com/jprichardson/node-fs-extra/issues/227 "Uncatchable errors when there are invalid arguments [feature-move]" -[#226]: https://github.com/jprichardson/node-fs-extra/issues/226 "Moving to the current directory" -[#225]: https://github.com/jprichardson/node-fs-extra/issues/225 "EBUSY: resource busy or locked, unlink" -[#224]: https://github.com/jprichardson/node-fs-extra/issues/224 "fse.copy ENOENT error" -[#223]: https://github.com/jprichardson/node-fs-extra/issues/223 "Suspicious behavior of fs.existsSync" -[#222]: https://github.com/jprichardson/node-fs-extra/pull/222 "A clearer description of emtpyDir function" -[#221]: https://github.com/jprichardson/node-fs-extra/pull/221 "Update README.md" -[#220]: https://github.com/jprichardson/node-fs-extra/pull/220 "Non-breaking feature: add option 'passStats' to copy methods." -[#219]: https://github.com/jprichardson/node-fs-extra/pull/219 "Add closing parenthesis in copySync example" -[#218]: https://github.com/jprichardson/node-fs-extra/pull/218 "fix #187 #70 options.filter bug" -[#217]: https://github.com/jprichardson/node-fs-extra/pull/217 "fix #187 #70 options.filter bug" -[#216]: https://github.com/jprichardson/node-fs-extra/pull/216 "fix #187 #70 options.filter bug" -[#215]: https://github.com/jprichardson/node-fs-extra/pull/215 "fse.copy throws error when only src and dest provided [bug, documentation, feature-copy]" -[#214]: https://github.com/jprichardson/node-fs-extra/pull/214 "Fixing copySync anchor tag" -[#213]: https://github.com/jprichardson/node-fs-extra/issues/213 "Merge extfs with this repo" -[#212]: https://github.com/jprichardson/node-fs-extra/pull/212 "Update year to 2016 in README.md and LICENSE" -[#211]: https://github.com/jprichardson/node-fs-extra/issues/211 "Not copying all files" -[#210]: https://github.com/jprichardson/node-fs-extra/issues/210 "copy/copySync behave differently when copying a symbolic file [bug, documentation, feature-copy]" -[#209]: https://github.com/jprichardson/node-fs-extra/issues/209 "In Windows invalid directory name causes infinite loop in ensureDir(). [bug]" -[#208]: https://github.com/jprichardson/node-fs-extra/pull/208 "fix options.preserveTimestamps to false in copy-sync by default [feature-copy]" -[#207]: https://github.com/jprichardson/node-fs-extra/issues/207 "Add `compare` suite of functions" -[#206]: https://github.com/jprichardson/node-fs-extra/issues/206 "outputFileSync" -[#205]: https://github.com/jprichardson/node-fs-extra/issues/205 "fix documents about copy/copySync [documentation, feature-copy]" -[#204]: https://github.com/jprichardson/node-fs-extra/pull/204 "allow copy of block and character device files" -[#203]: https://github.com/jprichardson/node-fs-extra/issues/203 "copy method's argument options couldn't be undefined [bug, feature-copy]" -[#202]: https://github.com/jprichardson/node-fs-extra/issues/202 "why there is not a walkSync method?" -[#201]: https://github.com/jprichardson/node-fs-extra/issues/201 "clobber for directories [feature-copy, future]" -[#200]: https://github.com/jprichardson/node-fs-extra/issues/200 "'copySync' doesn't work in sync" -[#199]: https://github.com/jprichardson/node-fs-extra/issues/199 "fs.copySync fails if user does not own file [bug, feature-copy]" -[#198]: https://github.com/jprichardson/node-fs-extra/issues/198 "handle copying between identical files [feature-copy]" -[#197]: https://github.com/jprichardson/node-fs-extra/issues/197 "Missing documentation for `outputFile` `options` 3rd parameter [documentation]" -[#196]: https://github.com/jprichardson/node-fs-extra/issues/196 "copy filter: async function and/or function called with `fs.stat` result [future]" -[#195]: https://github.com/jprichardson/node-fs-extra/issues/195 "How to override with outputFile?" -[#194]: https://github.com/jprichardson/node-fs-extra/pull/194 "allow ensureFile(Sync) to provide data to be written to created file" -[#193]: https://github.com/jprichardson/node-fs-extra/issues/193 "`fs.copy` fails silently if source file is /dev/null [bug, feature-copy]" -[#192]: https://github.com/jprichardson/node-fs-extra/issues/192 "Remove fs.createOutputStream()" -[#191]: https://github.com/jprichardson/node-fs-extra/issues/191 "How to copy symlinks to target as normal folders [feature-copy]" -[#190]: https://github.com/jprichardson/node-fs-extra/pull/190 "copySync to overwrite destination file if readonly and clobber true" -[#189]: https://github.com/jprichardson/node-fs-extra/pull/189 "move.test fix to support CRLF on Windows" -[#188]: https://github.com/jprichardson/node-fs-extra/issues/188 "move.test failing on windows platform" -[#187]: https://github.com/jprichardson/node-fs-extra/issues/187 "Not filter each file, stops on first false [feature-copy]" -[#186]: https://github.com/jprichardson/node-fs-extra/issues/186 "Do you need a .size() function in this module? [future]" -[#185]: https://github.com/jprichardson/node-fs-extra/issues/185 "Doesn't work on NodeJS v4.x" -[#184]: https://github.com/jprichardson/node-fs-extra/issues/184 "CLI equivalent for fs-extra" -[#183]: https://github.com/jprichardson/node-fs-extra/issues/183 "with clobber true, copy and copySync behave differently if destination file is read only [bug, feature-copy]" -[#182]: https://github.com/jprichardson/node-fs-extra/issues/182 "ensureDir(dir, callback) second callback parameter not specified" -[#181]: https://github.com/jprichardson/node-fs-extra/issues/181 "Add ability to remove file securely [enhancement, wont-fix]" -[#180]: https://github.com/jprichardson/node-fs-extra/issues/180 "Filter option doesn't work the same way in copy and copySync [bug, feature-copy]" -[#179]: https://github.com/jprichardson/node-fs-extra/issues/179 "Include opendir" -[#178]: https://github.com/jprichardson/node-fs-extra/issues/178 "ENOTEMPTY is thrown on removeSync " -[#177]: https://github.com/jprichardson/node-fs-extra/issues/177 "fix `remove()` wildcards (introduced by rimraf) [feature-remove]" -[#176]: https://github.com/jprichardson/node-fs-extra/issues/176 "createOutputStream doesn't emit 'end' event" -[#175]: https://github.com/jprichardson/node-fs-extra/issues/175 "[Feature Request].moveSync support [feature-move, future]" -[#174]: https://github.com/jprichardson/node-fs-extra/pull/174 "Fix copy formatting and document options.filter" -[#173]: https://github.com/jprichardson/node-fs-extra/issues/173 "Feature Request: writeJson should mkdirs" -[#172]: https://github.com/jprichardson/node-fs-extra/issues/172 "rename `clobber` flags to `overwrite`" -[#171]: https://github.com/jprichardson/node-fs-extra/issues/171 "remove unnecessary aliases" -[#170]: https://github.com/jprichardson/node-fs-extra/pull/170 "More robust handling of errors moving across virtual drives" -[#169]: https://github.com/jprichardson/node-fs-extra/pull/169 "suppress ensureLink & ensureSymlink dest exists error" -[#168]: https://github.com/jprichardson/node-fs-extra/pull/168 "suppress ensurelink dest exists error" -[#167]: https://github.com/jprichardson/node-fs-extra/pull/167 "Adds basic (string, buffer) support for ensureFile content [future]" -[#166]: https://github.com/jprichardson/node-fs-extra/pull/166 "Adds basic (string, buffer) support for ensureFile content" -[#165]: https://github.com/jprichardson/node-fs-extra/pull/165 "ensure for link & symlink" -[#164]: https://github.com/jprichardson/node-fs-extra/issues/164 "Feature Request: ensureFile to take optional argument for file content" -[#163]: https://github.com/jprichardson/node-fs-extra/issues/163 "ouputJson not formatted out of the box [bug]" -[#162]: https://github.com/jprichardson/node-fs-extra/pull/162 "ensure symlink & link" -[#161]: https://github.com/jprichardson/node-fs-extra/pull/161 "ensure symlink & link" -[#160]: https://github.com/jprichardson/node-fs-extra/pull/160 "ensure symlink & link" -[#159]: https://github.com/jprichardson/node-fs-extra/pull/159 "ensure symlink & link" -[#158]: https://github.com/jprichardson/node-fs-extra/issues/158 "Feature Request: ensureLink and ensureSymlink methods" -[#157]: https://github.com/jprichardson/node-fs-extra/issues/157 "writeJson isn't formatted" -[#156]: https://github.com/jprichardson/node-fs-extra/issues/156 "Promise.promisifyAll doesn't work for some methods" -[#155]: https://github.com/jprichardson/node-fs-extra/issues/155 "Readme" -[#154]: https://github.com/jprichardson/node-fs-extra/issues/154 "/tmp/millis-test-sync" -[#153]: https://github.com/jprichardson/node-fs-extra/pull/153 "Make preserveTimes also work on read-only files. Closes #152" -[#152]: https://github.com/jprichardson/node-fs-extra/issues/152 "fs.copy fails for read-only files with preserveTimestamp=true [feature-copy]" -[#151]: https://github.com/jprichardson/node-fs-extra/issues/151 "TOC does not work correctly on npm [documentation]" -[#150]: https://github.com/jprichardson/node-fs-extra/issues/150 "Remove test file fixtures, create with code." -[#149]: https://github.com/jprichardson/node-fs-extra/issues/149 "/tmp/millis-test-sync" -[#148]: https://github.com/jprichardson/node-fs-extra/issues/148 "split out `Sync` methods in documentation" -[#147]: https://github.com/jprichardson/node-fs-extra/issues/147 "Adding rmdirIfEmpty" -[#146]: https://github.com/jprichardson/node-fs-extra/pull/146 "ensure test.js works" -[#145]: https://github.com/jprichardson/node-fs-extra/issues/145 "Add `fs.exists` and `fs.existsSync` if it doesn't exist." -[#144]: https://github.com/jprichardson/node-fs-extra/issues/144 "tests failing" -[#143]: https://github.com/jprichardson/node-fs-extra/issues/143 "update graceful-fs" -[#142]: https://github.com/jprichardson/node-fs-extra/issues/142 "PrependFile Feature" -[#141]: https://github.com/jprichardson/node-fs-extra/pull/141 "Add option to preserve timestamps" -[#140]: https://github.com/jprichardson/node-fs-extra/issues/140 "Json file reading fails with 'utf8'" -[#139]: https://github.com/jprichardson/node-fs-extra/pull/139 "Preserve file timestamp on copy. Closes #138" -[#138]: https://github.com/jprichardson/node-fs-extra/issues/138 "Preserve timestamps on copying files" -[#137]: https://github.com/jprichardson/node-fs-extra/issues/137 "outputFile/outputJson: Unexpected end of input" -[#136]: https://github.com/jprichardson/node-fs-extra/pull/136 "Update license attribute" -[#135]: https://github.com/jprichardson/node-fs-extra/issues/135 "emptyDir throws Error if no callback is provided" -[#134]: https://github.com/jprichardson/node-fs-extra/pull/134 "Handle EEXIST error when clobbering dir" -[#133]: https://github.com/jprichardson/node-fs-extra/pull/133 "Travis runs with `sudo: false`" -[#132]: https://github.com/jprichardson/node-fs-extra/pull/132 "isDirectory method" -[#131]: https://github.com/jprichardson/node-fs-extra/issues/131 "copySync is not working iojs 1.8.4 on linux [feature-copy]" -[#130]: https://github.com/jprichardson/node-fs-extra/pull/130 "Please review additional features." -[#129]: https://github.com/jprichardson/node-fs-extra/pull/129 "can you review this feature?" -[#128]: https://github.com/jprichardson/node-fs-extra/issues/128 "fsExtra.move(filepath, newPath) broken;" -[#127]: https://github.com/jprichardson/node-fs-extra/issues/127 "consider using fs.access to remove deprecated warnings for fs.exists" -[#126]: https://github.com/jprichardson/node-fs-extra/issues/126 " TypeError: Object # has no method 'access'" -[#125]: https://github.com/jprichardson/node-fs-extra/issues/125 "Question: What do the *Sync function do different from non-sync" -[#124]: https://github.com/jprichardson/node-fs-extra/issues/124 "move with clobber option 'ENOTEMPTY'" -[#123]: https://github.com/jprichardson/node-fs-extra/issues/123 "Only copy the content of a directory" -[#122]: https://github.com/jprichardson/node-fs-extra/pull/122 "Update section links in README to match current section ids." -[#121]: https://github.com/jprichardson/node-fs-extra/issues/121 "emptyDir is undefined" -[#120]: https://github.com/jprichardson/node-fs-extra/issues/120 "usage bug caused by shallow cloning methods of 'graceful-fs'" -[#119]: https://github.com/jprichardson/node-fs-extra/issues/119 "mkdirs and ensureDir never invoke callback and consume CPU indefinitely if provided a path with invalid characters on Windows" -[#118]: https://github.com/jprichardson/node-fs-extra/pull/118 "createOutputStream" -[#117]: https://github.com/jprichardson/node-fs-extra/pull/117 "Fixed issue with slash separated paths on windows" -[#116]: https://github.com/jprichardson/node-fs-extra/issues/116 "copySync can only copy directories not files [documentation, feature-copy]" -[#115]: https://github.com/jprichardson/node-fs-extra/issues/115 ".Copy & .CopySync [feature-copy]" -[#114]: https://github.com/jprichardson/node-fs-extra/issues/114 "Fails to move (rename) directory to non-empty directory even with clobber: true" -[#113]: https://github.com/jprichardson/node-fs-extra/issues/113 "fs.copy seems to callback early if the destination file already exists" -[#112]: https://github.com/jprichardson/node-fs-extra/pull/112 "Copying a file into an existing directory" -[#111]: https://github.com/jprichardson/node-fs-extra/pull/111 "Moving a file into an existing directory " -[#110]: https://github.com/jprichardson/node-fs-extra/pull/110 "Moving a file into an existing directory" -[#109]: https://github.com/jprichardson/node-fs-extra/issues/109 "fs.move across windows drives fails" -[#108]: https://github.com/jprichardson/node-fs-extra/issues/108 "fse.move directories across multiple devices doesn't work" -[#107]: https://github.com/jprichardson/node-fs-extra/pull/107 "Check if dest path is an existing dir and copy or move source in it" -[#106]: https://github.com/jprichardson/node-fs-extra/issues/106 "fse.copySync crashes while copying across devices D: [feature-copy]" -[#105]: https://github.com/jprichardson/node-fs-extra/issues/105 "fs.copy hangs on iojs" -[#104]: https://github.com/jprichardson/node-fs-extra/issues/104 "fse.move deletes folders [bug]" -[#103]: https://github.com/jprichardson/node-fs-extra/issues/103 "Error: EMFILE with copy" -[#102]: https://github.com/jprichardson/node-fs-extra/issues/102 "touch / touchSync was removed ?" -[#101]: https://github.com/jprichardson/node-fs-extra/issues/101 "fs-extra promisified" -[#100]: https://github.com/jprichardson/node-fs-extra/pull/100 "copy: options object or filter to pass to ncp" -[#99]: https://github.com/jprichardson/node-fs-extra/issues/99 "ensureDir() modes [future]" -[#98]: https://github.com/jprichardson/node-fs-extra/issues/98 "fs.copy() incorrect async behavior [bug]" -[#97]: https://github.com/jprichardson/node-fs-extra/pull/97 "use path.join; fix copySync bug" -[#96]: https://github.com/jprichardson/node-fs-extra/issues/96 "destFolderExists in copySync is always undefined." -[#95]: https://github.com/jprichardson/node-fs-extra/pull/95 "Using graceful-ncp instead of ncp" -[#94]: https://github.com/jprichardson/node-fs-extra/issues/94 "Error: EEXIST, file already exists '../mkdirp/bin/cmd.js' on fs.copySync() [enhancement, feature-copy]" -[#93]: https://github.com/jprichardson/node-fs-extra/issues/93 "Confusing error if drive not mounted [enhancement]" -[#92]: https://github.com/jprichardson/node-fs-extra/issues/92 "Problems with Bluebird" -[#91]: https://github.com/jprichardson/node-fs-extra/issues/91 "fs.copySync('/test', '/haha') is different with 'cp -r /test /haha' [enhancement]" -[#90]: https://github.com/jprichardson/node-fs-extra/issues/90 "Folder creation and file copy is Happening in 64 bit machine but not in 32 bit machine" -[#89]: https://github.com/jprichardson/node-fs-extra/issues/89 "Error: EEXIST using fs-extra's fs.copy to copy a directory on Windows" -[#88]: https://github.com/jprichardson/node-fs-extra/issues/88 "Stacking those libraries" -[#87]: https://github.com/jprichardson/node-fs-extra/issues/87 "createWriteStream + outputFile = ?" -[#86]: https://github.com/jprichardson/node-fs-extra/issues/86 "no moveSync?" -[#85]: https://github.com/jprichardson/node-fs-extra/pull/85 "Copy symlinks in copySync" -[#84]: https://github.com/jprichardson/node-fs-extra/issues/84 "Push latest version to npm ?" -[#83]: https://github.com/jprichardson/node-fs-extra/issues/83 "Prevent copying a directory into itself [feature-copy]" -[#82]: https://github.com/jprichardson/node-fs-extra/pull/82 "README updates for move" -[#81]: https://github.com/jprichardson/node-fs-extra/issues/81 "fd leak after fs.move" -[#80]: https://github.com/jprichardson/node-fs-extra/pull/80 "Preserve file mode in copySync" -[#79]: https://github.com/jprichardson/node-fs-extra/issues/79 "fs.copy only .html file empty" -[#78]: https://github.com/jprichardson/node-fs-extra/pull/78 "copySync was not applying filters to directories" -[#77]: https://github.com/jprichardson/node-fs-extra/issues/77 "Create README reference to bluebird" -[#76]: https://github.com/jprichardson/node-fs-extra/issues/76 "Create README reference to typescript" -[#75]: https://github.com/jprichardson/node-fs-extra/issues/75 "add glob as a dep? [question]" -[#74]: https://github.com/jprichardson/node-fs-extra/pull/74 "including new emptydir module" -[#73]: https://github.com/jprichardson/node-fs-extra/pull/73 "add dependency status in readme" -[#72]: https://github.com/jprichardson/node-fs-extra/pull/72 "Use svg instead of png to get better image quality" -[#71]: https://github.com/jprichardson/node-fs-extra/issues/71 "fse.copy not working on Windows 7 x64 OS, but, copySync does work" -[#70]: https://github.com/jprichardson/node-fs-extra/issues/70 "Not filter each file, stops on first false [bug]" -[#69]: https://github.com/jprichardson/node-fs-extra/issues/69 "How to check if folder exist and read the folder name" -[#68]: https://github.com/jprichardson/node-fs-extra/issues/68 "consider flag to readJsonSync (throw false) [enhancement]" -[#67]: https://github.com/jprichardson/node-fs-extra/issues/67 "docs for readJson incorrectly states that is accepts options" -[#66]: https://github.com/jprichardson/node-fs-extra/issues/66 "ENAMETOOLONG" -[#65]: https://github.com/jprichardson/node-fs-extra/issues/65 "exclude filter in fs.copy" -[#64]: https://github.com/jprichardson/node-fs-extra/issues/64 "Announce: mfs - monitor your fs-extra calls" -[#63]: https://github.com/jprichardson/node-fs-extra/issues/63 "Walk" -[#62]: https://github.com/jprichardson/node-fs-extra/issues/62 "npm install fs-extra doesn't work" -[#61]: https://github.com/jprichardson/node-fs-extra/issues/61 "No longer supports node 0.8 due to use of `^` in package.json dependencies" -[#60]: https://github.com/jprichardson/node-fs-extra/issues/60 "chmod & chown for mkdirs" -[#59]: https://github.com/jprichardson/node-fs-extra/issues/59 "Consider including mkdirp and making fs-extra '--use_strict' safe [question]" -[#58]: https://github.com/jprichardson/node-fs-extra/issues/58 "Stack trace not included in fs.copy error" -[#57]: https://github.com/jprichardson/node-fs-extra/issues/57 "Possible to include wildcards in delete?" -[#56]: https://github.com/jprichardson/node-fs-extra/issues/56 "Crash when have no access to write to destination file in copy " -[#55]: https://github.com/jprichardson/node-fs-extra/issues/55 "Is it possible to have any console output similar to Grunt copy module?" -[#54]: https://github.com/jprichardson/node-fs-extra/issues/54 "`copy` does not preserve file ownership and permissons" -[#53]: https://github.com/jprichardson/node-fs-extra/issues/53 "outputFile() - ability to write data in appending mode" -[#52]: https://github.com/jprichardson/node-fs-extra/pull/52 "This fixes (what I think) is a bug in copySync" -[#51]: https://github.com/jprichardson/node-fs-extra/pull/51 "Add a Bitdeli Badge to README" -[#50]: https://github.com/jprichardson/node-fs-extra/issues/50 "Replace mechanism in createFile" -[#49]: https://github.com/jprichardson/node-fs-extra/pull/49 "update rimraf to v2.2.6" -[#48]: https://github.com/jprichardson/node-fs-extra/issues/48 "fs.copy issue [bug]" -[#47]: https://github.com/jprichardson/node-fs-extra/issues/47 "Bug in copy - callback called on readStream 'close' - Fixed in ncp 0.5.0" -[#46]: https://github.com/jprichardson/node-fs-extra/pull/46 "update copyright year" -[#45]: https://github.com/jprichardson/node-fs-extra/pull/45 "Added note about fse.outputFile() being the one that overwrites" -[#44]: https://github.com/jprichardson/node-fs-extra/pull/44 "Proposal: Stream support" -[#43]: https://github.com/jprichardson/node-fs-extra/issues/43 "Better error reporting " -[#42]: https://github.com/jprichardson/node-fs-extra/issues/42 "Performance issue?" -[#41]: https://github.com/jprichardson/node-fs-extra/pull/41 "There does seem to be a synchronous version now" -[#40]: https://github.com/jprichardson/node-fs-extra/issues/40 "fs.copy throw unexplained error ENOENT, utime " -[#39]: https://github.com/jprichardson/node-fs-extra/pull/39 "Added regression test for copy() return callback on error" -[#38]: https://github.com/jprichardson/node-fs-extra/pull/38 "Return err in copy() fstat cb, because stat could be undefined or null" -[#37]: https://github.com/jprichardson/node-fs-extra/issues/37 "Maybe include a line reader? [enhancement, question]" -[#36]: https://github.com/jprichardson/node-fs-extra/pull/36 "`filter` parameter `fs.copy` and `fs.copySync`" -[#35]: https://github.com/jprichardson/node-fs-extra/pull/35 "`filter` parameter `fs.copy` and `fs.copySync` " -[#34]: https://github.com/jprichardson/node-fs-extra/issues/34 "update docs to include options for JSON methods [enhancement]" -[#33]: https://github.com/jprichardson/node-fs-extra/pull/33 "fs_extra.copySync" -[#32]: https://github.com/jprichardson/node-fs-extra/issues/32 "update to latest jsonfile [enhancement]" -[#31]: https://github.com/jprichardson/node-fs-extra/issues/31 "Add ensure methods [enhancement]" -[#30]: https://github.com/jprichardson/node-fs-extra/issues/30 "update package.json optional dep `graceful-fs`" -[#29]: https://github.com/jprichardson/node-fs-extra/issues/29 "Copy failing if dest directory doesn't exist. Is this intended?" -[#28]: https://github.com/jprichardson/node-fs-extra/issues/28 "homepage field must be a string url. Deleted." -[#27]: https://github.com/jprichardson/node-fs-extra/issues/27 "Update Readme" -[#26]: https://github.com/jprichardson/node-fs-extra/issues/26 "Add readdir recursive method. [enhancement]" -[#25]: https://github.com/jprichardson/node-fs-extra/pull/25 "adding an `.npmignore` file" -[#24]: https://github.com/jprichardson/node-fs-extra/issues/24 "[bug] cannot run in strict mode [bug]" -[#23]: https://github.com/jprichardson/node-fs-extra/issues/23 "`writeJSON()` should create parent directories" -[#22]: https://github.com/jprichardson/node-fs-extra/pull/22 "Add a limit option to mkdirs()" -[#21]: https://github.com/jprichardson/node-fs-extra/issues/21 "touch() in 0.10.0" -[#20]: https://github.com/jprichardson/node-fs-extra/issues/20 "fs.remove yields callback before directory is really deleted" -[#19]: https://github.com/jprichardson/node-fs-extra/issues/19 "fs.copy err is empty array" -[#18]: https://github.com/jprichardson/node-fs-extra/pull/18 "Exposed copyFile Function" -[#17]: https://github.com/jprichardson/node-fs-extra/issues/17 "Use `require('graceful-fs')` if found instead of `require('fs')`" -[#16]: https://github.com/jprichardson/node-fs-extra/pull/16 "Update README.md" -[#15]: https://github.com/jprichardson/node-fs-extra/issues/15 "Implement cp -r but sync aka copySync. [enhancement]" -[#14]: https://github.com/jprichardson/node-fs-extra/issues/14 "fs.mkdirSync is broken in 0.3.1" -[#13]: https://github.com/jprichardson/node-fs-extra/issues/13 "Thoughts on including a directory tree / file watcher? [enhancement, question]" -[#12]: https://github.com/jprichardson/node-fs-extra/issues/12 "copyFile & copyFileSync are global" -[#11]: https://github.com/jprichardson/node-fs-extra/issues/11 "Thoughts on including a file walker? [enhancement, question]" -[#10]: https://github.com/jprichardson/node-fs-extra/issues/10 "move / moveFile API [enhancement]" -[#9]: https://github.com/jprichardson/node-fs-extra/issues/9 "don't import normal fs stuff into fs-extra" -[#8]: https://github.com/jprichardson/node-fs-extra/pull/8 "Update rimraf to latest version" -[#6]: https://github.com/jprichardson/node-fs-extra/issues/6 "Remove CoffeeScript development dependency" -[#5]: https://github.com/jprichardson/node-fs-extra/issues/5 "comments on naming" -[#4]: https://github.com/jprichardson/node-fs-extra/issues/4 "version bump to 0.2" -[#3]: https://github.com/jprichardson/node-fs-extra/pull/3 "Hi! I fixed some code for you!" -[#2]: https://github.com/jprichardson/node-fs-extra/issues/2 "Merge with fs.extra and mkdirp" -[#1]: https://github.com/jprichardson/node-fs-extra/issues/1 "file-extra npm !exist" diff --git a/node_modules/fs-extra/LICENSE b/node_modules/fs-extra/LICENSE deleted file mode 100644 index 93546dfb76..0000000000 --- a/node_modules/fs-extra/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -(The MIT License) - -Copyright (c) 2011-2017 JP Richardson - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files -(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/fs-extra/README.md b/node_modules/fs-extra/README.md deleted file mode 100644 index 7dbb9f7e88..0000000000 --- a/node_modules/fs-extra/README.md +++ /dev/null @@ -1,242 +0,0 @@ -Node.js: fs-extra -================= - -`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It should be a drop in replacement for `fs`. - -[![npm Package](https://img.shields.io/npm/v/fs-extra.svg?style=flat-square)](https://www.npmjs.org/package/fs-extra) -[![build status](https://api.travis-ci.org/jprichardson/node-fs-extra.svg)](http://travis-ci.org/jprichardson/node-fs-extra) -[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-fs-extra/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master) -[![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra) -[![Coverage Status](https://img.shields.io/coveralls/jprichardson/node-fs-extra.svg)](https://coveralls.io/r/jprichardson/node-fs-extra) - -Standard JavaScript - - -Why? ----- - -I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects. - - - - -Installation ------------- - - npm install --save fs-extra - - - -Usage ------ - -`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed. - -You don't ever need to include the original `fs` module again: - -```js -const fs = require('fs') // this is no longer necessary -``` - -you can now do this: - -```js -const fs = require('fs-extra') -``` - -or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want -to name your `fs` variable `fse` like so: - -```js -const fse = require('fs-extra') -``` - -you can also keep both, but it's redundant: - -```js -const fs = require('fs') -const fse = require('fs-extra') -``` - -Sync vs Async -------------- -Most methods are async by default. All async methods will return a promise if the callback isn't passed. - -Sync methods on the other hand will throw if an error occurs. - -Example: - -```js -const fs = require('fs-extra') - -// Async with promises: -fs.copy('/tmp/myfile', '/tmp/mynewfile') - .then(() => console.log('success!')) - .catch(err => console.error(err)) - -// Async with callbacks: -fs.copy('/tmp/myfile', '/tmp/mynewfile', err => { - if (err) return console.error(err) - console.log('success!') -}) - -// Sync: -try { - fs.copySync('/tmp/myfile', '/tmp/mynewfile') - console.log('success!') -} catch (err) { - console.error(err) -} -``` - - -Methods -------- - -### Async - -- [copy](docs/copy.md) -- [emptyDir](docs/emptyDir.md) -- [ensureFile](docs/ensureFile.md) -- [ensureDir](docs/ensureDir.md) -- [ensureLink](docs/ensureLink.md) -- [ensureSymlink](docs/ensureSymlink.md) -- [mkdirs](docs/ensureDir.md) -- [move](docs/move.md) -- [outputFile](docs/outputFile.md) -- [outputJson](docs/outputJson.md) -- [pathExists](docs/pathExists.md) -- [readJson](docs/readJson.md) -- [remove](docs/remove.md) -- [writeJson](docs/writeJson.md) - -### Sync - -- [copySync](docs/copy-sync.md) -- [emptyDirSync](docs/emptyDir-sync.md) -- [ensureFileSync](docs/ensureFile-sync.md) -- [ensureDirSync](docs/ensureDir-sync.md) -- [ensureLinkSync](docs/ensureLink-sync.md) -- [ensureSymlinkSync](docs/ensureSymlink-sync.md) -- [mkdirsSync](docs/ensureDir-sync.md) -- [moveSync](docs/move-sync.md) -- [outputFileSync](docs/outputFile-sync.md) -- [outputJsonSync](docs/outputJson-sync.md) -- [pathExistsSync](docs/pathExists-sync.md) -- [readJsonSync](docs/readJson-sync.md) -- [removeSync](docs/remove-sync.md) -- [writeJsonSync](docs/writeJson-sync.md) - - -**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()` & `fs.write()`](docs/fs-read-write.md) - -### What happened to `walk()` and `walkSync()`? - -They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync). - - -Third Party ------------ - - -### TypeScript - -If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra - - -### File / Directory Watching - -If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar). - - -### Misc. - -- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls. - - - -Hacking on fs-extra -------------------- - -Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project -uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you, -you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`. - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -What's needed? -- First, take a look at existing issues. Those are probably going to be where the priority lies. -- More tests for edge cases. Specifically on different platforms. There can never be enough tests. -- Improve test coverage. See coveralls output for more info. - -Note: If you make any big changes, **you should definitely file an issue for discussion first.** - -### Running the Test Suite - -fs-extra contains hundreds of tests. - -- `npm run lint`: runs the linter ([standard](http://standardjs.com/)) -- `npm run unit`: runs the unit tests -- `npm test`: runs both the linter and the tests - - -### Windows - -If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's -because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's -account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7 -However, I didn't have much luck doing this. - -Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows. -I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command: - - net use z: "\\vmware-host\Shared Folders" - -I can then navigate to my `fs-extra` directory and run the tests. - - -Naming ------- - -I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here: - -* https://github.com/jprichardson/node-fs-extra/issues/2 -* https://github.com/flatiron/utile/issues/11 -* https://github.com/ryanmcgrath/wrench-js/issues/29 -* https://github.com/substack/node-mkdirp/issues/17 - -First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes. - -For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc. - -We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`? - -My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too. - -So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`. - - -Credit ------- - -`fs-extra` wouldn't be possible without using the modules from the following authors: - -- [Isaac Shlueter](https://github.com/isaacs) -- [Charlie McConnel](https://github.com/avianflu) -- [James Halliday](https://github.com/substack) -- [Andrew Kelley](https://github.com/andrewrk) - - - - -License -------- - -Licensed under MIT - -Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson) - -[1]: http://nodejs.org/docs/latest/api/fs.html - - -[jsonfile]: https://github.com/jprichardson/node-jsonfile diff --git a/node_modules/fs-extra/docs/copy-sync.md b/node_modules/fs-extra/docs/copy-sync.md deleted file mode 100644 index 8e61c2b697..0000000000 --- a/node_modules/fs-extra/docs/copy-sync.md +++ /dev/null @@ -1,37 +0,0 @@ -# copySync(src, dest, [options]) - -Copy a file or directory. The directory can have contents. Like `cp -r`. - -- `src` `` -- `dest` `` -- `options` `` - - `overwrite` ``: overwrite existing file or directory, default is `true`. _Note that the copy operation will silently fail if you set this to `false` and the destination exists._ Use the `errorOnExist` option to change this behavior. - - `errorOnExist` ``: when `overwrite` is `false` and the destination exists, throw an error. Default is `false`. - - `dereference` ``: dereference symlinks, default is `false`. - - `preserveTimestamps` ``: will set last modification and access times to the ones of the original source files, default is `false`. - - `filter` ``: Function to filter copied files. Return `true` to include, `false` to exclude. This can also be a RegExp, however this is deprecated (See [issue #239](https://github.com/jprichardson/node-fs-extra/issues/239) for background). - -## Example: - -```js -const fs = require('fs-extra') - -// copy file -fs.copySync('/tmp/myfile', '/tmp/mynewfile') - -// copy directory, even if it has subdirectories or files -fs.copySync('/tmp/mydir', '/tmp/mynewdir') -``` - -**Using filter function** - -```js -const fs = require('fs-extra') - -const filterFunc = (src, dest) => { - // your logic here - // it will be copied if return true -} - -fs.copySync('/tmp/mydir', '/tmp/mynewdir', { filter: filterFunc }) -``` diff --git a/node_modules/fs-extra/docs/copy.md b/node_modules/fs-extra/docs/copy.md deleted file mode 100644 index 84407261e1..0000000000 --- a/node_modules/fs-extra/docs/copy.md +++ /dev/null @@ -1,57 +0,0 @@ -# copy(src, dest, [options, callback]) - -Copy a file or directory. The directory can have contents. Like `cp -r`. - -- `src` `` -- `dest` `` Note that if `src` is a file, `dest` cannot be a directory (see [issue #323](https://github.com/jprichardson/node-fs-extra/issues/323)). -- `options` `` - - `overwrite` ``: overwrite existing file or directory, default is `true`. _Note that the copy operation will silently fail if you set this to `false` and the destination exists._ Use the `errorOnExist` option to change this behavior. - - `errorOnExist` ``: when `overwrite` is `false` and the destination exists, throw an error. Default is `false`. - - `dereference` ``: dereference symlinks, default is `false`. - - `preserveTimestamps` ``: will set last modification and access times to the ones of the original source files, default is `false`. - - `filter` ``: Function to filter copied files. Return `true` to include, `false` to exclude. This can also be a RegExp, however this is deprecated (See [issue #239](https://github.com/jprichardson/node-fs-extra/issues/239) for background). -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -fs.copy('/tmp/myfile', '/tmp/mynewfile', err => { - if (err) return console.error(err) - - console.log('success!') -}) // copies file - -fs.copy('/tmp/mydir', '/tmp/mynewdir', err => { - if (err) return console.error(err) - - console.log('success!') -}) // copies directory, even if it has subdirectories or files - -// Promise usage: -fs.copy('/tmp/myfile', '/tmp/mynewfile') -.then(() => { - console.log('success!') -}) -.catch(err => { - console.error(err) -}) -``` - -**Using filter function** - -```js -const fs = require('fs-extra') - -const filterFunc = (src, dest) => { - // your logic here - // it will be copied if return true -} - -fs.copy('/tmp/mydir', '/tmp/mynewdir', { filter: filterFunc }, err => { - if (err) return console.error(err) - - console.log('success!') -}) -``` diff --git a/node_modules/fs-extra/docs/emptyDir-sync.md b/node_modules/fs-extra/docs/emptyDir-sync.md deleted file mode 100644 index 7decdbc00b..0000000000 --- a/node_modules/fs-extra/docs/emptyDir-sync.md +++ /dev/null @@ -1,16 +0,0 @@ -# emptyDirSync(dir) - -Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted. - -**Alias:** `emptydirSync()` - -- `dir` `` - -## Example: - -```js -const fs = require('fs-extra') - -// assume this directory has a lot of files and folders -fs.emptyDirSync('/tmp/some/dir') -``` diff --git a/node_modules/fs-extra/docs/emptyDir.md b/node_modules/fs-extra/docs/emptyDir.md deleted file mode 100644 index 6553e9a999..0000000000 --- a/node_modules/fs-extra/docs/emptyDir.md +++ /dev/null @@ -1,30 +0,0 @@ -# emptyDir(dir, [callback]) - -Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted. - -**Alias:** `emptydir()` - -- `dir` `` -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -// assume this directory has a lot of files and folders -fs.emptyDir('/tmp/some/dir', err => { - if (err) return console.error(err) - - console.log('success!') -}) - -// With promises -fs.emptyDir('/tmp/some/dir') -.then(() => { - console.log('success!') -}) -.catch(err => { - console.error(err) -}) -``` diff --git a/node_modules/fs-extra/docs/ensureDir-sync.md b/node_modules/fs-extra/docs/ensureDir-sync.md deleted file mode 100644 index 8f083d278c..0000000000 --- a/node_modules/fs-extra/docs/ensureDir-sync.md +++ /dev/null @@ -1,17 +0,0 @@ -# ensureDirSync(dir) - -Ensures that the directory exists. If the directory structure does not exist, it is created. Like `mkdir -p`. - -**Aliases:** `mkdirsSync()`, `mkdirpSync()` - -- `dir` `` - -## Example: - -```js -const fs = require('fs-extra') - -const dir = '/tmp/this/path/does/not/exist' -fs.ensureDirSync(dir) -// dir has now been created, including the directory it is to be placed in -``` diff --git a/node_modules/fs-extra/docs/ensureDir.md b/node_modules/fs-extra/docs/ensureDir.md deleted file mode 100644 index d030d86685..0000000000 --- a/node_modules/fs-extra/docs/ensureDir.md +++ /dev/null @@ -1,29 +0,0 @@ -# ensureDir(dir, [callback]) - -Ensures that the directory exists. If the directory structure does not exist, it is created. Like `mkdir -p`. - -**Aliases:** `mkdirs()`, `mkdirp()` - -- `dir` `` -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -const dir = '/tmp/this/path/does/not/exist' -fs.ensureDir(dir, err => { - console.log(err) // => null - // dir has now been created, including the directory it is to be placed in -}) - -// With Promises: -fs.ensureDir(dir) -.then(() => { - console.log('success!') -}) -.catch(err => { - console.error(err) -}) -``` diff --git a/node_modules/fs-extra/docs/ensureFile-sync.md b/node_modules/fs-extra/docs/ensureFile-sync.md deleted file mode 100644 index 25ac39dece..0000000000 --- a/node_modules/fs-extra/docs/ensureFile-sync.md +++ /dev/null @@ -1,17 +0,0 @@ -# ensureFileSync(file) - -Ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is **NOT MODIFIED**. - -**Alias:** `createFileSync()` - -- `file` `` - -## Example: - -```js -const fs = require('fs-extra') - -const file = '/tmp/this/path/does/not/exist/file.txt' -fs.ensureFileSync(file) -// file has now been created, including the directory it is to be placed in -``` diff --git a/node_modules/fs-extra/docs/ensureFile.md b/node_modules/fs-extra/docs/ensureFile.md deleted file mode 100644 index 987be6389d..0000000000 --- a/node_modules/fs-extra/docs/ensureFile.md +++ /dev/null @@ -1,29 +0,0 @@ -# ensureFile(file, [callback]) - -Ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is **NOT MODIFIED**. - -**Alias:** `createFile()` - -- `file` `` -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -const file = '/tmp/this/path/does/not/exist/file.txt' -fs.ensureFile(file, err => { - console.log(err) // => null - // file has now been created, including the directory it is to be placed in -}) - -// With Promises: -fs.ensureFile(file) -.then(() => { - console.log('success!') -}) -.catch(err => { - console.error(err) -}) -``` diff --git a/node_modules/fs-extra/docs/ensureLink-sync.md b/node_modules/fs-extra/docs/ensureLink-sync.md deleted file mode 100644 index 74769d30fd..0000000000 --- a/node_modules/fs-extra/docs/ensureLink-sync.md +++ /dev/null @@ -1,17 +0,0 @@ -# ensureLinkSync(srcpath, dstpath) - -Ensures that the link exists. If the directory structure does not exist, it is created. - -- `srcpath` `` -- `dstpath` `` - -## Example: - -```js -const fs = require('fs-extra') - -const srcpath = '/tmp/file.txt' -const dstpath = '/tmp/this/path/does/not/exist/file.txt' -fs.ensureLinkSync(srcpath, dstpath) -// link has now been created, including the directory it is to be placed in -``` diff --git a/node_modules/fs-extra/docs/ensureLink.md b/node_modules/fs-extra/docs/ensureLink.md deleted file mode 100644 index 90d2a5d6c1..0000000000 --- a/node_modules/fs-extra/docs/ensureLink.md +++ /dev/null @@ -1,29 +0,0 @@ -# ensureLink(srcpath, dstpath, [callback]) - -Ensures that the link exists. If the directory structure does not exist, it is created. - -- `srcpath` `` -- `dstpath` `` -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -const srcpath = '/tmp/file.txt' -const dstpath = '/tmp/this/path/does/not/exist/file.txt' -fs.ensureLink(srcpath, dstpath, err => { - console.log(err) // => null - // link has now been created, including the directory it is to be placed in -}) - -// With Promises: -fs.ensureLink(srcpath, dstpath) -.then(() => { - console.log('success!') -}) -.catch(err => { - console.error(err) -}) -``` diff --git a/node_modules/fs-extra/docs/ensureSymlink-sync.md b/node_modules/fs-extra/docs/ensureSymlink-sync.md deleted file mode 100644 index 328d4c45d5..0000000000 --- a/node_modules/fs-extra/docs/ensureSymlink-sync.md +++ /dev/null @@ -1,18 +0,0 @@ -# ensureSymlinkSync(srcpath, dstpath, [type]) - -Ensures that the symlink exists. If the directory structure does not exist, it is created. - -- `srcpath` `` -- `dstpath` `` -- `type` `` - -## Example: - -```js -const fs = require('fs-extra') - -const srcpath = '/tmp/file.txt' -const dstpath = '/tmp/this/path/does/not/exist/file.txt' -fs.ensureSymlinkSync(srcpath, dstpath) -// symlink has now been created, including the directory it is to be placed in -``` diff --git a/node_modules/fs-extra/docs/ensureSymlink.md b/node_modules/fs-extra/docs/ensureSymlink.md deleted file mode 100644 index 45524f19d1..0000000000 --- a/node_modules/fs-extra/docs/ensureSymlink.md +++ /dev/null @@ -1,30 +0,0 @@ -# ensureSymlink(srcpath, dstpath, [type, callback]) - -Ensures that the symlink exists. If the directory structure does not exist, it is created. - -- `srcpath` `` -- `dstpath` `` -- `type` `` -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -const srcpath = '/tmp/file.txt' -const dstpath = '/tmp/this/path/does/not/exist/file.txt' -fs.ensureSymlink(srcpath, dstpath, err => { - console.log(err) // => null - // symlink has now been created, including the directory it is to be placed in -}) - -// With Promises: -fs.ensureSymlink(srcpath, dstpath) -.then(() => { - console.log('success!') -}) -.catch(err => { - console.error(err) -}) -``` diff --git a/node_modules/fs-extra/docs/fs-read-write.md b/node_modules/fs-extra/docs/fs-read-write.md deleted file mode 100644 index 805ea3c38c..0000000000 --- a/node_modules/fs-extra/docs/fs-read-write.md +++ /dev/null @@ -1,39 +0,0 @@ -# About `fs.read()` & `fs.write()` - -[`fs.read()`](https://nodejs.org/api/fs.html#fs_fs_read_fd_buffer_offset_length_position_callback) & [`fs.write()`](https://nodejs.org/api/fs.html#fs_fs_write_fd_buffer_offset_length_position_callback) are different from other `fs` methods in that their callbacks are called with 3 arguments instead of the usual 2 arguments. - -If you're using them with callbacks, they will behave as usual. However, their promise usage is a little different. `fs-extra` promisifies these methods like [`util.promisify()`](https://nodejs.org/api/util.html#util_util_promisify_original) (only available in Node 8+) does. - -Here's the example promise usage: - -## `fs.read()` - -```js -// Basic promises -fs.read(fd, buffer, offset, length, position) - .then(results => { - console.log(results) - // { bytesRead: 20, buffer: } - }) - -// Async/await usage: -async function example () { - const { bytesRead, buffer } = await fs.read(fd, Buffer.alloc(length), offset, length, position) -} -``` - -## `fs.write()` - -```js -// Basic promises -fs.write(fd, buffer, offset, length, position) - .then(results => { - console.log(results) - // { bytesWritten: 20, buffer: } - }) - -// Async/await usage: -async function example () { - const { bytesWritten, buffer } = await fs.write(fd, Buffer.alloc(length), offset, length, position) -} -``` diff --git a/node_modules/fs-extra/docs/move-sync.md b/node_modules/fs-extra/docs/move-sync.md deleted file mode 100644 index cd701fef9b..0000000000 --- a/node_modules/fs-extra/docs/move-sync.md +++ /dev/null @@ -1,24 +0,0 @@ -# moveSync(src, dest, [options]) - -Moves a file or directory, even across devices. - -- `src` `` -- `dest` `` -- `options` `` - - `overwrite` ``: overwrite existing file or directory, default is `false`. - -## Example: - -```js -const fs = require('fs-extra') - -fs.moveSync('/tmp/somefile', '/tmp/does/not/exist/yet/somefile') -``` - -**Using `overwrite` option** - -```js -const fs = require('fs-extra') - -fs.moveSync('/tmp/somedir', '/tmp/may/already/existed/somedir', { overwrite: true }) -``` diff --git a/node_modules/fs-extra/docs/move.md b/node_modules/fs-extra/docs/move.md deleted file mode 100644 index 0dd210c5b2..0000000000 --- a/node_modules/fs-extra/docs/move.md +++ /dev/null @@ -1,41 +0,0 @@ -# move(src, dest, [options, callback]) - -Moves a file or directory, even across devices. - -- `src` `` -- `dest` `` -- `options` `` - - `overwrite` ``: overwrite existing file or directory, default is `false`. -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -fs.move('/tmp/somefile', '/tmp/does/not/exist/yet/somefile', err => { - if (err) return console.error(err) - - console.log('success!') -}) - -fs.move('/tmp/somefile', '/tmp/does/not/exist/yet/somefile') -.then(() => { - console.log('success!') -}) -.catch(err => { - console.error(err) -}) -``` - -**Using `overwrite` option** - -```js -const fs = require('fs-extra') - -fs.move('/tmp/somedir', '/tmp/may/already/existed/somedir', { overwrite: true }, err => { - if (err) return console.error(err) - - console.log('success!') -}) -``` diff --git a/node_modules/fs-extra/docs/outputFile-sync.md b/node_modules/fs-extra/docs/outputFile-sync.md deleted file mode 100644 index 38eee8b6bf..0000000000 --- a/node_modules/fs-extra/docs/outputFile-sync.md +++ /dev/null @@ -1,19 +0,0 @@ -# outputFileSync(file, data, [options]) - -Almost the same as `writeFileSync` (i.e. it [overwrites](http://pages.citebite.com/v2o5n8l2f5reb)), except that if the parent directory does not exist, it's created. `file` must be a file path (a buffer or a file descriptor is not allowed). `options` are what you'd pass to [`fs.writeFileSync()`](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options). - -- `file` `` -- `data` ` | | ` -- `options` ` | ` - -## Example: - -```js -const fs = require('fs-extra') - -const file = '/tmp/this/path/does/not/exist/file.txt' -fs.outputFileSync(file, 'hello!') - -const data = fs.readFileSync(file, 'utf8') -console.log(data) // => hello! -``` diff --git a/node_modules/fs-extra/docs/outputFile.md b/node_modules/fs-extra/docs/outputFile.md deleted file mode 100644 index 766787d924..0000000000 --- a/node_modules/fs-extra/docs/outputFile.md +++ /dev/null @@ -1,34 +0,0 @@ -# outputFile(file, data, [options, callback]) - -Almost the same as `writeFile` (i.e. it [overwrites](http://pages.citebite.com/v2o5n8l2f5reb)), except that if the parent directory does not exist, it's created. `file` must be a file path (a buffer or a file descriptor is not allowed). `options` are what you'd pass to [`fs.writeFile()`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback). - -- `file` `` -- `data` ` | | ` -- `options` ` | ` -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -const file = '/tmp/this/path/does/not/exist/file.txt' -fs.outputFile(file, 'hello!', err => { - console.log(err) // => null - - fs.readFile(file, 'utf8', (err, data) => { - if (err) return console.error(err) - console.log(data) // => hello! - }) -}) - -// With Promises: -fs.outputFile(file, 'hello!') -.then(() => fs.readFile(file, 'utf8')) -.then(data => { - console.log(data) // => hello! -}) -.catch(err => { - console.error(err) -}) -``` diff --git a/node_modules/fs-extra/docs/outputJson-sync.md b/node_modules/fs-extra/docs/outputJson-sync.md deleted file mode 100644 index ef78f802d1..0000000000 --- a/node_modules/fs-extra/docs/outputJson-sync.md +++ /dev/null @@ -1,25 +0,0 @@ -# outputJsonSync(file, object, [options]) - -Almost the same as [`writeJsonSync`](writeJson-sync.md), except that if the directory does not exist, it's created. - -**Alias:** `outputJSONSync()` - -- `file` `` -- `object` `` -- `options` `` - - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. - - `EOL` `` Set EOL character. Default is `\n`. - - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) - - Also accepts [`fs.writeFileSync` options](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) - -## Example: - -```js -const fs = require('fs-extra') - -const file = '/tmp/this/path/does/not/exist/file.json' -fs.outputJsonSync(file, {name: 'JP'}) - -const data = fs.readJsonSync(file) -console.log(data.name) // => JP -``` diff --git a/node_modules/fs-extra/docs/outputJson.md b/node_modules/fs-extra/docs/outputJson.md deleted file mode 100644 index 7156991e23..0000000000 --- a/node_modules/fs-extra/docs/outputJson.md +++ /dev/null @@ -1,40 +0,0 @@ -# outputJson(file, object, [options, callback]) - -Almost the same as [`writeJson`](writeJson.md), except that if the directory does not exist, it's created. - -**Alias:** `outputJSON()` - -- `file` `` -- `object` `` -- `options` `` - - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. - - `EOL` `` Set EOL character. Default is `\n`. - - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) - - Also accepts [`fs.writeFile` options](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -const file = '/tmp/this/path/does/not/exist/file.json' -fs.outputJson(file, {name: 'JP'}, err => { - console.log(err) // => null - - fs.readJson(file, (err, data) => { - if (err) return console.error(err) - console.log(data.name) // => JP - }) -}) - -// With Promises: -fs.outputJson(file, {name: 'JP'}) -.then(() => fs.readJson(file)) -.then(data => { - console.log(data.name) // => JP -}) -.catch(err => { - console.error(err) -}) -``` diff --git a/node_modules/fs-extra/docs/pathExists-sync.md b/node_modules/fs-extra/docs/pathExists-sync.md deleted file mode 100644 index 3ef973c218..0000000000 --- a/node_modules/fs-extra/docs/pathExists-sync.md +++ /dev/null @@ -1,3 +0,0 @@ -# pathExistsSync(file) - -An alias for [`fs.existsSync()`](https://nodejs.org/api/fs.html#fs_fs_existssync_path), created for consistency with [`pathExists()`](pathExists.md). diff --git a/node_modules/fs-extra/docs/pathExists.md b/node_modules/fs-extra/docs/pathExists.md deleted file mode 100644 index 0302b09def..0000000000 --- a/node_modules/fs-extra/docs/pathExists.md +++ /dev/null @@ -1,22 +0,0 @@ -# pathExists(file[, callback]) - -Test whether or not the given path exists by checking with the file system. Like [`fs.exists`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback), but with a normal callback signature (err, exists). Uses `fs.access` under the hood. - -- `file` `` -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -const file = '/tmp/this/path/does/not/exist/file.txt' -// Promise usage: -fs.pathExists(file) - .then(exists => console.log(exists)) // => false -// Callback usage: -fs.pathExists(file, (err, exists) => { - console.log(err) // => null - console.log(exists) // => false -}) -``` diff --git a/node_modules/fs-extra/docs/readJson-sync.md b/node_modules/fs-extra/docs/readJson-sync.md deleted file mode 100644 index a1356379c0..0000000000 --- a/node_modules/fs-extra/docs/readJson-sync.md +++ /dev/null @@ -1,33 +0,0 @@ -# readJsonSync(file, [options]) - -Reads a JSON file and then parses it into an object. `options` are the same -that you'd pass to [`jsonFile.readFileSync`](https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options). - -**Alias:** `readJSONSync()` - -- `file` `` -- `options` `` - -## Example: - -```js -const fs = require('fs-extra') - -const packageObj = fs.readJsonSync('./package.json') -console.log(packageObj.version) // => 2.0.0 -``` - ---- - -`readJsonSync()` can take a `throws` option set to `false` and it won't throw if the JSON is invalid. Example: - -```js -const fs = require('fs-extra') - -const file = '/tmp/some-invalid.json' -const data = '{not valid JSON' -fs.writeFileSync(file, data) - -const obj = fs.readJsonSync(file, { throws: false }) -console.log(obj) // => null -``` diff --git a/node_modules/fs-extra/docs/readJson.md b/node_modules/fs-extra/docs/readJson.md deleted file mode 100644 index 6edc329d5c..0000000000 --- a/node_modules/fs-extra/docs/readJson.md +++ /dev/null @@ -1,58 +0,0 @@ -# readJson(file, [options, callback]) - -Reads a JSON file and then parses it into an object. `options` are the same -that you'd pass to [`jsonFile.readFile`](https://github.com/jprichardson/node-jsonfile#readfilefilename-options-callback). - -**Alias:** `readJSON()` - -- `file` `` -- `options` `` -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -fs.readJson('./package.json', (err, packageObj) => { - if (err) console.error(err) - - console.log(packageObj.version) // => 0.1.3 -}) - -// Promise Usage -fs.readJson('./package.json') -.then(packageObj => { - console.log(packageObj.version) // => 0.1.3 -}) -.catch(err => { - console.error(err) -}) -``` - ---- - -`readJson()` can take a `throws` option set to `false` and it won't throw if the JSON is invalid. Example: - -```js -const fs = require('fs-extra') - -const file = '/tmp/some-invalid.json' -const data = '{not valid JSON' -fs.writeFileSync(file, data) - -fs.readJson(file, { throws: false }, (err, obj) => { - if (err) console.error(err) - - console.log(obj) // => null -}) - -// Promise Usage -fs.readJson(file, { throws: false }) -.then(obj => { - console.log(obj) // => null -}) -.catch(err => { - console.error(err) // Not called -}) -``` diff --git a/node_modules/fs-extra/docs/remove-sync.md b/node_modules/fs-extra/docs/remove-sync.md deleted file mode 100644 index fb01fe8210..0000000000 --- a/node_modules/fs-extra/docs/remove-sync.md +++ /dev/null @@ -1,16 +0,0 @@ -# removeSync(path) - -Removes a file or directory. The directory can have contents. Like `rm -rf`. - -- `path` `` - -## Example: - -```js -const fs = require('fs-extra') - -// remove file -fs.removeSync('/tmp/myfile') - -fs.removeSync('/home/jprichardson') // I just deleted my entire HOME directory. -``` diff --git a/node_modules/fs-extra/docs/remove.md b/node_modules/fs-extra/docs/remove.md deleted file mode 100644 index 364029351a..0000000000 --- a/node_modules/fs-extra/docs/remove.md +++ /dev/null @@ -1,34 +0,0 @@ -# remove(path, [callback]) - -Removes a file or directory. The directory can have contents. Like `rm -rf`. - -- `path` `` -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -// remove file -fs.remove('/tmp/myfile', err => { - if (err) return console.error(err) - - console.log('success!') -}) - -fs.remove('/home/jprichardson', err => { - if (err) return console.error(err) - - console.log('success!') // I just deleted my entire HOME directory. -}) - -// Promise Usage -fs.remove('/tmp/myfile') -.then(() => { - console.log('success!') -}) -.catch(err => { - console.error(err) -}) -``` diff --git a/node_modules/fs-extra/docs/writeJson-sync.md b/node_modules/fs-extra/docs/writeJson-sync.md deleted file mode 100644 index c22459db8f..0000000000 --- a/node_modules/fs-extra/docs/writeJson-sync.md +++ /dev/null @@ -1,24 +0,0 @@ -# writeJsonSync(file, object, [options]) - -Writes an object to a JSON file. - -**Alias:** `writeJSONSync()` - -- `file` `` -- `object` `` -- `options` `` - - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. - - `EOL` `` Set EOL character. Default is `\n`. - - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) - - Also accepts [`fs.writeFileSync` options](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) - -## Example: - -```js -const fs = require('fs-extra') - -fs.writeJsonSync('./package.json', {name: 'fs-extra'}) -``` ---- - -**See also:** [`outputJsonSync()`](outputJson-sync.md) diff --git a/node_modules/fs-extra/docs/writeJson.md b/node_modules/fs-extra/docs/writeJson.md deleted file mode 100644 index 8e35271fbb..0000000000 --- a/node_modules/fs-extra/docs/writeJson.md +++ /dev/null @@ -1,39 +0,0 @@ -# writeJson(file, object, [options, callback]) - -Writes an object to a JSON file. - -**Alias:** `writeJSON()` - -- `file` `` -- `object` `` -- `options` `` - - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. - - `EOL` `` Set EOL character. Default is `\n`. - - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) - - Also accepts [`fs.writeFile` options](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) -- `callback` `` - -## Example: - -```js -const fs = require('fs-extra') - -fs.writeJson('./package.json', {name: 'fs-extra'}, err => { - if (err) return console.error(err) - - console.log('success!') -}) - -// With Promises -fs.writeJson('./package.json', {name: 'fs-extra'}) -.then(() => { - console.log('success!') -}) -.catch(err => { - console.error(err) -}) -``` - ---- - -**See also:** [`outputJson()`](outputJson.md) diff --git a/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js b/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js deleted file mode 100644 index 102a6be698..0000000000 --- a/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') - -const BUF_LENGTH = 64 * 1024 -const _buff = require('../util/buffer')(BUF_LENGTH) - -function copyFileSync (srcFile, destFile, options) { - const overwrite = options.overwrite - const errorOnExist = options.errorOnExist - const preserveTimestamps = options.preserveTimestamps - - if (fs.existsSync(destFile)) { - if (overwrite) { - fs.unlinkSync(destFile) - } else if (errorOnExist) { - throw new Error(`${destFile} already exists`) - } else return - } - - const fdr = fs.openSync(srcFile, 'r') - const stat = fs.fstatSync(fdr) - const fdw = fs.openSync(destFile, 'w', stat.mode) - let bytesRead = 1 - let pos = 0 - - while (bytesRead > 0) { - bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos) - fs.writeSync(fdw, _buff, 0, bytesRead) - pos += bytesRead - } - - if (preserveTimestamps) { - fs.futimesSync(fdw, stat.atime, stat.mtime) - } - - fs.closeSync(fdr) - fs.closeSync(fdw) -} - -module.exports = copyFileSync diff --git a/node_modules/fs-extra/lib/copy-sync/copy-sync.js b/node_modules/fs-extra/lib/copy-sync/copy-sync.js deleted file mode 100644 index 9d5639c3cc..0000000000 --- a/node_modules/fs-extra/lib/copy-sync/copy-sync.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const path = require('path') -const copyFileSync = require('./copy-file-sync') -const mkdir = require('../mkdirs') - -function copySync (src, dest, options) { - if (typeof options === 'function' || options instanceof RegExp) { - options = {filter: options} - } - - options = options || {} - options.recursive = !!options.recursive - - // default to true for now - options.clobber = 'clobber' in options ? !!options.clobber : true - // overwrite falls back to clobber - options.overwrite = 'overwrite' in options ? !!options.overwrite : options.clobber - options.dereference = 'dereference' in options ? !!options.dereference : false - options.preserveTimestamps = 'preserveTimestamps' in options ? !!options.preserveTimestamps : false - - options.filter = options.filter || function () { return true } - - // Warn about using preserveTimestamps on 32-bit node: - if (options.preserveTimestamps && process.arch === 'ia32') { - console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n - see https://github.com/jprichardson/node-fs-extra/issues/269`) - } - - const stats = (options.recursive && !options.dereference) ? fs.lstatSync(src) : fs.statSync(src) - const destFolder = path.dirname(dest) - const destFolderExists = fs.existsSync(destFolder) - let performCopy = false - - if (options.filter instanceof RegExp) { - console.warn('Warning: fs-extra: Passing a RegExp filter is deprecated, use a function') - performCopy = options.filter.test(src) - } else if (typeof options.filter === 'function') performCopy = options.filter(src, dest) - - if (stats.isFile() && performCopy) { - if (!destFolderExists) mkdir.mkdirsSync(destFolder) - copyFileSync(src, dest, { - overwrite: options.overwrite, - errorOnExist: options.errorOnExist, - preserveTimestamps: options.preserveTimestamps - }) - } else if (stats.isDirectory() && performCopy) { - if (!fs.existsSync(dest)) mkdir.mkdirsSync(dest) - const contents = fs.readdirSync(src) - contents.forEach(content => { - const opts = options - opts.recursive = true - copySync(path.join(src, content), path.join(dest, content), opts) - }) - } else if (options.recursive && stats.isSymbolicLink() && performCopy) { - const srcPath = fs.readlinkSync(src) - fs.symlinkSync(srcPath, dest) - } -} - -module.exports = copySync diff --git a/node_modules/fs-extra/lib/copy-sync/index.js b/node_modules/fs-extra/lib/copy-sync/index.js deleted file mode 100644 index ebc7e0b915..0000000000 --- a/node_modules/fs-extra/lib/copy-sync/index.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - copySync: require('./copy-sync') -} diff --git a/node_modules/fs-extra/lib/copy/copy.js b/node_modules/fs-extra/lib/copy/copy.js deleted file mode 100644 index 309a93df0f..0000000000 --- a/node_modules/fs-extra/lib/copy/copy.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const path = require('path') -const ncp = require('./ncp') -const mkdir = require('../mkdirs') -const pathExists = require('../path-exists').pathExists - -function copy (src, dest, options, callback) { - if (typeof options === 'function' && !callback) { - callback = options - options = {} - } else if (typeof options === 'function' || options instanceof RegExp) { - options = {filter: options} - } - callback = callback || function () {} - options = options || {} - - // Warn about using preserveTimestamps on 32-bit node: - if (options.preserveTimestamps && process.arch === 'ia32') { - console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n - see https://github.com/jprichardson/node-fs-extra/issues/269`) - } - - // don't allow src and dest to be the same - const basePath = process.cwd() - const currentPath = path.resolve(basePath, src) - const targetPath = path.resolve(basePath, dest) - if (currentPath === targetPath) return callback(new Error('Source and destination must not be the same.')) - - fs.lstat(src, (err, stats) => { - if (err) return callback(err) - - let dir = null - if (stats.isDirectory()) { - const parts = dest.split(path.sep) - parts.pop() - dir = parts.join(path.sep) - } else { - dir = path.dirname(dest) - } - - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return ncp(src, dest, options, callback) - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - ncp(src, dest, options, callback) - }) - }) - }) -} - -module.exports = copy diff --git a/node_modules/fs-extra/lib/copy/index.js b/node_modules/fs-extra/lib/copy/index.js deleted file mode 100644 index a6a51da669..0000000000 --- a/node_modules/fs-extra/lib/copy/index.js +++ /dev/null @@ -1,4 +0,0 @@ -const u = require('universalify').fromCallback -module.exports = { - copy: u(require('./copy')) -} diff --git a/node_modules/fs-extra/lib/copy/ncp.js b/node_modules/fs-extra/lib/copy/ncp.js deleted file mode 100644 index 9670ee02ec..0000000000 --- a/node_modules/fs-extra/lib/copy/ncp.js +++ /dev/null @@ -1,234 +0,0 @@ -// imported from ncp (this is temporary, will rewrite) - -var fs = require('graceful-fs') -var path = require('path') -var utimes = require('../util/utimes') - -function ncp (source, dest, options, callback) { - if (!callback) { - callback = options - options = {} - } - - var basePath = process.cwd() - var currentPath = path.resolve(basePath, source) - var targetPath = path.resolve(basePath, dest) - - var filter = options.filter - var transform = options.transform - var overwrite = options.overwrite - // If overwrite is undefined, use clobber, otherwise default to true: - if (overwrite === undefined) overwrite = options.clobber - if (overwrite === undefined) overwrite = true - var errorOnExist = options.errorOnExist - var dereference = options.dereference - var preserveTimestamps = options.preserveTimestamps === true - - var started = 0 - var finished = 0 - var running = 0 - - var errored = false - - startCopy(currentPath) - - function startCopy (source) { - started++ - if (filter) { - if (filter instanceof RegExp) { - console.warn('Warning: fs-extra: Passing a RegExp filter is deprecated, use a function') - if (!filter.test(source)) { - return doneOne(true) - } - } else if (typeof filter === 'function') { - if (!filter(source, dest)) { - return doneOne(true) - } - } - } - return getStats(source) - } - - function getStats (source) { - var stat = dereference ? fs.stat : fs.lstat - running++ - stat(source, function (err, stats) { - if (err) return onError(err) - - // We need to get the mode from the stats object and preserve it. - var item = { - name: source, - mode: stats.mode, - mtime: stats.mtime, // modified time - atime: stats.atime, // access time - stats: stats // temporary - } - - if (stats.isDirectory()) { - return onDir(item) - } else if (stats.isFile() || stats.isCharacterDevice() || stats.isBlockDevice()) { - return onFile(item) - } else if (stats.isSymbolicLink()) { - // Symlinks don't really need to know about the mode. - return onLink(source) - } - }) - } - - function onFile (file) { - var target = file.name.replace(currentPath, targetPath.replace('$', '$$$$')) // escapes '$' with '$$' - isWritable(target, function (writable) { - if (writable) { - copyFile(file, target) - } else { - if (overwrite) { - rmFile(target, function () { - copyFile(file, target) - }) - } else if (errorOnExist) { - onError(new Error(target + ' already exists')) - } else { - doneOne() - } - } - }) - } - - function copyFile (file, target) { - var readStream = fs.createReadStream(file.name) - var writeStream = fs.createWriteStream(target, { mode: file.mode }) - - readStream.on('error', onError) - writeStream.on('error', onError) - - if (transform) { - transform(readStream, writeStream, file) - } else { - writeStream.on('open', function () { - readStream.pipe(writeStream) - }) - } - - writeStream.once('close', function () { - fs.chmod(target, file.mode, function (err) { - if (err) return onError(err) - if (preserveTimestamps) { - utimes.utimesMillis(target, file.atime, file.mtime, function (err) { - if (err) return onError(err) - return doneOne() - }) - } else { - doneOne() - } - }) - }) - } - - function rmFile (file, done) { - fs.unlink(file, function (err) { - if (err) return onError(err) - return done() - }) - } - - function onDir (dir) { - var target = dir.name.replace(currentPath, targetPath.replace('$', '$$$$')) // escapes '$' with '$$' - isWritable(target, function (writable) { - if (writable) { - return mkDir(dir, target) - } - copyDir(dir.name) - }) - } - - function mkDir (dir, target) { - fs.mkdir(target, dir.mode, function (err) { - if (err) return onError(err) - // despite setting mode in fs.mkdir, doesn't seem to work - // so we set it here. - fs.chmod(target, dir.mode, function (err) { - if (err) return onError(err) - copyDir(dir.name) - }) - }) - } - - function copyDir (dir) { - fs.readdir(dir, function (err, items) { - if (err) return onError(err) - items.forEach(function (item) { - startCopy(path.join(dir, item)) - }) - return doneOne() - }) - } - - function onLink (link) { - var target = link.replace(currentPath, targetPath) - fs.readlink(link, function (err, resolvedPath) { - if (err) return onError(err) - checkLink(resolvedPath, target) - }) - } - - function checkLink (resolvedPath, target) { - if (dereference) { - resolvedPath = path.resolve(basePath, resolvedPath) - } - isWritable(target, function (writable) { - if (writable) { - return makeLink(resolvedPath, target) - } - fs.readlink(target, function (err, targetDest) { - if (err) return onError(err) - - if (dereference) { - targetDest = path.resolve(basePath, targetDest) - } - if (targetDest === resolvedPath) { - return doneOne() - } - return rmFile(target, function () { - makeLink(resolvedPath, target) - }) - }) - }) - } - - function makeLink (linkPath, target) { - fs.symlink(linkPath, target, function (err) { - if (err) return onError(err) - return doneOne() - }) - } - - function isWritable (path, done) { - fs.lstat(path, function (err) { - if (err) { - if (err.code === 'ENOENT') return done(true) - return done(false) - } - return done(false) - }) - } - - function onError (err) { - // ensure callback is defined & called only once: - if (!errored && callback !== undefined) { - errored = true - return callback(err) - } - } - - function doneOne (skipped) { - if (!skipped) running-- - finished++ - if ((started === finished) && (running === 0)) { - if (callback !== undefined) { - return callback(null) - } - } - } -} - -module.exports = ncp diff --git a/node_modules/fs-extra/lib/empty/index.js b/node_modules/fs-extra/lib/empty/index.js deleted file mode 100644 index db05c1713d..0000000000 --- a/node_modules/fs-extra/lib/empty/index.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict' - -const u = require('universalify').fromCallback -const fs = require('fs') -const path = require('path') -const mkdir = require('../mkdirs') -const remove = require('../remove') - -const emptyDir = u(function emptyDir (dir, callback) { - callback = callback || function () {} - fs.readdir(dir, (err, items) => { - if (err) return mkdir.mkdirs(dir, callback) - - items = items.map(item => path.join(dir, item)) - - deleteItem() - - function deleteItem () { - const item = items.pop() - if (!item) return callback() - remove.remove(item, err => { - if (err) return callback(err) - deleteItem() - }) - } - }) -}) - -function emptyDirSync (dir) { - let items - try { - items = fs.readdirSync(dir) - } catch (err) { - return mkdir.mkdirsSync(dir) - } - - items.forEach(item => { - item = path.join(dir, item) - remove.removeSync(item) - }) -} - -module.exports = { - emptyDirSync, - emptydirSync: emptyDirSync, - emptyDir, - emptydir: emptyDir -} diff --git a/node_modules/fs-extra/lib/ensure/file.js b/node_modules/fs-extra/lib/ensure/file.js deleted file mode 100644 index 67eed3017c..0000000000 --- a/node_modules/fs-extra/lib/ensure/file.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict' - -const u = require('universalify').fromCallback -const path = require('path') -const fs = require('graceful-fs') -const mkdir = require('../mkdirs') -const pathExists = require('../path-exists').pathExists - -function createFile (file, callback) { - function makeFile () { - fs.writeFile(file, '', err => { - if (err) return callback(err) - callback() - }) - } - - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err - if (!err && stats.isFile()) return callback() - const dir = path.dirname(file) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return makeFile() - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - makeFile() - }) - }) - }) -} - -function createFileSync (file) { - let stats - try { - stats = fs.statSync(file) - } catch (e) {} - if (stats && stats.isFile()) return - - const dir = path.dirname(file) - if (!fs.existsSync(dir)) { - mkdir.mkdirsSync(dir) - } - - fs.writeFileSync(file, '') -} - -module.exports = { - createFile: u(createFile), - createFileSync -} diff --git a/node_modules/fs-extra/lib/ensure/index.js b/node_modules/fs-extra/lib/ensure/index.js deleted file mode 100644 index c1f67b7187..0000000000 --- a/node_modules/fs-extra/lib/ensure/index.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict' - -const file = require('./file') -const link = require('./link') -const symlink = require('./symlink') - -module.exports = { - // file - createFile: file.createFile, - createFileSync: file.createFileSync, - ensureFile: file.createFile, - ensureFileSync: file.createFileSync, - // link - createLink: link.createLink, - createLinkSync: link.createLinkSync, - ensureLink: link.createLink, - ensureLinkSync: link.createLinkSync, - // symlink - createSymlink: symlink.createSymlink, - createSymlinkSync: symlink.createSymlinkSync, - ensureSymlink: symlink.createSymlink, - ensureSymlinkSync: symlink.createSymlinkSync -} diff --git a/node_modules/fs-extra/lib/ensure/link.js b/node_modules/fs-extra/lib/ensure/link.js deleted file mode 100644 index 49fe3791f6..0000000000 --- a/node_modules/fs-extra/lib/ensure/link.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict' - -const u = require('universalify').fromCallback -const path = require('path') -const fs = require('graceful-fs') -const mkdir = require('../mkdirs') -const pathExists = require('../path-exists').pathExists - -function createLink (srcpath, dstpath, callback) { - function makeLink (srcpath, dstpath) { - fs.link(srcpath, dstpath, err => { - if (err) return callback(err) - callback(null) - }) - } - - pathExists(dstpath, (err, destinationExists) => { - if (err) return callback(err) - if (destinationExists) return callback(null) - fs.lstat(srcpath, (err, stat) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureLink') - return callback(err) - } - - const dir = path.dirname(dstpath) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return makeLink(srcpath, dstpath) - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - makeLink(srcpath, dstpath) - }) - }) - }) - }) -} - -function createLinkSync (srcpath, dstpath, callback) { - const destinationExists = fs.existsSync(dstpath) - if (destinationExists) return undefined - - try { - fs.lstatSync(srcpath) - } catch (err) { - err.message = err.message.replace('lstat', 'ensureLink') - throw err - } - - const dir = path.dirname(dstpath) - const dirExists = fs.existsSync(dir) - if (dirExists) return fs.linkSync(srcpath, dstpath) - mkdir.mkdirsSync(dir) - - return fs.linkSync(srcpath, dstpath) -} - -module.exports = { - createLink: u(createLink), - createLinkSync -} diff --git a/node_modules/fs-extra/lib/ensure/symlink-paths.js b/node_modules/fs-extra/lib/ensure/symlink-paths.js deleted file mode 100644 index 4a6b78abf9..0000000000 --- a/node_modules/fs-extra/lib/ensure/symlink-paths.js +++ /dev/null @@ -1,99 +0,0 @@ -'use strict' - -const path = require('path') -const fs = require('graceful-fs') -const pathExists = require('../path-exists').pathExists - -/** - * Function that returns two types of paths, one relative to symlink, and one - * relative to the current working directory. Checks if path is absolute or - * relative. If the path is relative, this function checks if the path is - * relative to symlink or relative to current working directory. This is an - * initiative to find a smarter `srcpath` to supply when building symlinks. - * This allows you to determine which path to use out of one of three possible - * types of source paths. The first is an absolute path. This is detected by - * `path.isAbsolute()`. When an absolute path is provided, it is checked to - * see if it exists. If it does it's used, if not an error is returned - * (callback)/ thrown (sync). The other two options for `srcpath` are a - * relative url. By default Node's `fs.symlink` works by creating a symlink - * using `dstpath` and expects the `srcpath` to be relative to the newly - * created symlink. If you provide a `srcpath` that does not exist on the file - * system it results in a broken symlink. To minimize this, the function - * checks to see if the 'relative to symlink' source file exists, and if it - * does it will use it. If it does not, it checks if there's a file that - * exists that is relative to the current working directory, if does its used. - * This preserves the expectations of the original fs.symlink spec and adds - * the ability to pass in `relative to current working direcotry` paths. - */ - -function symlinkPaths (srcpath, dstpath, callback) { - if (path.isAbsolute(srcpath)) { - return fs.lstat(srcpath, (err, stat) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureSymlink') - return callback(err) - } - return callback(null, { - 'toCwd': srcpath, - 'toDst': srcpath - }) - }) - } else { - const dstdir = path.dirname(dstpath) - const relativeToDst = path.join(dstdir, srcpath) - return pathExists(relativeToDst, (err, exists) => { - if (err) return callback(err) - if (exists) { - return callback(null, { - 'toCwd': relativeToDst, - 'toDst': srcpath - }) - } else { - return fs.lstat(srcpath, (err, stat) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureSymlink') - return callback(err) - } - return callback(null, { - 'toCwd': srcpath, - 'toDst': path.relative(dstdir, srcpath) - }) - }) - } - }) - } -} - -function symlinkPathsSync (srcpath, dstpath) { - let exists - if (path.isAbsolute(srcpath)) { - exists = fs.existsSync(srcpath) - if (!exists) throw new Error('absolute srcpath does not exist') - return { - 'toCwd': srcpath, - 'toDst': srcpath - } - } else { - const dstdir = path.dirname(dstpath) - const relativeToDst = path.join(dstdir, srcpath) - exists = fs.existsSync(relativeToDst) - if (exists) { - return { - 'toCwd': relativeToDst, - 'toDst': srcpath - } - } else { - exists = fs.existsSync(srcpath) - if (!exists) throw new Error('relative srcpath does not exist') - return { - 'toCwd': srcpath, - 'toDst': path.relative(dstdir, srcpath) - } - } - } -} - -module.exports = { - symlinkPaths, - symlinkPathsSync -} diff --git a/node_modules/fs-extra/lib/ensure/symlink-type.js b/node_modules/fs-extra/lib/ensure/symlink-type.js deleted file mode 100644 index 4f8787c2a3..0000000000 --- a/node_modules/fs-extra/lib/ensure/symlink-type.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') - -function symlinkType (srcpath, type, callback) { - callback = (typeof type === 'function') ? type : callback - type = (typeof type === 'function') ? false : type - if (type) return callback(null, type) - fs.lstat(srcpath, (err, stats) => { - if (err) return callback(null, 'file') - type = (stats && stats.isDirectory()) ? 'dir' : 'file' - callback(null, type) - }) -} - -function symlinkTypeSync (srcpath, type) { - let stats - - if (type) return type - try { - stats = fs.lstatSync(srcpath) - } catch (e) { - return 'file' - } - return (stats && stats.isDirectory()) ? 'dir' : 'file' -} - -module.exports = { - symlinkType, - symlinkTypeSync -} diff --git a/node_modules/fs-extra/lib/ensure/symlink.js b/node_modules/fs-extra/lib/ensure/symlink.js deleted file mode 100644 index 847c1b9d1a..0000000000 --- a/node_modules/fs-extra/lib/ensure/symlink.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict' - -const u = require('universalify').fromCallback -const path = require('path') -const fs = require('graceful-fs') -const _mkdirs = require('../mkdirs') -const mkdirs = _mkdirs.mkdirs -const mkdirsSync = _mkdirs.mkdirsSync - -const _symlinkPaths = require('./symlink-paths') -const symlinkPaths = _symlinkPaths.symlinkPaths -const symlinkPathsSync = _symlinkPaths.symlinkPathsSync - -const _symlinkType = require('./symlink-type') -const symlinkType = _symlinkType.symlinkType -const symlinkTypeSync = _symlinkType.symlinkTypeSync - -const pathExists = require('../path-exists').pathExists - -function createSymlink (srcpath, dstpath, type, callback) { - callback = (typeof type === 'function') ? type : callback - type = (typeof type === 'function') ? false : type - - pathExists(dstpath, (err, destinationExists) => { - if (err) return callback(err) - if (destinationExists) return callback(null) - symlinkPaths(srcpath, dstpath, (err, relative) => { - if (err) return callback(err) - srcpath = relative.toDst - symlinkType(relative.toCwd, type, (err, type) => { - if (err) return callback(err) - const dir = path.dirname(dstpath) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return fs.symlink(srcpath, dstpath, type, callback) - mkdirs(dir, err => { - if (err) return callback(err) - fs.symlink(srcpath, dstpath, type, callback) - }) - }) - }) - }) - }) -} - -function createSymlinkSync (srcpath, dstpath, type, callback) { - callback = (typeof type === 'function') ? type : callback - type = (typeof type === 'function') ? false : type - - const destinationExists = fs.existsSync(dstpath) - if (destinationExists) return undefined - - const relative = symlinkPathsSync(srcpath, dstpath) - srcpath = relative.toDst - type = symlinkTypeSync(relative.toCwd, type) - const dir = path.dirname(dstpath) - const exists = fs.existsSync(dir) - if (exists) return fs.symlinkSync(srcpath, dstpath, type) - mkdirsSync(dir) - return fs.symlinkSync(srcpath, dstpath, type) -} - -module.exports = { - createSymlink: u(createSymlink), - createSymlinkSync -} diff --git a/node_modules/fs-extra/lib/fs/index.js b/node_modules/fs-extra/lib/fs/index.js deleted file mode 100644 index 1821fd0004..0000000000 --- a/node_modules/fs-extra/lib/fs/index.js +++ /dev/null @@ -1,107 +0,0 @@ -// This is adapted from https://github.com/normalize/mz -// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors -const u = require('universalify').fromCallback -const fs = require('graceful-fs') - -const api = [ - 'access', - 'appendFile', - 'chmod', - 'chown', - 'close', - 'copyFile', - 'fchmod', - 'fchown', - 'fdatasync', - 'fstat', - 'fsync', - 'ftruncate', - 'futimes', - 'lchown', - 'link', - 'lstat', - 'mkdir', - 'mkdtemp', - 'open', - 'readFile', - 'readdir', - 'readlink', - 'realpath', - 'rename', - 'rmdir', - 'stat', - 'symlink', - 'truncate', - 'unlink', - 'utimes', - 'writeFile' -].filter(key => { - // Some commands are not available on some systems. Ex: - // fs.copyFile was added in Node.js v8.5.0 - // fs.mkdtemp was added in Node.js v5.10.0 - // fs.lchown is not available on at least some Linux - return typeof fs[key] === 'function' -}) - -// Export all keys: -Object.keys(fs).forEach(key => { - exports[key] = fs[key] -}) - -// Universalify async methods: -api.forEach(method => { - exports[method] = u(fs[method]) -}) - -// We differ from mz/fs in that we still ship the old, broken, fs.exists() -// since we are a drop-in replacement for the native module -exports.exists = function (filename, callback) { - if (typeof callback === 'function') { - return fs.exists(filename, callback) - } - return new Promise(resolve => { - return fs.exists(filename, resolve) - }) -} - -// fs.read() & fs.write need special treatment due to multiple callback args - -exports.read = function (fd, buffer, offset, length, position, callback) { - if (typeof callback === 'function') { - return fs.read(fd, buffer, offset, length, position, callback) - } - return new Promise((resolve, reject) => { - fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => { - if (err) return reject(err) - resolve({ bytesRead, buffer }) - }) - }) -} - -// Function signature can be -// fs.write(fd, buffer[, offset[, length[, position]]], callback) -// OR -// fs.write(fd, string[, position[, encoding]], callback) -// so we need to handle both cases -exports.write = function (fd, buffer, a, b, c, callback) { - if (typeof arguments[arguments.length - 1] === 'function') { - return fs.write(fd, buffer, a, b, c, callback) - } - - // Check for old, depricated fs.write(fd, string[, position[, encoding]], callback) - if (typeof buffer === 'string') { - return new Promise((resolve, reject) => { - fs.write(fd, buffer, a, b, (err, bytesWritten, buffer) => { - if (err) return reject(err) - resolve({ bytesWritten, buffer }) - }) - }) - } - - return new Promise((resolve, reject) => { - fs.write(fd, buffer, a, b, c, (err, bytesWritten, buffer) => { - if (err) return reject(err) - resolve({ bytesWritten, buffer }) - }) - }) -} diff --git a/node_modules/fs-extra/lib/index.js b/node_modules/fs-extra/lib/index.js deleted file mode 100644 index cb7dd9e650..0000000000 --- a/node_modules/fs-extra/lib/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict' - -const assign = require('./util/assign') - -const fs = {} - -// Export graceful-fs: -assign(fs, require('./fs')) -// Export extra methods: -assign(fs, require('./copy')) -assign(fs, require('./copy-sync')) -assign(fs, require('./mkdirs')) -assign(fs, require('./remove')) -assign(fs, require('./json')) -assign(fs, require('./move')) -assign(fs, require('./move-sync')) -assign(fs, require('./empty')) -assign(fs, require('./ensure')) -assign(fs, require('./output')) -assign(fs, require('./path-exists')) - -module.exports = fs diff --git a/node_modules/fs-extra/lib/json/index.js b/node_modules/fs-extra/lib/json/index.js deleted file mode 100644 index bae68d45a5..0000000000 --- a/node_modules/fs-extra/lib/json/index.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -const u = require('universalify').fromCallback -const jsonFile = require('./jsonfile') - -jsonFile.outputJson = u(require('./output-json')) -jsonFile.outputJsonSync = require('./output-json-sync') -// aliases -jsonFile.outputJSON = jsonFile.outputJson -jsonFile.outputJSONSync = jsonFile.outputJsonSync -jsonFile.writeJSON = jsonFile.writeJson -jsonFile.writeJSONSync = jsonFile.writeJsonSync -jsonFile.readJSON = jsonFile.readJson -jsonFile.readJSONSync = jsonFile.readJsonSync - -module.exports = jsonFile diff --git a/node_modules/fs-extra/lib/json/jsonfile.js b/node_modules/fs-extra/lib/json/jsonfile.js deleted file mode 100644 index 59cdb3e465..0000000000 --- a/node_modules/fs-extra/lib/json/jsonfile.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -const u = require('universalify').fromCallback -const jsonFile = require('jsonfile') - -module.exports = { - // jsonfile exports - readJson: u(jsonFile.readFile), - readJsonSync: jsonFile.readFileSync, - writeJson: u(jsonFile.writeFile), - writeJsonSync: jsonFile.writeFileSync -} diff --git a/node_modules/fs-extra/lib/json/output-json-sync.js b/node_modules/fs-extra/lib/json/output-json-sync.js deleted file mode 100644 index 6f76710e37..0000000000 --- a/node_modules/fs-extra/lib/json/output-json-sync.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const path = require('path') -const mkdir = require('../mkdirs') -const jsonFile = require('./jsonfile') - -function outputJsonSync (file, data, options) { - const dir = path.dirname(file) - - if (!fs.existsSync(dir)) { - mkdir.mkdirsSync(dir) - } - - jsonFile.writeJsonSync(file, data, options) -} - -module.exports = outputJsonSync diff --git a/node_modules/fs-extra/lib/json/output-json.js b/node_modules/fs-extra/lib/json/output-json.js deleted file mode 100644 index d45edb89e5..0000000000 --- a/node_modules/fs-extra/lib/json/output-json.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict' - -const path = require('path') -const mkdir = require('../mkdirs') -const pathExists = require('../path-exists').pathExists -const jsonFile = require('./jsonfile') - -function outputJson (file, data, options, callback) { - if (typeof options === 'function') { - callback = options - options = {} - } - - const dir = path.dirname(file) - - pathExists(dir, (err, itDoes) => { - if (err) return callback(err) - if (itDoes) return jsonFile.writeJson(file, data, options, callback) - - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - jsonFile.writeJson(file, data, options, callback) - }) - }) -} - -module.exports = outputJson diff --git a/node_modules/fs-extra/lib/mkdirs/index.js b/node_modules/fs-extra/lib/mkdirs/index.js deleted file mode 100644 index 29975c5b68..0000000000 --- a/node_modules/fs-extra/lib/mkdirs/index.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict' -const u = require('universalify').fromCallback -const mkdirs = u(require('./mkdirs')) -const mkdirsSync = require('./mkdirs-sync') - -module.exports = { - mkdirs: mkdirs, - mkdirsSync: mkdirsSync, - // alias - mkdirp: mkdirs, - mkdirpSync: mkdirsSync, - ensureDir: mkdirs, - ensureDirSync: mkdirsSync -} diff --git a/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js b/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js deleted file mode 100644 index a3ece40670..0000000000 --- a/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const path = require('path') -const invalidWin32Path = require('./win32').invalidWin32Path - -const o777 = parseInt('0777', 8) - -function mkdirsSync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts } - } - - let mode = opts.mode - const xfs = opts.fs || fs - - if (process.platform === 'win32' && invalidWin32Path(p)) { - const errInval = new Error(p + ' contains invalid WIN32 path characters.') - errInval.code = 'EINVAL' - throw errInval - } - - if (mode === undefined) { - mode = o777 & (~process.umask()) - } - if (!made) made = null - - p = path.resolve(p) - - try { - xfs.mkdirSync(p, mode) - made = made || p - } catch (err0) { - switch (err0.code) { - case 'ENOENT': - if (path.dirname(p) === p) throw err0 - made = mkdirsSync(path.dirname(p), opts, made) - mkdirsSync(p, opts, made) - break - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - let stat - try { - stat = xfs.statSync(p) - } catch (err1) { - throw err0 - } - if (!stat.isDirectory()) throw err0 - break - } - } - - return made -} - -module.exports = mkdirsSync diff --git a/node_modules/fs-extra/lib/mkdirs/mkdirs.js b/node_modules/fs-extra/lib/mkdirs/mkdirs.js deleted file mode 100644 index 18975337aa..0000000000 --- a/node_modules/fs-extra/lib/mkdirs/mkdirs.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const path = require('path') -const invalidWin32Path = require('./win32').invalidWin32Path - -const o777 = parseInt('0777', 8) - -function mkdirs (p, opts, callback, made) { - if (typeof opts === 'function') { - callback = opts - opts = {} - } else if (!opts || typeof opts !== 'object') { - opts = { mode: opts } - } - - if (process.platform === 'win32' && invalidWin32Path(p)) { - const errInval = new Error(p + ' contains invalid WIN32 path characters.') - errInval.code = 'EINVAL' - return callback(errInval) - } - - let mode = opts.mode - const xfs = opts.fs || fs - - if (mode === undefined) { - mode = o777 & (~process.umask()) - } - if (!made) made = null - - callback = callback || function () {} - p = path.resolve(p) - - xfs.mkdir(p, mode, er => { - if (!er) { - made = made || p - return callback(null, made) - } - switch (er.code) { - case 'ENOENT': - if (path.dirname(p) === p) return callback(er) - mkdirs(path.dirname(p), opts, (er, made) => { - if (er) callback(er, made) - else mkdirs(p, opts, callback, made) - }) - break - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, (er2, stat) => { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) callback(er, made) - else callback(null, made) - }) - break - } - }) -} - -module.exports = mkdirs diff --git a/node_modules/fs-extra/lib/mkdirs/win32.js b/node_modules/fs-extra/lib/mkdirs/win32.js deleted file mode 100644 index 99b3920f9c..0000000000 --- a/node_modules/fs-extra/lib/mkdirs/win32.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict' - -const path = require('path') - -// get drive on windows -function getRootPath (p) { - p = path.normalize(path.resolve(p)).split(path.sep) - if (p.length > 0) return p[0] - return null -} - -// http://stackoverflow.com/a/62888/10333 contains more accurate -// TODO: expand to include the rest -const INVALID_PATH_CHARS = /[<>:"|?*]/ - -function invalidWin32Path (p) { - const rp = getRootPath(p) - p = p.replace(rp, '') - return INVALID_PATH_CHARS.test(p) -} - -module.exports = { - getRootPath, - invalidWin32Path -} diff --git a/node_modules/fs-extra/lib/move-sync/index.js b/node_modules/fs-extra/lib/move-sync/index.js deleted file mode 100644 index a5e9114693..0000000000 --- a/node_modules/fs-extra/lib/move-sync/index.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const path = require('path') -const copySync = require('../copy-sync').copySync -const removeSync = require('../remove').removeSync -const mkdirpSync = require('../mkdirs').mkdirsSync -const buffer = require('../util/buffer') - -function moveSync (src, dest, options) { - options = options || {} - const overwrite = options.overwrite || options.clobber || false - - src = path.resolve(src) - dest = path.resolve(dest) - - if (src === dest) return fs.accessSync(src) - - if (isSrcSubdir(src, dest)) throw new Error(`Cannot move '${src}' into itself '${dest}'.`) - - mkdirpSync(path.dirname(dest)) - tryRenameSync() - - function tryRenameSync () { - if (overwrite) { - try { - return fs.renameSync(src, dest) - } catch (err) { - if (err.code === 'ENOTEMPTY' || err.code === 'EEXIST' || err.code === 'EPERM') { - removeSync(dest) - options.overwrite = false // just overwriteed it, no need to do it again - return moveSync(src, dest, options) - } - - if (err.code !== 'EXDEV') throw err - return moveSyncAcrossDevice(src, dest, overwrite) - } - } else { - try { - fs.linkSync(src, dest) - return fs.unlinkSync(src) - } catch (err) { - if (err.code === 'EXDEV' || err.code === 'EISDIR' || err.code === 'EPERM' || err.code === 'ENOTSUP') { - return moveSyncAcrossDevice(src, dest, overwrite) - } - throw err - } - } - } -} - -function moveSyncAcrossDevice (src, dest, overwrite) { - const stat = fs.statSync(src) - - if (stat.isDirectory()) { - return moveDirSyncAcrossDevice(src, dest, overwrite) - } else { - return moveFileSyncAcrossDevice(src, dest, overwrite) - } -} - -function moveFileSyncAcrossDevice (src, dest, overwrite) { - const BUF_LENGTH = 64 * 1024 - const _buff = buffer(BUF_LENGTH) - - const flags = overwrite ? 'w' : 'wx' - - const fdr = fs.openSync(src, 'r') - const stat = fs.fstatSync(fdr) - const fdw = fs.openSync(dest, flags, stat.mode) - let bytesRead = 1 - let pos = 0 - - while (bytesRead > 0) { - bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos) - fs.writeSync(fdw, _buff, 0, bytesRead) - pos += bytesRead - } - - fs.closeSync(fdr) - fs.closeSync(fdw) - return fs.unlinkSync(src) -} - -function moveDirSyncAcrossDevice (src, dest, overwrite) { - const options = { - overwrite: false - } - - if (overwrite) { - removeSync(dest) - tryCopySync() - } else { - tryCopySync() - } - - function tryCopySync () { - copySync(src, dest, options) - return removeSync(src) - } -} - -// return true if dest is a subdir of src, otherwise false. -// extract dest base dir and check if that is the same as src basename -function isSrcSubdir (src, dest) { - try { - return fs.statSync(src).isDirectory() && - src !== dest && - dest.indexOf(src) > -1 && - dest.split(path.dirname(src) + path.sep)[1].split(path.sep)[0] === path.basename(src) - } catch (e) { - return false - } -} - -module.exports = { - moveSync -} diff --git a/node_modules/fs-extra/lib/move/index.js b/node_modules/fs-extra/lib/move/index.js deleted file mode 100644 index eeeb30fe31..0000000000 --- a/node_modules/fs-extra/lib/move/index.js +++ /dev/null @@ -1,170 +0,0 @@ -'use strict' - -// most of this code was written by Andrew Kelley -// licensed under the BSD license: see -// https://github.com/andrewrk/node-mv/blob/master/package.json - -// this needs a cleanup - -const u = require('universalify').fromCallback -const fs = require('graceful-fs') -const ncp = require('../copy/ncp') -const path = require('path') -const remove = require('../remove').remove -const mkdirp = require('../mkdirs').mkdirs - -function move (src, dest, options, callback) { - if (typeof options === 'function') { - callback = options - options = {} - } - - const overwrite = options.overwrite || options.clobber || false - - isSrcSubdir(src, dest, (err, itIs) => { - if (err) return callback(err) - if (itIs) return callback(new Error(`Cannot move '${src}' to a subdirectory of itself, '${dest}'.`)) - mkdirp(path.dirname(dest), err => { - if (err) return callback(err) - doRename() - }) - }) - - function doRename () { - if (path.resolve(src) === path.resolve(dest)) { - fs.access(src, callback) - } else if (overwrite) { - fs.rename(src, dest, err => { - if (!err) return callback() - - if (err.code === 'ENOTEMPTY' || err.code === 'EEXIST') { - remove(dest, err => { - if (err) return callback(err) - options.overwrite = false // just overwriteed it, no need to do it again - move(src, dest, options, callback) - }) - return - } - - // weird Windows shit - if (err.code === 'EPERM') { - setTimeout(() => { - remove(dest, err => { - if (err) return callback(err) - options.overwrite = false - move(src, dest, options, callback) - }) - }, 200) - return - } - - if (err.code !== 'EXDEV') return callback(err) - moveAcrossDevice(src, dest, overwrite, callback) - }) - } else { - fs.link(src, dest, err => { - if (err) { - if (err.code === 'EXDEV' || err.code === 'EISDIR' || err.code === 'EPERM' || err.code === 'ENOTSUP') { - return moveAcrossDevice(src, dest, overwrite, callback) - } - return callback(err) - } - return fs.unlink(src, callback) - }) - } - } -} - -function moveAcrossDevice (src, dest, overwrite, callback) { - fs.stat(src, (err, stat) => { - if (err) return callback(err) - - if (stat.isDirectory()) { - moveDirAcrossDevice(src, dest, overwrite, callback) - } else { - moveFileAcrossDevice(src, dest, overwrite, callback) - } - }) -} - -function moveFileAcrossDevice (src, dest, overwrite, callback) { - const flags = overwrite ? 'w' : 'wx' - const ins = fs.createReadStream(src) - const outs = fs.createWriteStream(dest, { flags }) - - ins.on('error', err => { - ins.destroy() - outs.destroy() - outs.removeListener('close', onClose) - - // may want to create a directory but `out` line above - // creates an empty file for us: See #108 - // don't care about error here - fs.unlink(dest, () => { - // note: `err` here is from the input stream errror - if (err.code === 'EISDIR' || err.code === 'EPERM') { - moveDirAcrossDevice(src, dest, overwrite, callback) - } else { - callback(err) - } - }) - }) - - outs.on('error', err => { - ins.destroy() - outs.destroy() - outs.removeListener('close', onClose) - callback(err) - }) - - outs.once('close', onClose) - ins.pipe(outs) - - function onClose () { - fs.unlink(src, callback) - } -} - -function moveDirAcrossDevice (src, dest, overwrite, callback) { - const options = { - overwrite: false - } - - if (overwrite) { - remove(dest, err => { - if (err) return callback(err) - startNcp() - }) - } else { - startNcp() - } - - function startNcp () { - ncp(src, dest, options, err => { - if (err) return callback(err) - remove(src, callback) - }) - } -} - -// return true if dest is a subdir of src, otherwise false. -// extract dest base dir and check if that is the same as src basename -function isSrcSubdir (src, dest, cb) { - fs.stat(src, (err, st) => { - if (err) return cb(err) - if (st.isDirectory()) { - const baseDir = dest.split(path.dirname(src) + path.sep)[1] - if (baseDir) { - const destBasename = baseDir.split(path.sep)[0] - if (destBasename) return cb(null, src !== dest && dest.indexOf(src) > -1 && destBasename === path.basename(src)) - return cb(null, false) - } - return cb(null, false) - } - return cb(null, false) - }) -} - -module.exports = { - move: u(move) -} diff --git a/node_modules/fs-extra/lib/output/index.js b/node_modules/fs-extra/lib/output/index.js deleted file mode 100644 index 53d5905792..0000000000 --- a/node_modules/fs-extra/lib/output/index.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict' - -const u = require('universalify').fromCallback -const fs = require('graceful-fs') -const path = require('path') -const mkdir = require('../mkdirs') -const pathExists = require('../path-exists').pathExists - -function outputFile (file, data, encoding, callback) { - if (typeof encoding === 'function') { - callback = encoding - encoding = 'utf8' - } - - const dir = path.dirname(file) - pathExists(dir, (err, itDoes) => { - if (err) return callback(err) - if (itDoes) return fs.writeFile(file, data, encoding, callback) - - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - - fs.writeFile(file, data, encoding, callback) - }) - }) -} - -function outputFileSync (file, data, encoding) { - const dir = path.dirname(file) - if (fs.existsSync(dir)) { - return fs.writeFileSync.apply(fs, arguments) - } - mkdir.mkdirsSync(dir) - fs.writeFileSync.apply(fs, arguments) -} - -module.exports = { - outputFile: u(outputFile), - outputFileSync -} diff --git a/node_modules/fs-extra/lib/path-exists/index.js b/node_modules/fs-extra/lib/path-exists/index.js deleted file mode 100644 index ddd9bc718f..0000000000 --- a/node_modules/fs-extra/lib/path-exists/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' -const u = require('universalify').fromPromise -const fs = require('../fs') - -function pathExists (path) { - return fs.access(path).then(() => true).catch(() => false) -} - -module.exports = { - pathExists: u(pathExists), - pathExistsSync: fs.existsSync -} diff --git a/node_modules/fs-extra/lib/remove/index.js b/node_modules/fs-extra/lib/remove/index.js deleted file mode 100644 index cee5340077..0000000000 --- a/node_modules/fs-extra/lib/remove/index.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' - -const u = require('universalify').fromCallback -const rimraf = require('./rimraf') - -module.exports = { - remove: u(rimraf), - removeSync: rimraf.sync -} diff --git a/node_modules/fs-extra/lib/remove/rimraf.js b/node_modules/fs-extra/lib/remove/rimraf.js deleted file mode 100644 index f07869457a..0000000000 --- a/node_modules/fs-extra/lib/remove/rimraf.js +++ /dev/null @@ -1,314 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const path = require('path') -const assert = require('assert') - -const isWindows = (process.platform === 'win32') - -function defaults (options) { - const methods = [ - 'unlink', - 'chmod', - 'stat', - 'lstat', - 'rmdir', - 'readdir' - ] - methods.forEach(m => { - options[m] = options[m] || fs[m] - m = m + 'Sync' - options[m] = options[m] || fs[m] - }) - - options.maxBusyTries = options.maxBusyTries || 3 -} - -function rimraf (p, options, cb) { - let busyTries = 0 - - if (typeof options === 'function') { - cb = options - options = {} - } - - assert(p, 'rimraf: missing path') - assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert.equal(typeof cb, 'function', 'rimraf: callback function required') - assert(options, 'rimraf: invalid options argument provided') - assert.equal(typeof options, 'object', 'rimraf: options should be object') - - defaults(options) - - rimraf_(p, options, function CB (er) { - if (er) { - if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') && - busyTries < options.maxBusyTries) { - busyTries++ - let time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(() => rimraf_(p, options, CB), time) - } - - // already gone - if (er.code === 'ENOENT') er = null - } - - cb(er) - }) -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - // sunos lets the root user unlink directories, which is... weird. - // so we have to lstat here and make sure it's not a dir. - options.lstat(p, (er, st) => { - if (er && er.code === 'ENOENT') { - return cb(null) - } - - // Windows can EPERM on stat. Life is suffering. - if (er && er.code === 'EPERM' && isWindows) { - return fixWinEPERM(p, options, er, cb) - } - - if (st && st.isDirectory()) { - return rmdir(p, options, er, cb) - } - - options.unlink(p, er => { - if (er) { - if (er.code === 'ENOENT') { - return cb(null) - } - if (er.code === 'EPERM') { - return (isWindows) - ? fixWinEPERM(p, options, er, cb) - : rmdir(p, options, er, cb) - } - if (er.code === 'EISDIR') { - return rmdir(p, options, er, cb) - } - } - return cb(er) - }) - }) -} - -function fixWinEPERM (p, options, er, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - if (er) { - assert(er instanceof Error) - } - - options.chmod(p, 0o666, er2 => { - if (er2) { - cb(er2.code === 'ENOENT' ? null : er) - } else { - options.stat(p, (er3, stats) => { - if (er3) { - cb(er3.code === 'ENOENT' ? null : er) - } else if (stats.isDirectory()) { - rmdir(p, options, er, cb) - } else { - options.unlink(p, cb) - } - }) - } - }) -} - -function fixWinEPERMSync (p, options, er) { - let stats - - assert(p) - assert(options) - if (er) { - assert(er instanceof Error) - } - - try { - options.chmodSync(p, 0o666) - } catch (er2) { - if (er2.code === 'ENOENT') { - return - } else { - throw er - } - } - - try { - stats = options.statSync(p) - } catch (er3) { - if (er3.code === 'ENOENT') { - return - } else { - throw er - } - } - - if (stats.isDirectory()) { - rmdirSync(p, options, er) - } else { - options.unlinkSync(p) - } -} - -function rmdir (p, options, originalEr, cb) { - assert(p) - assert(options) - if (originalEr) { - assert(originalEr instanceof Error) - } - assert(typeof cb === 'function') - - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - options.rmdir(p, er => { - if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) { - rmkids(p, options, cb) - } else if (er && er.code === 'ENOTDIR') { - cb(originalEr) - } else { - cb(er) - } - }) -} - -function rmkids (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - options.readdir(p, (er, files) => { - if (er) return cb(er) - - let n = files.length - let errState - - if (n === 0) return options.rmdir(p, cb) - - files.forEach(f => { - rimraf(path.join(p, f), options, er => { - if (errState) { - return - } - if (er) return cb(errState = er) - if (--n === 0) { - options.rmdir(p, cb) - } - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p, options) { - let st - - options = options || {} - defaults(options) - - assert(p, 'rimraf: missing path') - assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.equal(typeof options, 'object', 'rimraf: options should be object') - - try { - st = options.lstatSync(p) - } catch (er) { - if (er.code === 'ENOENT') { - return - } - - // Windows can EPERM on stat. Life is suffering. - if (er.code === 'EPERM' && isWindows) { - fixWinEPERMSync(p, options, er) - } - } - - try { - // sunos lets the root user unlink directories, which is... weird. - if (st && st.isDirectory()) { - rmdirSync(p, options, null) - } else { - options.unlinkSync(p) - } - } catch (er) { - if (er.code === 'ENOENT') { - return - } else if (er.code === 'EPERM') { - return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) - } else if (er.code !== 'EISDIR') { - throw er - } - rmdirSync(p, options, er) - } -} - -function rmdirSync (p, options, originalEr) { - assert(p) - assert(options) - if (originalEr) { - assert(originalEr instanceof Error) - } - - try { - options.rmdirSync(p) - } catch (er) { - if (er.code === 'ENOTDIR') { - throw originalEr - } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') { - rmkidsSync(p, options) - } else if (er.code !== 'ENOENT') { - throw er - } - } -} - -function rmkidsSync (p, options) { - assert(p) - assert(options) - options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options)) - - // We only end up here once we got ENOTEMPTY at least once, and - // at this point, we are guaranteed to have removed all the kids. - // So, we know that it won't be ENOENT or ENOTDIR or anything else. - // try really hard to delete stuff on windows, because it has a - // PROFOUNDLY annoying habit of not closing handles promptly when - // files are deleted, resulting in spurious ENOTEMPTY errors. - const retries = isWindows ? 100 : 1 - let i = 0 - do { - let threw = true - try { - const ret = options.rmdirSync(p, options) - threw = false - return ret - } finally { - if (++i < retries && threw) continue // eslint-disable-line - } - } while (true) -} - -module.exports = rimraf -rimraf.sync = rimrafSync diff --git a/node_modules/fs-extra/lib/util/assign.js b/node_modules/fs-extra/lib/util/assign.js deleted file mode 100644 index 317e5ec4ab..0000000000 --- a/node_modules/fs-extra/lib/util/assign.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -// simple mutable assign -function assign () { - const args = [].slice.call(arguments).filter(i => i) - const dest = args.shift() - args.forEach(src => { - Object.keys(src).forEach(key => { - dest[key] = src[key] - }) - }) - - return dest -} - -module.exports = assign diff --git a/node_modules/fs-extra/lib/util/buffer.js b/node_modules/fs-extra/lib/util/buffer.js deleted file mode 100644 index 93af51b26c..0000000000 --- a/node_modules/fs-extra/lib/util/buffer.js +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -module.exports = function (size) { - if (typeof Buffer.allocUnsafe === 'function') { - try { - return Buffer.allocUnsafe(size) - } catch (e) { - return new Buffer(size) - } - } - return new Buffer(size) -} diff --git a/node_modules/fs-extra/lib/util/utimes.js b/node_modules/fs-extra/lib/util/utimes.js deleted file mode 100644 index 4c320993c5..0000000000 --- a/node_modules/fs-extra/lib/util/utimes.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict' - -const fs = require('graceful-fs') -const os = require('os') -const path = require('path') - -// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not -function hasMillisResSync () { - let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2)) - tmpfile = path.join(os.tmpdir(), tmpfile) - - // 550 millis past UNIX epoch - const d = new Date(1435410243862) - fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141') - const fd = fs.openSync(tmpfile, 'r+') - fs.futimesSync(fd, d, d) - fs.closeSync(fd) - return fs.statSync(tmpfile).mtime > 1435410243000 -} - -function hasMillisRes (callback) { - let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2)) - tmpfile = path.join(os.tmpdir(), tmpfile) - - // 550 millis past UNIX epoch - const d = new Date(1435410243862) - fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => { - if (err) return callback(err) - fs.open(tmpfile, 'r+', (err, fd) => { - if (err) return callback(err) - fs.futimes(fd, d, d, err => { - if (err) return callback(err) - fs.close(fd, err => { - if (err) return callback(err) - fs.stat(tmpfile, (err, stats) => { - if (err) return callback(err) - callback(null, stats.mtime > 1435410243000) - }) - }) - }) - }) - }) -} - -function timeRemoveMillis (timestamp) { - if (typeof timestamp === 'number') { - return Math.floor(timestamp / 1000) * 1000 - } else if (timestamp instanceof Date) { - return new Date(Math.floor(timestamp.getTime() / 1000) * 1000) - } else { - throw new Error('fs-extra: timeRemoveMillis() unknown parameter type') - } -} - -function utimesMillis (path, atime, mtime, callback) { - // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback) - fs.open(path, 'r+', (err, fd) => { - if (err) return callback(err) - fs.futimes(fd, atime, mtime, futimesErr => { - fs.close(fd, closeErr => { - if (callback) callback(futimesErr || closeErr) - }) - }) - }) -} - -module.exports = { - hasMillisRes, - hasMillisResSync, - timeRemoveMillis, - utimesMillis -} diff --git a/node_modules/fs-extra/package.json b/node_modules/fs-extra/package.json deleted file mode 100644 index 8ceeb7499d..0000000000 --- a/node_modules/fs-extra/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "fs-extra", - "version": "4.0.3", - "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.", - "homepage": "https://github.com/jprichardson/node-fs-extra", - "repository": { - "type": "git", - "url": "https://github.com/jprichardson/node-fs-extra" - }, - "keywords": [ - "fs", - "file", - "file system", - "copy", - "directory", - "extra", - "mkdirp", - "mkdir", - "mkdirs", - "recursive", - "json", - "read", - "write", - "extra", - "delete", - "remove", - "touch", - "create", - "text", - "output", - "move" - ], - "author": "JP Richardson ", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "devDependencies": { - "coveralls": "^2.11.2", - "istanbul": "^0.4.5", - "klaw": "^1.0.0", - "klaw-sync": "^1.1.2", - "minimist": "^1.1.1", - "mocha": "^3.1.2", - "proxyquire": "^1.7.10", - "read-dir-files": "^0.1.1", - "rimraf": "^2.2.8", - "secure-random": "^1.1.1", - "semver": "^5.3.0", - "standard": "^10.0.2", - "standard-markdown": "^4.0.1" - }, - "main": "./lib/index.js", - "scripts": { - "coverage": "istanbul cover -i 'lib/**' -x '**/__tests__/**' test.js", - "coveralls": "coveralls < coverage/lcov.info", - "lint": "standard && standard-markdown", - "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha", - "test": "npm run lint && npm run unit", - "unit": "node test.js" - } -} diff --git a/node_modules/github-linguist/.eslintcache b/node_modules/github-linguist/.eslintcache deleted file mode 100644 index 4a75de96cb..0000000000 --- a/node_modules/github-linguist/.eslintcache +++ /dev/null @@ -1 +0,0 @@ -[{"/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/cli.ts":"1","/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/directory.ts":"2","/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/file.ts":"3","/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/index.ts":"4","/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/languages.ts":"5","/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/utils.ts":"6","/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/declarations.d.ts":"7"},{"size":1802,"mtime":1629757721099,"results":"8","hashOfConfig":"9"},{"size":4764,"mtime":1629758968321,"results":"10","hashOfConfig":"9"},{"size":4177,"mtime":1629759033403,"results":"11","hashOfConfig":"9"},{"size":751,"mtime":1629758749896,"results":"12","hashOfConfig":"9"},{"size":5651,"mtime":1629759502034,"results":"13","hashOfConfig":"14"},{"size":541,"mtime":1629758671936,"results":"15","hashOfConfig":"9"},{"size":25,"mtime":1629758437358,"results":"16","hashOfConfig":"9"},{"filePath":"17","messages":"18","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1ug2nbr",{"filePath":"19","messages":"20","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"21","messages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"25","messages":"26","errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"1okz2by",{"filePath":"27","messages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/cli.ts",[],"/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/directory.ts",[],"/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/file.ts",[],"/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/index.ts",[],"/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/languages.ts",["31"],"/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/utils.ts",[],"/Users/andrew.eisenberg/Eclipse/git-repos/linguist/src/declarations.d.ts",[],{"ruleId":"32","severity":2,"message":"33","line":4,"column":21,"nodeType":"34","messageId":"35","endLine":4,"endColumn":44},"@typescript-eslint/no-var-requires","Require statement not part of import statement.","CallExpression","noVarReqs"] \ No newline at end of file diff --git a/node_modules/github-linguist/.eslintignore b/node_modules/github-linguist/.eslintignore deleted file mode 100644 index b04b44c57e..0000000000 --- a/node_modules/github-linguist/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -/lambda/ -/scripts -/config -.history -/test/** diff --git a/node_modules/github-linguist/.eslintrc.js b/node_modules/github-linguist/.eslintrc.js deleted file mode 100644 index 5291157c44..0000000000 --- a/node_modules/github-linguist/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - root: true, - extends: [ - 'eslint-config-airbnb-base', - 'plugin:@typescript-eslint/recommended', - 'plugin:prettier/recommended', - ], - parser: '@typescript-eslint/parser', - env: { - node: true, - es6: true, - jest: true, - }, - settings: { - 'import/resolver': { - node: { - extensions: ['.js', '.ts'] - } - } - }, - rules: { - 'import/extensions': 'off', - 'no-await-in-loop': 'off', - 'no-console': 'off', - 'class-methods-use-this': 'off', - 'no-continue': 'off', - '@typescript-eslint/naming-convention': { format: 'camelCase' }, - '@typescript-eslint/explicit-member-accessibility': 0, - '@typescript-eslint/interface-name-prefix': 0, - '@typescript-eslint/no-explicit-any': 0, - '@typescript-eslint/explicit-module-boundary-types': 0, - '@typescript-eslint/naming-convention': 0, - '@typescript-eslint/no-unused-vars': [ - 'error', - { vars: 'all', args: 'after-used', ignoreRestSiblings: true }, - ], - }, -}; diff --git a/node_modules/github-linguist/.github/workflows/ci.yml b/node_modules/github-linguist/.github/workflows/ci.yml deleted file mode 100644 index 01ef8f4ac6..0000000000 --- a/node_modules/github-linguist/.github/workflows/ci.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Node CI - -on: - - push - - workflow_dispatch - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - node_version: [12.x, 14.x] - os: [ubuntu-latest, windows-latest] - steps: - - run: git config --global core.autocrlf false - if: matrix.os == 'windows-latest' - - - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node_version }} - - - run: echo ${{github.ref}} - - - run: npm ci - - - run: npm run lint - - - run: npm run test - env: - PROGRESS: none - NODE_ENV: test diff --git a/node_modules/github-linguist/.prettierrc.js b/node_modules/github-linguist/.prettierrc.js deleted file mode 100644 index 7f4f9aa9b7..0000000000 --- a/node_modules/github-linguist/.prettierrc.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - singleQuote: true, - trailingComma: 'all', - printWidth: 100, - proseWrap: 'never', - endOfLine: 'lf', - overrides: [ - { - files: '.prettierrc', - options: { - parser: 'json', - }, - }, - ], -}; diff --git a/node_modules/github-linguist/.vscode/launch.json b/node_modules/github-linguist/.vscode/launch.json deleted file mode 100644 index 3443723cac..0000000000 --- a/node_modules/github-linguist/.vscode/launch.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Launch Tests", - "program": "${workspaceFolder}/node_modules/.bin/jest", - "request": "launch", - "skipFiles": [ - "/**" - ], - "type": "pwa-node", - "args": ["--testNamePattern", "example dir info"] - } - ] -} diff --git a/node_modules/github-linguist/README.md b/node_modules/github-linguist/README.md deleted file mode 100644 index 7cf04fb45c..0000000000 --- a/node_modules/github-linguist/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# github-linguist - -💻 Counts the number of lines of code, written in TypeScript. - -**Warning:** This package uses regular expressions to approximate the lines of code in a project. The -results are not 100% precise because the regular expressions can return mistakes in edge -cases, for example if comment tokens are present inside of multiline strings. - -## Prerequisites - -- Node.js 6+ - -## Install - -```bash -npm install github-linguist -``` - -or - -```bash -yarn add github-linguist -``` - -## Usage - -You can use `loc` in you ternimal, or as a npm package in your projects. - -### Command line mode - -Supports counting lines of code of a file or directory. - -#### 1. Lines of code in a single file - -```bash -# loc file -loc file src/index.ts -``` - -![loc file ](https://user-images.githubusercontent.com/3739221/31838697-9fdec114-b5a3-11e7-890e-795444bc9400.png) - -#### 2. Lines of code in a directory - -```bash -# loc -loc dir **/*.ts -``` - -![loc dir ](https://user-images.githubusercontent.com/3739221/31838695-9f94a340-b5a3-11e7-914a-91629d2cfa9f.png) - -### Third-party mode - -```ts -import { LocFile, LocDir } from 'github-linguist'; - -// for a file. -const file = new LocFile(filePath); -const { info } = file.getInfo(); - -// for a directory. -const dir = new LocDir({ - cwd: // root directory, or leave blank to use process.cwd() - include: // string or string[] containing path patterns to include (default include all) - exclude: // string or string[] containing path patterns to exclude (default exclude none) -}); -const { info } = dir.loadInfo(); -``` - -## License - -MIT License. diff --git a/node_modules/github-linguist/dist/cli.d.ts b/node_modules/github-linguist/dist/cli.d.ts deleted file mode 100644 index b7988016da..0000000000 --- a/node_modules/github-linguist/dist/cli.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -export {}; diff --git a/node_modules/github-linguist/dist/cli.js b/node_modules/github-linguist/dist/cli.js deleted file mode 100755 index 5b1412d5e9..0000000000 --- a/node_modules/github-linguist/dist/cli.js +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env node -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const chalk_1 = __importDefault(require("chalk")); -const commander_1 = __importDefault(require("commander")); -const directory_1 = require("./directory"); -const file_1 = require("./file"); -const utils_1 = require("./utils"); -commander_1.default - .version(utils_1.getVersion(), '-v') - .command('file ') - .description('count lines of code in a file') - .action(async (pathPattern) => { - try { - const info = await new file_1.LocFile(pathPattern).getFileInfo(); - // eslint-disable-next-line no-console - console.log(chalk_1.default.cyan(` - path: \t\t${pathPattern} - language: \t${info.languages} - total lines: \t${String(info.lines.total)} - code lines: \t${String(info.lines.code)} - comment lines: \t${String(info.lines.comment)} - `)); - } - catch (e) { - console.error(e); - console.error(e.stacl); - } -}); -const formatInfo = (info, languages) => ` - \ttotal lines: \t${String(info.total)} - \tcode lines: \t${String(info.code)} - \tcomment lines: \t${String(info.comment)} - \t--------------------${Object.keys(languages) - .map((key) => { - const languageInfo = languages[key]; - return `\n\t${key.padEnd(10)} \t file count:${String(languageInfo.sum)} \ttotal:${String(languageInfo.total)} \tcomment:${String(languageInfo.comment)} \tcode:${String(languageInfo.code)}`; -}) - .join('')}`; -commander_1.default.arguments(' [env]').action(async (cmd) => { - try { - const { info, languages } = await new directory_1.LocDir({ - include: cmd, - }).loadInfo(); - // eslint-disable-next-line no-console - console.log(chalk_1.default.cyan(formatInfo(info, languages))); - } - catch (e) { - console.error(e); - console.error(e.stacl); - } -}); -commander_1.default.parse(process.argv); -//# sourceMappingURL=cli.js.map \ No newline at end of file diff --git a/node_modules/github-linguist/dist/cli.js.map b/node_modules/github-linguist/dist/cli.js.map deleted file mode 100644 index 968e3aa2ff..0000000000 --- a/node_modules/github-linguist/dist/cli.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;AAEA,kDAA0B;AAC1B,0DAAgC;AAEhC,2CAAqC;AACrC,iCAA2C;AAC3C,mCAAqC;AAErC,mBAAO;KACJ,OAAO,CAAC,kBAAU,EAAE,EAAE,IAAI,CAAC;KAC3B,OAAO,CAAC,aAAa,CAAC;KACtB,WAAW,CAAC,+BAA+B,CAAC;KAC5C,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE;IAC5B,IAAI;QACF,MAAM,IAAI,GAAG,MAAM,IAAI,cAAO,CAAC,WAAW,CAAC,CAAC,WAAW,EAAE,CAAC;QAC1D,sCAAsC;QACtC,OAAO,CAAC,GAAG,CACT,eAAK,CAAC,IAAI,CAAC;oBACC,WAAW;sBACT,IAAI,CAAC,SAAS;yBACX,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;wBACzB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;2BACpB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;OAC9C,CAAC,CACD,CAAC;KACH;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACjB,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;KACxB;AACH,CAAC,CAAC,CAAC;AAEL,MAAM,UAAU,GAAG,CACjB,IAAc,E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-linguist/dist/directory.d.ts deleted file mode 100644 index 6261e3b844..0000000000 --- a/node_modules/github-linguist/dist/directory.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { LineInfo } from './file'; -export interface LocDirOptions { - cwd?: string; - include?: string[] | string; - exclude?: string[] | string; - analysisLanguages?: string[]; -} -export interface LocResult { - files: string[]; - info: LineInfo; - languages: { - [key: string]: LineInfo & { - sum: number; - }; - }; -} -/** - * Collect the info of a directory. - */ -export declare class LocDir { - private cwd; - private include; - private exclude; - private analysisLanguages?; - private allLanguages; - constructor(options: LocDirOptions); - /** - * Calculate directory info. - */ - loadInfo(): Promise; - /** - * Ignore analyzing this file if analysis languages are specified - * and this language is not one of them. - */ - private ignoreLanguage; -} diff --git a/node_modules/github-linguist/dist/directory.js b/node_modules/github-linguist/dist/directory.js deleted file mode 100644 index 1b2500d657..0000000000 --- a/node_modules/github-linguist/dist/directory.js +++ /dev/null @@ -1,209 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LocDir = void 0; -const globby_1 = __importDefault(require("globby")); -const fs_extra_1 = __importDefault(require("fs-extra")); -const path_1 = __importDefault(require("path")); -const slash2_1 = __importDefault(require("slash2")); -const file_1 = require("./file"); -const languages_1 = require("./languages"); -const defaultInfo = { - total: 0, - code: 0, - comment: 0, -}; -const defaultExclude = [ - // javascript - '**/*.map', - '**/yarn**', - '**/.github', - '**/node_modules/**', - '**/dist/**', - '**/*.snap', - // java - '**/target', - '**/*.class', - '**/*.o', - '**/bin', - '**/*.map', - // python - '**/*.pyc', - '**/*.pyo', - // other - '**/*.dil', - '**/*.ra', - // images - '**/*.png', - '**/*.jpg', - '**/*.jpeg', - '**/*.gif', - '**/*.ico', - '**/*.bmp', - '**/*.webp', - '**/*.tiff', - '**/*.psd', - '**/*.ai', - '**/*.ps', - '**/*.eps', - // fonts - '**/*.ttf', - '**/*.otf', - '**/*.woff', - '**/*.woff2', - '**/*.eot', - '**/*.ttc', - // audio - '**/*.mp3', - '**/*.wav', - '**/*.ogg', - '**/*.flac', - '**/*.aac', - '**/*.m4a', - '**/*.aif*', - // video - '**/*.mp4', - '**/*.mkv', - '**/*.avi', - '**/*.mov', - '**/*.wmv', - '**/*.mpg', - '**/*.mpeg', - '**/*.m2v', - '**/*.m4v', - // office - '**/*.doc', - '**/*.docx', - '**/*.docm', - '**/*.dot', - '**/*.dotx', - '**/*.xls', - '**/*.xlsx', - // documents - '**/*.pdf', - '**/*.epub', - '**/*.mobi', - // archives - '**/*.rar', - '**/*.zip', - '**/*.7z', - '**/*.tar', - '**/*.gz', - '**/*.bz2', - '**/*.bz', - '**/*.tbz', - '**/*.tgz', -]; -function ensureArray(arr, dfault) { - if (!arr) { - return dfault ? [dfault] : []; - } - return Array.isArray(arr) ? arr : [arr]; -} -/** - * Collect the info of a directory. - */ -class LocDir { - constructor(options) { - Object.defineProperty(this, "cwd", { - enumerable: true, - configurable: true, - writable: true, - value: void 0 - }); - Object.defineProperty(this, "include", { - enumerable: true, - configurable: true, - writable: true, - value: void 0 - }); - Object.defineProperty(this, "exclude", { - enumerable: true, - configurable: true, - writable: true, - value: void 0 - }); - Object.defineProperty(this, "analysisLanguages", { - enumerable: true, - configurable: true, - writable: true, - value: void 0 - }); - Object.defineProperty(this, "allLanguages", { - enumerable: true, - configurable: true, - writable: true, - value: new languages_1.Languages() - }); - // ensure all excludes are globstar. Note that '**/*.ts/**' matches files - // that end in .ts because the globstar indicates 0 or more directory paths. - this.exclude = ensureArray(options.exclude) - .concat(defaultExclude) - .map((item) => (item.endsWith('**') ? item : `${item}/**`)); - // remove all leading './' since this messes up globstar matches in the - // excludes. - this.include = ensureArray(options.include, '**') - .map((item) => (item.startsWith('./') ? item.substring(2) : item)) - .map((item) => (item.endsWith('**') ? item : `${item}/**`)); - this.cwd = options.cwd || process.cwd(); - this.analysisLanguages = options.analysisLanguages; - } - /** - * Calculate directory info. - */ - async loadInfo() { - const paths = await globby_1.default(this.include, { - cwd: this.cwd, - ignore: this.exclude, - nodir: true, - }); - const files = []; - const info = { ...defaultInfo }; - let languages = {}; - // We _could_ use Promise.all to count the files in parallel, but that - // would lead to out of memory errors when there are many files. - // eslint-disable-next-line no-restricted-syntax - for (const pathItem of paths) { - const fullPath = slash2_1.default(path_1.default.join(this.cwd, pathItem)); - if (!pathItem || - this.ignoreLanguage(pathItem) || - !(await fs_extra_1.default.pathExists(fullPath)) || - (await fs_extra_1.default.stat(fullPath)).isDirectory()) { - continue; - } - const file = new file_1.LocFile(fullPath); - const fileLineInfo = await file.getFileInfo(); - const { lines } = fileLineInfo; - info.total += lines.total; - info.code += lines.code; - info.comment += lines.comment; - const language = { ...languages[fileLineInfo.languages] }; - language.code = lines.code + (language.code || 0); - language.sum = (language.sum || 0) + 1; - language.comment = lines.comment + (language.comment || 0); - language.total = lines.total + (language.total || 0); - languages = { - ...languages, - [fileLineInfo.languages]: language, - }; - files.push(fullPath); - } - return { - files, - info, - languages, - }; - } - /** - * Ignore analyzing this file if analysis languages are specified - * and this language is not one of them. - */ - ignoreLanguage(pathItem) { - return (this.analysisLanguages && - !this.analysisLanguages.includes(this.allLanguages.getType(pathItem))); - } -} -exports.LocDir = LocDir; -//# sourceMappingURL=directory.js.map \ No newline at end of file diff --git a/node_modules/github-linguist/dist/directory.js.map b/node_modules/github-linguist/dist/directory.js.map deleted file mode 100644 index c9447a9447..0000000000 --- a/node_modules/github-linguist/dist/directory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"directory.js","sourceRoot":"","sources":["../src/directory.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,wDAA0B;AAC1B,gDAAwB;AACxB,oDAA2B;AAE3B,iCAA2C;AAC3C,2CAAwC;AAExC,MAAM,WAAW,GAAa;IAC5B,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;CACX,CAAC;AA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YACvC,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;YAC3D,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;YACrD,SAAS,GAAG;gBACV,GAAG,SAAS;gBACZ,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,QAAQ;aACnC,CAAC;YACF,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACtB;QAED,OAAO;YACL,KAAK;YACL,IAAI;YACJ,SAAS;SACV,CAAC;IACJ,CAAC;IAED;;;OAGG;IACK,cAAc,CAAC,QAAgB;QACrC,OAAO,CACL,IAAI,CAAC,iBAAiB;YACtB,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CACtE,CAAC;IACJ,CAAC;CACF;AA7FD,wBA6FC"} \ No newline at end of file diff --git a/node_modules/github-linguist/dist/file.d.ts b/node_modules/github-linguist/dist/file.d.ts deleted file mode 100644 index c6c39ebc8b..0000000000 --- a/node_modules/github-linguist/dist/file.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * detect file info - */ -export interface LineInfo { - total: number; - code: number; - comment: number; -} -export interface FileInfo { - name: string; - languages: string; - size: number; - lines: LineInfo; -} -/** - * Collect language info for a single file - */ -export declare class LocFile { - private debug; - path: string; - private rawPath; - private languages; - /** - * Creates an instance of LocFile. - */ - constructor(rawPath: string, debug?: boolean); - private filterData; - /** - * Get file info when LocFile init - */ - getFileInfo(data?: string): Promise; - getFileInfoByContent(name: string, data: string): FileInfo; -} diff --git a/node_modules/github-linguist/dist/file.js b/node_modules/github-linguist/dist/file.js deleted file mode 100644 index e7b60117ae..0000000000 --- a/node_modules/github-linguist/dist/file.js +++ /dev/null @@ -1,192 +0,0 @@ -"use strict"; -/** - * detect file info - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LocFile = void 0; -const fs = __importStar(require("fs-extra")); -const slash2_1 = __importDefault(require("slash2")); -const languages_1 = require("./languages"); -const DefaultLine = { - total: 0, - code: 0, - comment: 0, -}; -const DefaultFileInfo = { - name: '', - languages: '', - size: 0, - lines: DefaultLine, -}; -/** - * Collect language info for a single file - */ -class LocFile { - /** - * Creates an instance of LocFile. - */ - constructor(rawPath, debug = false) { - Object.defineProperty(this, "debug", { - enumerable: true, - configurable: true, - writable: true, - value: debug - }); - Object.defineProperty(this, "path", { - enumerable: true, - configurable: true, - writable: true, - value: void 0 - }); - Object.defineProperty(this, "rawPath", { - enumerable: true, - configurable: true, - writable: true, - value: void 0 - }); - Object.defineProperty(this, "languages", { - enumerable: true, - configurable: true, - writable: true, - value: new languages_1.Languages() - }); - Object.defineProperty(this, "filterData", { - enumerable: true, - configurable: true, - writable: true, - value: (data, regexes) => { - const lines = data.split(/\n/); - let commentLength = 0; - let codeLength = lines.length; - const total = codeLength; - let inMultiLineComment = false; - lines.forEach((origLine) => { - var _a, _b, _c, _d, _e, _f; - let lineType = 'code'; - const line = origLine.trim(); - if (inMultiLineComment) { - let noCode = true; - if ((_a = regexes.multiLineCommentClose) === null || _a === void 0 ? void 0 : _a.test(line)) { - // line contains the end of a multi-line comment - inMultiLineComment = false; - if (!((_b = regexes.multiLineCommentCloseEnd) === null || _b === void 0 ? void 0 : _b.test(line))) { - // the multiline comment does not end this line. - // there is real code on it. - noCode = false; - } - } - if (noCode) { - lineType = 'comm'; - commentLength += 1; - codeLength -= 1; - } - } - else if (line) { - // non-empty line - if ((_c = regexes.multiLineCommentOpen) === null || _c === void 0 ? void 0 : _c.test(line)) { - // line contains the start of a multi-line comment - // might contain some real code, but we'll let that slide - if (!((_d = regexes.multiLineCommentOpenAndClose) === null || _d === void 0 ? void 0 : _d.test(line))) { - // comment is not also closed on this line - inMultiLineComment = true; - } - if ((_e = regexes.multiLineCommentOpenStart) === null || _e === void 0 ? void 0 : _e.test(line)) { - // The comment starts the line. There is no other code on this line - commentLength += 1; - codeLength -= 1; - lineType = 'comm'; - } - } - else if ((_f = regexes.singleLineComment) === null || _f === void 0 ? void 0 : _f.test(line)) { - // line contains only a single line comment - commentLength += 1; - codeLength -= 1; - lineType = 'comm'; - } - } - else { - // empty line - codeLength -= 1; - lineType = 'empt'; - } - if (this.debug) { - console.log(lineType, line); - } - }); - return { - ...DefaultLine, - total, - code: codeLength, - comment: commentLength, - }; - } - }); - this.path = slash2_1.default(rawPath); - this.rawPath = rawPath; - } - /** - * Get file info when LocFile init - */ - async getFileInfo(data) { - if (!(await fs.pathExists(this.rawPath))) { - throw new Error(`Error: file ${this.rawPath} does not exist.`); - } - let newData = data; - const info = { ...DefaultFileInfo }; - // note: do not use Path.sep here since we have already - // translated the path to a posix path using slash(...). - const name = this.path.split('/').pop() || ''; - try { - const stat = await fs.stat(this.path); - if (!stat.isFile()) { - return info; - } - newData = data || (await fs.readFile(this.path, 'utf-8')); - info.name = name; - info.size = (stat && stat.size) || 0; - info.languages = this.languages.getType(this.path); - if (!info.languages) { - return info; - } - if (newData) { - const regexes = this.languages.getRegexes(info.languages); - info.lines = this.filterData(newData, regexes); - } - } - catch (err) { - throw new Error('read file failed.'); - } - return info; - } - getFileInfoByContent(name, data) { - const info = { ...DefaultFileInfo }; - info.name = name; - info.languages = this.languages.getType(name); - info.lines = this.filterData(data, this.languages.getRegexes(info.languages)); - return info; - } -} -exports.LocFile = LocFile; -//# sourceMappingURL=file.js.map \ No newline at end of file diff --git a/node_modules/github-linguist/dist/file.js.map b/node_modules/github-linguist/dist/file.js.map deleted file mode 100644 index b56d07f33e..0000000000 --- a/node_modules/github-linguist/dist/file.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"file.js","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,oDAA2B;AAE3B,2CAAiD;AAejD,MAAM,WAAW,GAAa;IAC5B,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;CACX,CAAC;AAEF,MAAM,eAAe,GAAa;IAChC,IAAI,EAAE,EAAE;IACR,SAAS,EAAE,EAAE;IACb,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,WAAW;CACnB,CAAC;AAEF;;GAEG;AACH,MAAa,OAAO;IAOlB;;OAEG;IACH,YAAY,OAAe,EAAU,QAAQ,KAAK;;;;;mBAAb;;QATrC;;;;;WAAoB;QAEpB;;;;;WAAwB;QAExB;;;;mBAAoB,IAAI,qBAAS,EAAE;WAAC;QAUpC;;;;mBAAqB,CAAC,IAAY,EAAE,OAAgB,EAAY,EAAE;gBAChE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAC/B,IAAI,aAAa,GAAG,CAAC,CAAC;gBACtB,IAAI,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC;gBAC9B,MAAM,KAAK,GAAG,UAAU,CAAC;gBAEzB,IAAI,kBAAkB,GAAG,KAAK,CAAC;gB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AC;YAC1D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;gBACnB,OAAO,IAAI,CAAC;aACb;YACD,IAAI,OAAO,EAAE;gBACX,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAC1D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;aAChD;SACF;QAAC,OAAO,GAAG,EAAE;YACZ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;SACtC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,oBAAoB,CAAC,IAAY,EAAE,IAAY;QACpD,MAAM,IAAI,GAAa,EAAE,GAAG,eAAe,EAAE,CAAC;QAC9C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;QAC9E,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA/HD,0BA+HC"} \ No newline at end of file diff --git a/node_modules/github-linguist/dist/index.d.ts b/node_modules/github-linguist/dist/index.d.ts deleted file mode 100644 index d9a27e9c16..0000000000 --- a/node_modules/github-linguist/dist/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { LocResult } from './directory'; -export { LocDir, LocDirOptions } from './directory'; -export { LocFile, LineInfo } from './file'; -declare const loc: (fileOrDir: string) => Promise; -export default loc; diff --git a/node_modules/github-linguist/dist/index.js b/node_modules/github-linguist/dist/index.js deleted file mode 100644 index 9508255a52..0000000000 --- a/node_modules/github-linguist/dist/index.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const slash2_1 = __importDefault(require("slash2")); -const fs_extra_1 = __importDefault(require("fs-extra")); -const directory_1 = require("./directory"); -const file_1 = require("./file"); -var directory_2 = require("./directory"); -Object.defineProperty(exports, "LocDir", { enumerable: true, get: function () { return directory_2.LocDir; } }); -var file_2 = require("./file"); -Object.defineProperty(exports, "LocFile", { enumerable: true, get: function () { return file_2.LocFile; } }); -const loc = async (fileOrDir) => { - const stat = await fs_extra_1.default.stat(slash2_1.default(fileOrDir)); - if (stat.isFile()) { - const locFile = new file_1.LocFile(slash2_1.default(fileOrDir)); - const info = await locFile.getFileInfo(); - const filePath = locFile.path; - return { - info: info.lines, - files: [filePath], - languages: { [info.languages]: { ...info.lines, sum: 1 } }, - }; - } - const locDir = new directory_1.LocDir({ cwd: slash2_1.default(fileOrDir) }); - return locDir.loadInfo(); -}; -exports.default = loc; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/github-linguist/dist/index.js.map b/node_modules/github-linguist/dist/index.js.map deleted file mode 100644 index 2be7226ecf..0000000000 --- a/node_modules/github-linguist/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,oDAA2B;AAC3B,wDAA0B;AAE1B,2CAAgD;AAChD,iCAAiC;AAEjC,yCAAoD;AAA3C,mGAAA,MAAM,OAAA;AACf,+BAA2C;AAAlC,+FAAA,OAAO,OAAA;AAEhB,MAAM,GAAG,GAAG,KAAK,EAAE,SAAiB,EAAsB,EAAE;IAC1D,MAAM,IAAI,GAAG,MAAM,kBAAE,CAAC,IAAI,CAAC,gBAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAC7C,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,IAAI,cAAO,CAAC,gBAAK,CAAC,SAAS,CAAC,CAAC,CAAC;QAC9C,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,WAAW,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;QAC9B,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,KAAK,EAAE,CAAC,QAAQ,CAAC;YACjB,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE;SAC3D,CAAC;KACH;IACD,MAAM,MAAM,GAAG,IAAI,kBAAM,CAAC,EAAE,GAAG,EAAE,gBAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACrD,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;AAC3B,CAAC,CAAC;AAEF,kBAAe,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/github-linguist/dist/languages.d.ts b/node_modules/github-linguist/dist/languages.d.ts deleted file mode 100644 index 142ee1461f..0000000000 --- a/node_modules/github-linguist/dist/languages.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -export interface Regexes { - singleLineComment: RegExp; - multiLineCommentOpen?: RegExp; - multiLineCommentOpenStart?: RegExp; - multiLineCommentClose?: RegExp; - multiLineCommentCloseEnd?: RegExp; - multiLineCommentOpenAndClose?: RegExp; -} -/** - * detecte program language through file extension - * - * @export - * @class LanguageDetector - */ -export declare class Languages { - extensionMap: { - [key: string]: string; - }; - /** - * Creates an instance of Detector. - */ - constructor(); - /** - * load language before detecting - */ - private loadExtensionMap; - /** - * Retrieve the regular expressions for a given language. - * This is incomplete, but covers most of the languages we - * see in the wild. - * - * @param language the language to retrieve regexes for - */ - getRegexes(language: string): Regexes; - /** - * return extension map - */ - getExtensionMap(): { - [key: string]: string; - }; - /** - * get file type through a path - */ - getType(path: string): string; -} diff --git a/node_modules/github-linguist/dist/languages.js b/node_modules/github-linguist/dist/languages.js deleted file mode 100644 index d4a10d502f..0000000000 --- a/node_modules/github-linguist/dist/languages.js +++ /dev/null @@ -1,170 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Languages = void 0; -const languages_json_1 = __importDefault(require("language-map/languages.json")); -const utils_1 = require("./utils"); -/** - * The extension map can contain multiple languages with the same extension, - * but we only want a single one. For the moment, these clashes are resolved - * by the simple heuristic below listing high-priority languages. We may want - * to consider smarter heuristics to correctly identify languages in cases - * where the extension is ambiguous. The ordering of the list matters and - * languages earlier on will get a higher priority when resolving clashes. - */ -const importantLanguages = [ - 'javascript', - 'typescript', - 'ruby', - 'python', - 'java', - 'c', - 'c++', - 'c#', - 'rust', - 'scala', - 'perl', - 'go', -]; -const ALL_REGEXES = { - c: { - // matches when // are the first two characters of a line - singleLineComment: /^\/\//, - // matches when /* exists in a line - multiLineCommentOpen: /\/\*/, - // matches when /* starts a line - multiLineCommentOpenStart: /^\/\*/, - // matches when */ exists a line - multiLineCommentClose: /\*\//, - // matches when */ ends a line - multiLineCommentCloseEnd: /\*\/$/, - // matches /* ... */ - multiLineCommentOpenAndClose: /\/\*.*\*\//, - }, - python: { - // matches when # the first character of a line - singleLineComment: /^#/, - }, - ruby: { - // matches when # the first character of a line - singleLineComment: /^#/, - // For ruby multiline comments, =begin and =end must be - // on their own lines - // matches when =begin starts a line - multiLineCommentOpen: /^=begin/, - // matches when "begin starts a line - multiLineCommentOpenStart: /^=begin/, - // matches when "end ends a line - multiLineCommentClose: /^=end/, - // matches when "end ends a line - multiLineCommentCloseEnd: /^=end$/, - // not possible in ruby - multiLineCommentOpenAndClose: /^\0$/, - }, - html: { - // There is no single line comment - singleLineComment: /^\0$/, - // matches when =begin starts a line - multiLineCommentOpen: //, - // matches when "end ends a line - multiLineCommentCloseEnd: /-->$/, - // matches - multiLineCommentOpenAndClose: //, - }, -}; -/** - * detecte program language through file extension - * - * @export - * @class LanguageDetector - */ -class Languages { - /** - * Creates an instance of Detector. - */ - constructor() { - Object.defineProperty(this, "extensionMap", { - enumerable: true, - configurable: true, - writable: true, - value: {} - }); - /** - * load language before detecting - */ - Object.defineProperty(this, "loadExtensionMap", { - enumerable: true, - configurable: true, - writable: true, - value: () => { - const extensions = {}; - Object.keys(languages_json_1.default).forEach((language) => { - const languageMode = languages_json_1.default[language]; - const languageExtensions = (languageMode && languageMode.extensions) || []; - languageExtensions.forEach((extension) => { - const lowerCaseExtension = extension.toLowerCase(); - const lowerCaseLanguage = language.toLowerCase(); - if (!extensions[lowerCaseExtension]) { - extensions[lowerCaseExtension] = lowerCaseLanguage; - } - else { - const currentLanguagePriority = importantLanguages.indexOf(extensions[lowerCaseExtension]); - if (currentLanguagePriority === -1) { - extensions[lowerCaseExtension] = lowerCaseLanguage; - } - else { - const otherPriority = importantLanguages.indexOf(lowerCaseLanguage); - if (otherPriority !== -1 && otherPriority < currentLanguagePriority) - extensions[lowerCaseExtension] = lowerCaseLanguage; - } - } - }); - }); - return { ...extensions, ...utils_1.ExtensionJustify }; - } - }); - this.extensionMap = this.loadExtensionMap(); - } - /** - * Retrieve the regular expressions for a given language. - * This is incomplete, but covers most of the languages we - * see in the wild. - * - * @param language the language to retrieve regexes for - */ - getRegexes(language) { - switch (language) { - case 'html': - case 'xml': - return ALL_REGEXES.html; - case 'ruby': - return ALL_REGEXES.ruby; - case 'python': - return ALL_REGEXES.python; - default: - // not exact, but likely the best guess for any other unspecified language. - return ALL_REGEXES.c; - } - } - /** - * return extension map - */ - getExtensionMap() { - return this.extensionMap; - } - /** - * get file type through a path - */ - getType(path) { - const fileExtension = `.${path.split('.').pop()}`; - return this.extensionMap[fileExtension] || ''; - } -} -exports.Languages = Languages; -//# sourceMappingURL=languages.js.map \ No newline at end of file diff --git a/node_modules/github-linguist/dist/languages.js.map b/node_modules/github-linguist/dist/languages.js.map deleted file mode 100644 index 565aad29b9..0000000000 --- a/node_modules/github-linguist/dist/languages.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"languages.js","sourceRoot":"","sources":["../src/languages.ts"],"names":[],"mappings":";;;;;;AAAA,iFAAsD;AACtD,mCAA2C;AAM3C;;;;;;;GAOG;AACH,MAAM,kBAAkB,GAAG;IACzB,YAAY;IACZ,YAAY;IACZ,MAAM;IACN,QAAQ;IACR,MAAM;IACN,GAAG;IACH,KAAK;IACL,IAAI;IACJ,MAAM;IACN,OAAO;IACP,MAAM;IACN,IAAI;CACL,CAAC;AAWF,MAAM,WAAW,GAA4B;IAC3C,CAAC,EAAE;QACD,yDAAyD;QACzD,iBAAiB,EAAE,OAAO;QAE1B,mCAAmC;QACnC,oBAAoB,EAAE,MAAM;QAE5B,gCAAgC;QAChC,yBAAyB,EAAE,OAAO;QAElC,gCAAgC;QAChC,qBAAqB,EAAE,MAAM;QAE7B,8BAA8B;QAC9B,wBAAwB,EAAE,OAAO;QAEjC,oBAAoB;QACpB,4BAA4B,EAAE,YAAY;KAC3C;IAED,MAAM,EAAE;QACN,+CAA+C;QAC/C,iBAAiB,EAAE,IAAI;KAkBxB;IAED,IAAI,EAAE;QACJ,+CAA+C;QAC/C,iBAAiB,EAAE,IAAI;QAEvB,uDAAuD;QACvD,qBAAqB;QAErB,oCAAoC;QACpC,oBAAoB,EAAE,SAAS;QAE/B,oCAAoC;QACpC,yBAAyB,EAAE,SAAS;QAEpC,gCAAgC;QAChC,qBAAqB,EAAE,OAAO;QAE9B,gCAAgC;QAChC,wBAAwB,EAAE,QAAQ;QAElC,uBAAuB;QACvB,4BAA4B,EAAE,MAAM;KACrC;IA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AAC,iBAAiB,CAAC,CAAC;gCACpE,IAAI,aAAa,KAAK,CAAC,CAAC,IAAI,aAAa,GAAG,uBAAuB;oCACjE,UAAU,CAAC,kBAAkB,CAAC,GAAG,iBAAiB,CAAC;6BACtD;yBACF;oBACH,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;gBAEH,OAAO,EAAE,GAAG,UAAU,EAAE,GAAG,wBAAgB,EAAE,CAAC;YAChD,CAAC;WAAC;QAjCA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC9C,CAAC;IAkCD;;;;;;OAMG;IACI,UAAU,CAAC,QAAgB;QAChC,QAAQ,QAAQ,EAAE;YAChB,KAAK,MAAM,CAAC;YACZ,KAAK,KAAK;gBACR,OAAO,WAAW,CAAC,IAAI,CAAC;YAE1B,KAAK,MAAM;gBACT,OAAO,WAAW,CAAC,IAAI,CAAC;YAE1B,KAAK,QAAQ;gBACX,OAAO,WAAW,CAAC,MAAM,CAAC;YAE5B;gBACE,2EAA2E;gBAC3E,OAAO,WAAW,CAAC,CAAC,CAAC;SACxB;IACH,CAAC;IAED;;OAEG;IACI,eAAe;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,OAAO,CAAC,IAAY;QACzB,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;IAChD,CAAC;CACF;AAnFD,8BAmFC"} \ No newline at end of file diff --git a/node_modules/github-linguist/dist/utils.d.ts b/node_modules/github-linguist/dist/utils.d.ts deleted file mode 100644 index dfccfe0b04..0000000000 --- a/node_modules/github-linguist/dist/utils.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Get package version. - * - * @export getVersion - * @returns {string} - */ -export declare function getVersion(): string; -export declare const ExtensionJustify: { - '.ts': string; - '.jsx': string; - '.js': string; - '.tsx': string; -}; diff --git a/node_modules/github-linguist/dist/utils.js b/node_modules/github-linguist/dist/utils.js deleted file mode 100644 index 8dc4f4112a..0000000000 --- a/node_modules/github-linguist/dist/utils.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExtensionJustify = exports.getVersion = void 0; -const fs_1 = __importDefault(require("fs")); -const path_1 = __importDefault(require("path")); -const slash2_1 = __importDefault(require("slash2")); -const packagePath = slash2_1.default(path_1.default.join(__dirname, '../', 'package.json')); -/** - * Get package version. - * - * @export getVersion - * @returns {string} - */ -function getVersion() { - const packageInfo = JSON.parse(fs_1.default.readFileSync(packagePath, 'utf8')); - return (packageInfo && packageInfo.version) || 'invalid version!'; -} -exports.getVersion = getVersion; -exports.ExtensionJustify = { - '.ts': 'typescript', - '.jsx': 'javascript', - '.js': 'javascript', - '.tsx': 'typescript', -}; -//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/github-linguist/dist/utils.js.map b/node_modules/github-linguist/dist/utils.js.map deleted file mode 100644 index 4e76e613aa..0000000000 --- a/node_modules/github-linguist/dist/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,oDAA2B;AAE3B,MAAM,WAAW,GAAG,gBAAK,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC;AAEvE;;;;;GAKG;AACH,SAAgB,UAAU;IACxB,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,YAAE,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAErE,OAAO,CAAC,WAAW,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,kBAAkB,CAAC;AACpE,CAAC;AAJD,gCAIC;AAEY,QAAA,gBAAgB,GAAG;IAC9B,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,YAAY;CACrB,CAAC"} \ No newline at end of file diff --git a/node_modules/github-linguist/jest.config.ts b/node_modules/github-linguist/jest.config.ts deleted file mode 100644 index 9c6fec0ad2..0000000000 --- a/node_modules/github-linguist/jest.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * For a detailed explanation regarding each configuration property and type check, visit: - * https://jestjs.io/docs/configuration - */ - -export default { - // Automatically clear mock calls and instances between every test - clearMocks: true, - - // Indicates whether each individual test should be reported during the run - verbose: undefined, - - preset: 'ts-jest', -}; diff --git a/node_modules/github-linguist/node_modules/array-union/index.js b/node_modules/github-linguist/node_modules/array-union/index.js deleted file mode 100644 index e33f38a1eb..0000000000 --- a/node_modules/github-linguist/node_modules/array-union/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; -var arrayUniq = require('array-uniq'); - -module.exports = function () { - return arrayUniq([].concat.apply([], arguments)); -}; diff --git a/node_modules/github-linguist/node_modules/array-union/license b/node_modules/github-linguist/node_modules/array-union/license deleted file mode 100644 index 654d0bfe94..0000000000 --- a/node_modules/github-linguist/node_modules/array-union/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/github-linguist/node_modules/array-union/package.json b/node_modules/github-linguist/node_modules/array-union/package.json deleted file mode 100644 index 367c844b65..0000000000 --- a/node_modules/github-linguist/node_modules/array-union/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "array-union", - "version": "1.0.2", - "description": "Create an array of unique values, in order, from the input arrays", - "license": "MIT", - "repository": "sindresorhus/array-union", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "array", - "arr", - "set", - "uniq", - "unique", - "duplicate", - "remove", - "union", - "combine", - "merge" - ], - "dependencies": { - "array-uniq": "^1.0.1" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/node_modules/github-linguist/node_modules/array-union/readme.md b/node_modules/github-linguist/node_modules/array-union/readme.md deleted file mode 100644 index ea472dd079..0000000000 --- a/node_modules/github-linguist/node_modules/array-union/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union) - -> Create an array of unique values, in order, from the input arrays - - -## Install - -``` -$ npm install --save array-union -``` - - -## Usage - -```js -const arrayUnion = require('array-union'); - -arrayUnion([1, 1, 2, 3], [2, 3]); -//=> [1, 2, 3] - -arrayUnion(['foo', 'foo', 'bar'], ['foo']); -//=> ['foo', 'bar'] -``` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/github-linguist/node_modules/commander/CHANGELOG.md b/node_modules/github-linguist/node_modules/commander/CHANGELOG.md deleted file mode 100644 index 7dce779da8..0000000000 --- a/node_modules/github-linguist/node_modules/commander/CHANGELOG.md +++ /dev/null @@ -1,419 +0,0 @@ -2.20.3 / 2019-10-11 -================== - - * Support Node.js 0.10 (Revert #1059) - * Ran "npm unpublish commander@2.20.2". There is no 2.20.2. - -2.20.1 / 2019-09-29 -================== - - * Improve executable subcommand tracking - * Update dev dependencies - -2.20.0 / 2019-04-02 -================== - - * fix: resolve symbolic links completely when hunting for subcommands (#935) - * Update index.d.ts (#930) - * Update Readme.md (#924) - * Remove --save option as it isn't required anymore (#918) - * Add link to the license file (#900) - * Added example of receiving args from options (#858) - * Added missing semicolon (#882) - * Add extension to .eslintrc (#876) - -2.19.0 / 2018-10-02 -================== - - * Removed newline after Options and Commands headers (#864) - * Bugfix - Error output (#862) - * Fix to change default value to string (#856) - -2.18.0 / 2018-09-07 -================== - - * Standardize help output (#853) - * chmod 644 travis.yml (#851) - * add support for execute typescript subcommand via ts-node (#849) - -2.17.1 / 2018-08-07 -================== - - * Fix bug in command emit (#844) - -2.17.0 / 2018-08-03 -================== - - * fixed newline output after help information (#833) - * Fix to emit the action even without command (#778) - * npm update (#823) - -2.16.0 / 2018-06-29 -================== - - * Remove Makefile and `test/run` (#821) - * Make 'npm test' run on Windows (#820) - * Add badge to display install size (#807) - * chore: cache node_modules (#814) - * chore: remove Node.js 4 (EOL), add Node.js 10 (#813) - * fixed typo in readme (#812) - * Fix types (#804) - * Update eslint to resolve vulnerabilities in lodash (#799) - * updated readme with custom event listeners. (#791) - * fix tests (#794) - -2.15.0 / 2018-03-07 -================== - - * Update downloads badge to point to graph of downloads over time instead of duplicating link to npm - * Arguments description - -2.14.1 / 2018-02-07 -================== - - * Fix typing of help function - -2.14.0 / 2018-02-05 -================== - - * only register the option:version event once - * Fixes issue #727: Passing empty string for option on command is set to undefined - * enable eqeqeq rule - * resolves #754 add linter configuration to project - * resolves #560 respect custom name for version option - * document how to override the version flag - * document using options per command - -2.13.0 / 2018-01-09 -================== - - * Do not print default for --no- - * remove trailing spaces in command help - * Update CI's Node.js to LTS and latest version - * typedefs: Command and Option types added to commander namespace - -2.12.2 / 2017-11-28 -================== - - * fix: typings are not shipped - -2.12.1 / 2017-11-23 -================== - - * Move @types/node to dev dependency - -2.12.0 / 2017-11-22 -================== - - * add attributeName() method to Option objects - * Documentation updated for options with --no prefix - * typings: `outputHelp` takes a string as the first parameter - * typings: use overloads - * feat(typings): update to match js api - * Print default value in option help - * Fix translation error - * Fail when using same command and alias (#491) - * feat(typings): add help callback - * fix bug when description is add after command with options (#662) - * Format js code - * Rename History.md to CHANGELOG.md (#668) - * feat(typings): add typings to support TypeScript (#646) - * use current node - -2.11.0 / 2017-07-03 -================== - - * Fix help section order and padding (#652) - * feature: support for signals to subcommands (#632) - * Fixed #37, --help should not display first (#447) - * Fix translation errors. (#570) - * Add package-lock.json - * Remove engines - * Upgrade package version - * Prefix events to prevent conflicts between commands and options (#494) - * Removing dependency on graceful-readlink - * Support setting name in #name function and make it chainable - * Add .vscode directory to .gitignore (Visual Studio Code metadata) - * Updated link to ruby commander in readme files - -2.10.0 / 2017-06-19 -================== - - * Update .travis.yml. drop support for older node.js versions. - * Fix require arguments in README.md - * On SemVer you do not start from 0.0.1 - * Add missing semi colon in readme - * Add save param to npm install - * node v6 travis test - * Update Readme_zh-CN.md - * Allow literal '--' to be passed-through as an argument - * Test subcommand alias help - * link build badge to master branch - * Support the alias of Git style sub-command - * added keyword commander for better search result on npm - * Fix Sub-Subcommands - * test node.js stable - * Fixes TypeError when a command has an option called `--description` - * Update README.md to make it beginner friendly and elaborate on the difference between angled and square brackets. - * Add chinese Readme file - -2.9.0 / 2015-10-13 -================== - - * Add option `isDefault` to set default subcommand #415 @Qix- - * Add callback to allow filtering or post-processing of help text #434 @djulien - * Fix `undefined` text in help information close #414 #416 @zhiyelee - -2.8.1 / 2015-04-22 -================== - - * Back out `support multiline description` Close #396 #397 - -2.8.0 / 2015-04-07 -================== - - * Add `process.execArg` support, execution args like `--harmony` will be passed to sub-commands #387 @DigitalIO @zhiyelee - * Fix bug in Git-style sub-commands #372 @zhiyelee - * Allow commands to be hidden from help #383 @tonylukasavage - * When git-style sub-commands are in use, yet none are called, display help #382 @claylo - * Add ability to specify arguments syntax for top-level command #258 @rrthomas - * Support multiline descriptions #208 @zxqfox - -2.7.1 / 2015-03-11 -================== - - * Revert #347 (fix collisions when option and first arg have same name) which causes a bug in #367. - -2.7.0 / 2015-03-09 -================== - - * Fix git-style bug when installed globally. Close #335 #349 @zhiyelee - * Fix collisions when option and first arg have same name. Close #346 #347 @tonylukasavage - * Add support for camelCase on `opts()`. Close #353 @nkzawa - * Add node.js 0.12 and io.js to travis.yml - * Allow RegEx options. #337 @palanik - * Fixes exit code when sub-command failing. Close #260 #332 @pirelenito - * git-style `bin` files in $PATH make sense. Close #196 #327 @zhiyelee - -2.6.0 / 2014-12-30 -================== - - * added `Command#allowUnknownOption` method. Close #138 #318 @doozr @zhiyelee - * Add application description to the help msg. Close #112 @dalssoft - -2.5.1 / 2014-12-15 -================== - - * fixed two bugs incurred by variadic arguments. Close #291 @Quentin01 #302 @zhiyelee - -2.5.0 / 2014-10-24 -================== - - * add support for variadic arguments. Closes #277 @whitlockjc - -2.4.0 / 2014-10-17 -================== - - * fixed a bug on executing the coercion function of subcommands option. Closes #270 - * added `Command.prototype.name` to retrieve command name. Closes #264 #266 @tonylukasavage - * added `Command.prototype.opts` to retrieve all the options as a simple object of key-value pairs. Closes #262 @tonylukasavage - * fixed a bug on subcommand name. Closes #248 @jonathandelgado - * fixed function normalize doesn’t honor option terminator. Closes #216 @abbr - -2.3.0 / 2014-07-16 -================== - - * add command alias'. Closes PR #210 - * fix: Typos. Closes #99 - * fix: Unused fs module. Closes #217 - -2.2.0 / 2014-03-29 -================== - - * add passing of previous option value - * fix: support subcommands on windows. Closes #142 - * Now the defaultValue passed as the second argument of the coercion function. - -2.1.0 / 2013-11-21 -================== - - * add: allow cflag style option params, unit test, fixes #174 - -2.0.0 / 2013-07-18 -================== - - * remove input methods (.prompt, .confirm, etc) - -1.3.2 / 2013-07-18 -================== - - * add support for sub-commands to co-exist with the original command - -1.3.1 / 2013-07-18 -================== - - * add quick .runningCommand hack so you can opt-out of other logic when running a sub command - -1.3.0 / 2013-07-09 -================== - - * add EACCES error handling - * fix sub-command --help - -1.2.0 / 2013-06-13 -================== - - * allow "-" hyphen as an option argument - * support for RegExp coercion - -1.1.1 / 2012-11-20 -================== - - * add more sub-command padding - * fix .usage() when args are present. Closes #106 - -1.1.0 / 2012-11-16 -================== - - * add git-style executable subcommand support. Closes #94 - -1.0.5 / 2012-10-09 -================== - - * fix `--name` clobbering. Closes #92 - * fix examples/help. Closes #89 - -1.0.4 / 2012-09-03 -================== - - * add `outputHelp()` method. - -1.0.3 / 2012-08-30 -================== - - * remove invalid .version() defaulting - -1.0.2 / 2012-08-24 -================== - - * add `--foo=bar` support [arv] - * fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus] - -1.0.1 / 2012-08-03 -================== - - * fix issue #56 - * fix tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode()) - -1.0.0 / 2012-07-05 -================== - - * add support for optional option descriptions - * add defaulting of `.version()` to package.json's version - -0.6.1 / 2012-06-01 -================== - - * Added: append (yes or no) on confirmation - * Added: allow node.js v0.7.x - -0.6.0 / 2012-04-10 -================== - - * Added `.prompt(obj, callback)` support. Closes #49 - * Added default support to .choose(). Closes #41 - * Fixed the choice example - -0.5.1 / 2011-12-20 -================== - - * Fixed `password()` for recent nodes. Closes #36 - -0.5.0 / 2011-12-04 -================== - - * Added sub-command option support [itay] - -0.4.3 / 2011-12-04 -================== - - * Fixed custom help ordering. Closes #32 - -0.4.2 / 2011-11-24 -================== - - * Added travis support - * Fixed: line-buffered input automatically trimmed. Closes #31 - -0.4.1 / 2011-11-18 -================== - - * Removed listening for "close" on --help - -0.4.0 / 2011-11-15 -================== - - * Added support for `--`. Closes #24 - -0.3.3 / 2011-11-14 -================== - - * Fixed: wait for close event when writing help info [Jerry Hamlet] - -0.3.2 / 2011-11-01 -================== - - * Fixed long flag definitions with values [felixge] - -0.3.1 / 2011-10-31 -================== - - * Changed `--version` short flag to `-V` from `-v` - * Changed `.version()` so it's configurable [felixge] - -0.3.0 / 2011-10-31 -================== - - * Added support for long flags only. Closes #18 - -0.2.1 / 2011-10-24 -================== - - * "node": ">= 0.4.x < 0.7.0". Closes #20 - -0.2.0 / 2011-09-26 -================== - - * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] - -0.1.0 / 2011-08-24 -================== - - * Added support for custom `--help` output - -0.0.5 / 2011-08-18 -================== - - * Changed: when the user enters nothing prompt for password again - * Fixed issue with passwords beginning with numbers [NuckChorris] - -0.0.4 / 2011-08-15 -================== - - * Fixed `Commander#args` - -0.0.3 / 2011-08-15 -================== - - * Added default option value support - -0.0.2 / 2011-08-15 -================== - - * Added mask support to `Command#password(str[, mask], fn)` - * Added `Command#password(str, fn)` - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/github-linguist/node_modules/commander/LICENSE b/node_modules/github-linguist/node_modules/commander/LICENSE deleted file mode 100644 index 10f997ab10..0000000000 --- a/node_modules/github-linguist/node_modules/commander/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/github-linguist/node_modules/commander/Readme.md b/node_modules/github-linguist/node_modules/commander/Readme.md deleted file mode 100644 index c846e7a2d2..0000000000 --- a/node_modules/github-linguist/node_modules/commander/Readme.md +++ /dev/null @@ -1,428 +0,0 @@ -# Commander.js - - -[![Build Status](https://api.travis-ci.org/tj/commander.js.svg?branch=master)](http://travis-ci.org/tj/commander.js) -[![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander) -[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://npmcharts.com/compare/commander?minimal=true) -[![Install Size](https://packagephobia.now.sh/badge?p=commander)](https://packagephobia.now.sh/result?p=commander) -[![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/commander-rb/commander). - [API documentation](http://tj.github.com/commander.js/) - - -## Installation - - $ npm install commander - -## Option parsing - -Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.1.0') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq-sauce', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineapple'); -if (program.bbqSauce) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - -Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -Note that multi-word options starting with `--no` prefix negate the boolean value of the following word. For example, `--no-sauce` sets the value of `program.sauce` to false. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .option('--no-sauce', 'Remove sauce') - .parse(process.argv); - -console.log('you ordered a pizza'); -if (program.sauce) console.log(' with sauce'); -else console.log(' without sauce'); -``` - -To get string arguments from options you will need to use angle brackets <> for required inputs or square brackets [] for optional inputs. - -e.g. ```.option('-m --myarg [myVar]', 'my super cool description')``` - -Then to access the input if it was passed in. - -e.g. ```var myInput = program.myarg``` - -**NOTE**: If you pass a argument without using brackets the example above will return true and not the value passed in. - - -## Version option - -Calling the `version` implicitly adds the `-V` and `--version` options to the command. -When either of these options is present, the command prints the version number and exits. - - $ ./examples/pizza -V - 0.0.1 - -If you want your program to respond to the `-v` option instead of the `-V` option, simply pass custom flags to the `version` method using the same syntax as the `option` method. - -```js -program - .version('0.0.1', '-v, --version') -``` - -The version flags can be named anything, but the long option is required. - -## Command-specific options - -You can attach options to a command. - -```js -#!/usr/bin/env node - -var program = require('commander'); - -program - .command('rm ') - .option('-r, --recursive', 'Remove recursively') - .action(function (dir, cmd) { - console.log('remove ' + dir + (cmd.recursive ? ' recursively' : '')) - }) - -program.parse(process.argv) -``` - -A command's options are validated when the command is used. Any unknown options will be reported as an error. However, if an action-based command does not define an action, then the options are not validated. - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -function collect(val, memo) { - memo.push(val); - return memo; -} - -function increaseVerbosity(v, total) { - return total + 1; -} - -program - .version('0.1.0') - .usage('[options] ') - .option('-i, --integer ', 'An integer argument', parseInt) - .option('-f, --float ', 'A float argument', parseFloat) - .option('-r, --range ..', 'A range', range) - .option('-l, --list ', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .option('-c, --collect [value]', 'A repeatable value', collect, []) - .option('-v, --verbose', 'A value that can be increased', increaseVerbosity, 0) - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' collect: %j', program.collect); -console.log(' verbosity: %j', program.verbose); -console.log(' args: %j', program.args); -``` - -## Regular Expression -```js -program - .version('0.1.0') - .option('-s --size ', 'Pizza size', /^(large|medium|small)$/i, 'medium') - .option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i) - .parse(process.argv); - -console.log(' size: %j', program.size); -console.log(' drink: %j', program.drink); -``` - -## Variadic arguments - - The last argument of a command can be variadic, and only the last argument. To make an argument variadic you have to - append `...` to the argument name. Here is an example: - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.1.0') - .command('rmdir [otherDirs...]') - .action(function (dir, otherDirs) { - console.log('rmdir %s', dir); - if (otherDirs) { - otherDirs.forEach(function (oDir) { - console.log('rmdir %s', oDir); - }); - } - }); - -program.parse(process.argv); -``` - - An `Array` is used for the value of a variadic argument. This applies to `program.args` as well as the argument passed - to your action as demonstrated above. - -## Specify the argument syntax - -```js -#!/usr/bin/env node - -var program = require('commander'); - -program - .version('0.1.0') - .arguments(' [env]') - .action(function (cmd, env) { - cmdValue = cmd; - envValue = env; - }); - -program.parse(process.argv); - -if (typeof cmdValue === 'undefined') { - console.error('no command given!'); - process.exit(1); -} -console.log('command:', cmdValue); -console.log('environment:', envValue || "no environment given"); -``` -Angled brackets (e.g. ``) indicate required input. Square brackets (e.g. `[env]`) indicate optional input. - -## Git-style sub-commands - -```js -// file: ./examples/pm -var program = require('commander'); - -program - .version('0.1.0') - .command('install [name]', 'install one or more packages') - .command('search [query]', 'search with optional query') - .command('list', 'list packages installed', {isDefault: true}) - .parse(process.argv); -``` - -When `.command()` is invoked with a description argument, no `.action(callback)` should be called to handle sub-commands, otherwise there will be an error. This tells commander that you're going to use separate executables for sub-commands, much like `git(1)` and other popular tools. -The commander will try to search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-command`, like `pm-install`, `pm-search`. - -Options can be passed with the call to `.command()`. Specifying `true` for `opts.noHelp` will remove the subcommand from the generated help output. Specifying `true` for `opts.isDefault` will run the subcommand if no other subcommand is specified. - -If the program is designed to be installed globally, make sure the executables have proper modes, like `755`. - -### `--harmony` - -You can enable `--harmony` option in two ways: -* Use `#! /usr/bin/env node --harmony` in the sub-commands scripts. Note some os version don’t support this pattern. -* Use the `--harmony` option when call the command, like `node --harmony examples/pm publish`. The `--harmony` option will be preserved when spawning sub-command process. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` -$ ./examples/pizza --help -Usage: pizza [options] - -An application for pizzas ordering - -Options: - -h, --help output usage information - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineapple - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -C, --no-cheese You do not want any cheese -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviors, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.1.0') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log('') - console.log('Examples:'); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -Yields the following help output when `node script-name.js -h` or `node script-name.js --help` are run: - -``` -Usage: custom-help [options] - -Options: - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - $ custom-help --help - $ custom-help -h -``` - -## .outputHelp(cb) - -Output help information without exiting. -Optional callback cb allows post-processing of help text before it is displayed. - -If you want to display help by default (e.g. if no command was provided), you can use something like: - -```js -var program = require('commander'); -var colors = require('colors'); - -program - .version('0.1.0') - .command('getstream [url]', 'get stream URL') - .parse(process.argv); - -if (!process.argv.slice(2).length) { - program.outputHelp(make_red); -} - -function make_red(txt) { - return colors.red(txt); //display the help text in red on the console -} -``` - -## .help(cb) - - Output help information and exit immediately. - Optional callback cb allows post-processing of help text before it is displayed. - - -## Custom event listeners - You can execute custom actions by listening to command and option events. - -```js -program.on('option:verbose', function () { - process.env.VERBOSE = this.verbose; -}); - -// error on unknown commands -program.on('command:*', function () { - console.error('Invalid command: %s\nSee --help for a list of available commands.', program.args.join(' ')); - process.exit(1); -}); -``` - -## Examples - -```js -var program = require('commander'); - -program - .version('0.1.0') - .option('-C, --chdir ', 'change the working directory') - .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - .option('-T, --no-tests', 'ignore test hook'); - -program - .command('setup [env]') - .description('run setup commands for all envs') - .option("-s, --setup_mode [mode]", "Which setup mode to use") - .action(function(env, options){ - var mode = options.setup_mode || "normal"; - env = env || 'all'; - console.log('setup for %s env(s) with %s mode', env, mode); - }); - -program - .command('exec ') - .alias('ex') - .description('execute the given remote cmd') - .option("-e, --exec_mode ", "Which exec mode to use") - .action(function(cmd, options){ - console.log('exec "%s" using %s mode', cmd, options.exec_mode); - }).on('--help', function() { - console.log(''); - console.log('Examples:'); - console.log(''); - console.log(' $ deploy exec sequential'); - console.log(' $ deploy exec async'); - }); - -program - .command('*') - .action(function(env){ - console.log('deploying "%s"', env); - }); - -program.parse(process.argv); -``` - -More Demos can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory. - -## License - -[MIT](https://github.com/tj/commander.js/blob/master/LICENSE) diff --git a/node_modules/github-linguist/node_modules/commander/index.js b/node_modules/github-linguist/node_modules/commander/index.js deleted file mode 100644 index ec1d61d587..0000000000 --- a/node_modules/github-linguist/node_modules/commander/index.js +++ /dev/null @@ -1,1224 +0,0 @@ -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter; -var spawn = require('child_process').spawn; -var path = require('path'); -var dirname = path.dirname; -var basename = path.basename; -var fs = require('fs'); - -/** - * Inherit `Command` from `EventEmitter.prototype`. - */ - -require('util').inherits(Command, EventEmitter); - -/** - * Expose the root command. - */ - -exports = module.exports = new Command(); - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = flags.indexOf('<') >= 0; - this.optional = flags.indexOf('[') >= 0; - this.bool = flags.indexOf('-no-') === -1; - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description || ''; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function() { - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Return option name, in a camelcase format that can be used - * as a object attribute key. - * - * @return {String} - * @api private - */ - -Option.prototype.attributeName = function() { - return camelcase(this.name()); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg) { - return this.short === arg || this.long === arg; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this._execs = {}; - this._allowUnknownOption = false; - this._args = []; - this._name = name || ''; -} - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function() { - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd) { - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('teardown [otherDirs...]') - * .description('run teardown commands') - * .action(function(dir, otherDirs) { - * console.log('dir "%s"', dir); - * if (otherDirs) { - * otherDirs.forEach(function (oDir) { - * console.log('dir "%s"', oDir); - * }); - * } - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env) { - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @param {String} [desc] for git-style sub-commands - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name, desc, opts) { - if (typeof desc === 'object' && desc !== null) { - opts = desc; - desc = null; - } - opts = opts || {}; - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - - if (desc) { - cmd.description(desc); - this.executables = true; - this._execs[cmd._name] = true; - if (opts.isDefault) this.defaultExecutable = cmd._name; - } - cmd._noHelp = !!opts.noHelp; - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - - if (desc) return this; - return cmd; -}; - -/** - * Define argument syntax for the top-level command. - * - * @api public - */ - -Command.prototype.arguments = function(desc) { - return this.parseExpectedArgs(desc.split(/ +/)); -}; - -/** - * Add an implicit `help [cmd]` subcommand - * which invokes `--help` for the given command. - * - * @api private - */ - -Command.prototype.addImplicitHelpCommand = function() { - this.command('help [cmd]', 'display help for [cmd]'); -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args) { - if (!args.length) return; - var self = this; - args.forEach(function(arg) { - var argDetails = { - required: false, - name: '', - variadic: false - }; - - switch (arg[0]) { - case '<': - argDetails.required = true; - argDetails.name = arg.slice(1, -1); - break; - case '[': - argDetails.name = arg.slice(1, -1); - break; - } - - if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') { - argDetails.variadic = true; - argDetails.name = argDetails.name.slice(0, -3); - } - if (argDetails.name) { - self._args.push(argDetails); - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function() { - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn) { - var self = this; - var listener = function(args, unknown) { - // Parse any so-far unknown options - args = args || []; - unknown = unknown || []; - - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - // Leftover arguments need to be pushed back. Fixes issue #56 - if (parsed.args.length) args = parsed.args.concat(args); - - self._args.forEach(function(arg, i) { - if (arg.required && args[i] == null) { - self.missingArgument(arg.name); - } else if (arg.variadic) { - if (i !== self._args.length - 1) { - self.variadicArgNotLast(arg.name); - } - - args[i] = args.splice(i); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self._args.length) { - args[self._args.length] = self; - } else { - args.push(self); - } - - fn.apply(self, args); - }; - var parent = this.parent || this; - var name = parent === this ? '*' : this._name; - parent.on('command:' + name, listener); - if (this._alias) parent.on('command:' + this._alias, listener); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to true - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => false - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|*} [fn] or default - * @param {*} [defaultValue] - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue) { - var self = this, - option = new Option(flags, description), - oname = option.name(), - name = option.attributeName(); - - // default as 3rd arg - if (typeof fn !== 'function') { - if (fn instanceof RegExp) { - var regex = fn; - fn = function(val, def) { - var m = regex.exec(val); - return m ? m[0] : def; - }; - } else { - defaultValue = fn; - fn = null; - } - } - - // preassign default value only for --no-*, [optional], or - if (!option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (!option.bool) defaultValue = true; - // preassign only if we have a default - if (defaultValue !== undefined) { - self[name] = defaultValue; - option.defaultValue = defaultValue; - } - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on('option:' + oname, function(val) { - // coercion - if (val !== null && fn) { - val = fn(val, self[name] === undefined ? defaultValue : self[name]); - } - - // unassigned or bool - if (typeof self[name] === 'boolean' || typeof self[name] === 'undefined') { - // if no value, bool true, and we have a default, then use it! - if (val == null) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (val !== null) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Allow unknown options on the command line. - * - * @param {Boolean} arg if `true` or omitted, no error will be thrown - * for unknown options. - * @api public - */ -Command.prototype.allowUnknownOption = function(arg) { - this._allowUnknownOption = arguments.length === 0 || arg; - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv) { - // implicit help - if (this.executables) this.addImplicitHelpCommand(); - - // store raw args - this.rawArgs = argv; - - // guess name - this._name = this._name || basename(argv[1], '.js'); - - // github-style sub-commands with no sub-command - if (this.executables && argv.length < 3 && !this.defaultExecutable) { - // this user needs help - argv.push('--help'); - } - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - var args = this.args = parsed.args; - - var result = this.parseArgs(this.args, parsed.unknown); - - // executable sub-commands - var name = result.args[0]; - - var aliasCommand = null; - // check alias of sub commands - if (name) { - aliasCommand = this.commands.filter(function(command) { - return command.alias() === name; - })[0]; - } - - if (this._execs[name] === true) { - return this.executeSubCommand(argv, args, parsed.unknown); - } else if (aliasCommand) { - // is alias of a subCommand - args[0] = aliasCommand._name; - return this.executeSubCommand(argv, args, parsed.unknown); - } else if (this.defaultExecutable) { - // use the default subcommand - args.unshift(this.defaultExecutable); - return this.executeSubCommand(argv, args, parsed.unknown); - } - - return result; -}; - -/** - * Execute a sub-command executable. - * - * @param {Array} argv - * @param {Array} args - * @param {Array} unknown - * @api private - */ - -Command.prototype.executeSubCommand = function(argv, args, unknown) { - args = args.concat(unknown); - - if (!args.length) this.help(); - if (args[0] === 'help' && args.length === 1) this.help(); - - // --help - if (args[0] === 'help') { - args[0] = args[1]; - args[1] = '--help'; - } - - // executable - var f = argv[1]; - // name of the subcommand, link `pm-install` - var bin = basename(f, path.extname(f)) + '-' + args[0]; - - // In case of globally installed, get the base dir where executable - // subcommand file should be located at - var baseDir; - - var resolvedLink = fs.realpathSync(f); - - baseDir = dirname(resolvedLink); - - // prefer local `./` to bin in the $PATH - var localBin = path.join(baseDir, bin); - - // whether bin file is a js script with explicit `.js` or `.ts` extension - var isExplicitJS = false; - if (exists(localBin + '.js')) { - bin = localBin + '.js'; - isExplicitJS = true; - } else if (exists(localBin + '.ts')) { - bin = localBin + '.ts'; - isExplicitJS = true; - } else if (exists(localBin)) { - bin = localBin; - } - - args = args.slice(1); - - var proc; - if (process.platform !== 'win32') { - if (isExplicitJS) { - args.unshift(bin); - // add executable arguments to spawn - args = (process.execArgv || []).concat(args); - - proc = spawn(process.argv[0], args, { stdio: 'inherit', customFds: [0, 1, 2] }); - } else { - proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] }); - } - } else { - args.unshift(bin); - proc = spawn(process.execPath, args, { stdio: 'inherit' }); - } - - var signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP']; - signals.forEach(function(signal) { - process.on(signal, function() { - if (proc.killed === false && proc.exitCode === null) { - proc.kill(signal); - } - }); - }); - proc.on('close', process.exit.bind(process)); - proc.on('error', function(err) { - if (err.code === 'ENOENT') { - console.error('error: %s(1) does not exist, try --help', bin); - } else if (err.code === 'EACCES') { - console.error('error: %s(1) not executable. try chmod or run with root', bin); - } - process.exit(1); - }); - - // Store the reference to the child process - this.runningCommand = proc; -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * This also normalizes equal sign and splits "--abc=def" into "--abc def". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args) { - var ret = [], - arg, - lastOpt, - index; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (i > 0) { - lastOpt = this.optionFor(args[i - 1]); - } - - if (arg === '--') { - // Honor option terminator - ret = ret.concat(args.slice(i)); - break; - } else if (lastOpt && lastOpt.required) { - ret.push(arg); - } else if (arg.length > 1 && arg[0] === '-' && arg[1] !== '-') { - arg.slice(1).split('').forEach(function(c) { - ret.push('-' + c); - }); - } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) { - ret.push(arg.slice(0, index), arg.slice(index + 1)); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown) { - var name; - - if (args.length) { - name = args[0]; - if (this.listeners('command:' + name).length) { - this.emit('command:' + args.shift(), args, unknown); - } else { - this.emit('command:*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - if (this.commands.length === 0 && - this._args.filter(function(a) { return a.required; }).length === 0) { - this.emit('command:*'); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg) { - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv) { - var args = [], - len = argv.length, - literal, - option, - arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if (literal) { - args.push(arg); - continue; - } - - if (arg === '--') { - literal = true; - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (arg == null) return this.optionMissingArgument(option); - this.emit('option:' + option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i + 1]; - if (arg == null || (arg[0] === '-' && arg !== '-')) { - arg = null; - } else { - ++i; - } - this.emit('option:' + option.name(), arg); - // bool - } else { - this.emit('option:' + option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && arg[0] === '-') { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if ((i + 1) < argv.length && argv[i + 1][0] !== '-') { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Return an object containing options as key-value pairs - * - * @return {Object} - * @api public - */ -Command.prototype.opts = function() { - var result = {}, - len = this.options.length; - - for (var i = 0; i < len; i++) { - var key = this.options[i].attributeName(); - result[key] = key === this._versionOptionName ? this._version : this[key]; - } - return result; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name) { - console.error("error: missing required argument `%s'", name); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag) { - if (flag) { - console.error("error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error("error: option `%s' argument missing", option.flags); - } - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag) { - if (this._allowUnknownOption) return; - console.error("error: unknown option `%s'", flag); - process.exit(1); -}; - -/** - * Variadic argument with `name` is not the last argument as required. - * - * @param {String} name - * @api private - */ - -Command.prototype.variadicArgNotLast = function(name) { - console.error("error: variadic arguments must be last `%s'", name); - process.exit(1); -}; - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} [flags] - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags) { - if (arguments.length === 0) return this._version; - this._version = str; - flags = flags || '-V, --version'; - var versionOption = new Option(flags, 'output the version number'); - this._versionOptionName = versionOption.long.substr(2) || 'version'; - this.options.push(versionOption); - this.on('option:' + this._versionOptionName, function() { - process.stdout.write(str + '\n'); - process.exit(0); - }); - return this; -}; - -/** - * Set the description to `str`. - * - * @param {String} str - * @param {Object} argsDescription - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str, argsDescription) { - if (arguments.length === 0) return this._description; - this._description = str; - this._argsDescription = argsDescription; - return this; -}; - -/** - * Set an alias for the command - * - * @param {String} alias - * @return {String|Command} - * @api public - */ - -Command.prototype.alias = function(alias) { - var command = this; - if (this.commands.length !== 0) { - command = this.commands[this.commands.length - 1]; - } - - if (arguments.length === 0) return command._alias; - - if (alias === command._name) throw new Error('Command alias can\'t be the same as its name'); - - command._alias = alias; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str) { - var args = this._args.map(function(arg) { - return humanReadableArgName(arg); - }); - - var usage = '[options]' + - (this.commands.length ? ' [command]' : '') + - (this._args.length ? ' ' + args.join(' ') : ''); - - if (arguments.length === 0) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Get or set the name of the command - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.name = function(str) { - if (arguments.length === 0) return this._name; - this._name = str; - return this; -}; - -/** - * Return prepared commands. - * - * @return {Array} - * @api private - */ - -Command.prototype.prepareCommands = function() { - return this.commands.filter(function(cmd) { - return !cmd._noHelp; - }).map(function(cmd) { - var args = cmd._args.map(function(arg) { - return humanReadableArgName(arg); - }).join(' '); - - return [ - cmd._name + - (cmd._alias ? '|' + cmd._alias : '') + - (cmd.options.length ? ' [options]' : '') + - (args ? ' ' + args : ''), - cmd._description - ]; - }); -}; - -/** - * Return the largest command length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestCommandLength = function() { - var commands = this.prepareCommands(); - return commands.reduce(function(max, command) { - return Math.max(max, command[0].length); - }, 0); -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function() { - var options = [].slice.call(this.options); - options.push({ - flags: '-h, --help' - }); - return options.reduce(function(max, option) { - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return the largest arg length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestArgLength = function() { - return this._args.reduce(function(max, arg) { - return Math.max(max, arg.name.length); - }, 0); -}; - -/** - * Return the pad width. - * - * @return {Number} - * @api private - */ - -Command.prototype.padWidth = function() { - var width = this.largestOptionLength(); - if (this._argsDescription && this._args.length) { - if (this.largestArgLength() > width) { - width = this.largestArgLength(); - } - } - - if (this.commands && this.commands.length) { - if (this.largestCommandLength() > width) { - width = this.largestCommandLength(); - } - } - - return width; -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function() { - var width = this.padWidth(); - - // Append the help information - return this.options.map(function(option) { - return pad(option.flags, width) + ' ' + option.description + - ((option.bool && option.defaultValue !== undefined) ? ' (default: ' + JSON.stringify(option.defaultValue) + ')' : ''); - }).concat([pad('-h, --help', width) + ' ' + 'output usage information']) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function() { - if (!this.commands.length) return ''; - - var commands = this.prepareCommands(); - var width = this.padWidth(); - - return [ - 'Commands:', - commands.map(function(cmd) { - var desc = cmd[1] ? ' ' + cmd[1] : ''; - return (desc ? pad(cmd[0], width) : cmd[0]) + desc; - }).join('\n').replace(/^/gm, ' '), - '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function() { - var desc = []; - if (this._description) { - desc = [ - this._description, - '' - ]; - - var argsDescription = this._argsDescription; - if (argsDescription && this._args.length) { - var width = this.padWidth(); - desc.push('Arguments:'); - desc.push(''); - this._args.forEach(function(arg) { - desc.push(' ' + pad(arg.name, width) + ' ' + argsDescription[arg.name]); - }); - desc.push(''); - } - } - - var cmdName = this._name; - if (this._alias) { - cmdName = cmdName + '|' + this._alias; - } - var usage = [ - 'Usage: ' + cmdName + ' ' + this.usage(), - '' - ]; - - var cmds = []; - var commandHelp = this.commandHelp(); - if (commandHelp) cmds = [commandHelp]; - - var options = [ - 'Options:', - '' + this.optionHelp().replace(/^/gm, ' '), - '' - ]; - - return usage - .concat(desc) - .concat(options) - .concat(cmds) - .join('\n'); -}; - -/** - * Output help information for this command - * - * @api public - */ - -Command.prototype.outputHelp = function(cb) { - if (!cb) { - cb = function(passthru) { - return passthru; - }; - } - process.stdout.write(cb(this.helpInformation())); - this.emit('--help'); -}; - -/** - * Output help information and exit. - * - * @api public - */ - -Command.prototype.help = function(cb) { - this.outputHelp(cb); - process.exit(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word) { - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] === '--help' || options[i] === '-h') { - cmd.outputHelp(); - process.exit(0); - } - } -} - -/** - * Takes an argument an returns its human readable equivalent for help usage. - * - * @param {Object} arg - * @return {String} - * @api private - */ - -function humanReadableArgName(arg) { - var nameOutput = arg.name + (arg.variadic === true ? '...' : ''); - - return arg.required - ? '<' + nameOutput + '>' - : '[' + nameOutput + ']'; -} - -// for versions before node v0.8 when there weren't `fs.existsSync` -function exists(file) { - try { - if (fs.statSync(file).isFile()) { - return true; - } - } catch (e) { - return false; - } -} diff --git a/node_modules/github-linguist/node_modules/commander/package.json b/node_modules/github-linguist/node_modules/commander/package.json deleted file mode 100644 index 0023c5cdf5..0000000000 --- a/node_modules/github-linguist/node_modules/commander/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "commander", - "version": "2.20.3", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "commander", - "command", - "option", - "parser" - ], - "author": "TJ Holowaychuk ", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/tj/commander.js.git" - }, - "scripts": { - "lint": "eslint index.js", - "test": "node test/run.js && npm run test-typings", - "test-typings": "tsc -p tsconfig.json" - }, - "main": "index", - "files": [ - "index.js", - "typings/index.d.ts" - ], - "dependencies": {}, - "devDependencies": { - "@types/node": "^12.7.8", - "eslint": "^6.4.0", - "should": "^13.2.3", - "sinon": "^7.5.0", - "standard": "^14.3.1", - "ts-node": "^8.4.1", - "typescript": "^3.6.3" - }, - "typings": "typings/index.d.ts" -} diff --git a/node_modules/github-linguist/node_modules/commander/typings/index.d.ts b/node_modules/github-linguist/node_modules/commander/typings/index.d.ts deleted file mode 100644 index bcda2771ef..0000000000 --- a/node_modules/github-linguist/node_modules/commander/typings/index.d.ts +++ /dev/null @@ -1,310 +0,0 @@ -// Type definitions for commander 2.11 -// Project: https://github.com/visionmedia/commander.js -// Definitions by: Alan Agius , Marcelo Dezem , vvakame , Jules Randolph -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare namespace local { - - class Option { - flags: string; - required: boolean; - optional: boolean; - bool: boolean; - short?: string; - long: string; - description: string; - - /** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {string} flags - * @param {string} [description] - */ - constructor(flags: string, description?: string); - } - - class Command extends NodeJS.EventEmitter { - [key: string]: any; - - args: string[]; - - /** - * Initialize a new `Command`. - * - * @param {string} [name] - */ - constructor(name?: string); - - /** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {string} str - * @param {string} [flags] - * @returns {Command} for chaining - */ - version(str: string, flags?: string): Command; - - /** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * @example - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function() { - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd) { - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('teardown [otherDirs...]') - * .description('run teardown commands') - * .action(function(dir, otherDirs) { - * console.log('dir "%s"', dir); - * if (otherDirs) { - * otherDirs.forEach(function (oDir) { - * console.log('dir "%s"', oDir); - * }); - * } - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env) { - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {string} name - * @param {string} [desc] for git-style sub-commands - * @param {CommandOptions} [opts] command options - * @returns {Command} the new command - */ - command(name: string, desc?: string, opts?: commander.CommandOptions): Command; - - /** - * Define argument syntax for the top-level command. - * - * @param {string} desc - * @returns {Command} for chaining - */ - arguments(desc: string): Command; - - /** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {string[]} args - * @returns {Command} for chaining - */ - parseExpectedArgs(args: string[]): Command; - - /** - * Register callback `fn` for the command. - * - * @example - * program - * .command('help') - * .description('display verbose help') - * .action(function() { - * // output help here - * }); - * - * @param {(...args: any[]) => void} fn - * @returns {Command} for chaining - */ - action(fn: (...args: any[]) => void): Command; - - /** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * @example - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to true - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => false - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {string} flags - * @param {string} [description] - * @param {((arg1: any, arg2: any) => void) | RegExp} [fn] function or default - * @param {*} [defaultValue] - * @returns {Command} for chaining - */ - option(flags: string, description?: string, fn?: ((arg1: any, arg2: any) => void) | RegExp, defaultValue?: any): Command; - option(flags: string, description?: string, defaultValue?: any): Command; - - /** - * Allow unknown options on the command line. - * - * @param {boolean} [arg] if `true` or omitted, no error will be thrown for unknown options. - * @returns {Command} for chaining - */ - allowUnknownOption(arg?: boolean): Command; - - /** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {string[]} argv - * @returns {Command} for chaining - */ - parse(argv: string[]): Command; - - /** - * Parse options from `argv` returning `argv` void of these options. - * - * @param {string[]} argv - * @returns {ParseOptionsResult} - */ - parseOptions(argv: string[]): commander.ParseOptionsResult; - - /** - * Return an object containing options as key-value pairs - * - * @returns {{[key: string]: any}} - */ - opts(): { [key: string]: any }; - - /** - * Set the description to `str`. - * - * @param {string} str - * @param {{[argName: string]: string}} argsDescription - * @return {(Command | string)} - */ - description(str: string, argsDescription?: {[argName: string]: string}): Command; - description(): string; - - /** - * Set an alias for the command. - * - * @param {string} alias - * @return {(Command | string)} - */ - alias(alias: string): Command; - alias(): string; - - /** - * Set or get the command usage. - * - * @param {string} str - * @return {(Command | string)} - */ - usage(str: string): Command; - usage(): string; - - /** - * Set the name of the command. - * - * @param {string} str - * @return {Command} - */ - name(str: string): Command; - - /** - * Get the name of the command. - * - * @return {string} - */ - name(): string; - - /** - * Output help information for this command. - * - * @param {(str: string) => string} [cb] - */ - outputHelp(cb?: (str: string) => string): void; - - /** Output help information and exit. - * - * @param {(str: string) => string} [cb] - */ - help(cb?: (str: string) => string): never; - } - -} - -declare namespace commander { - - type Command = local.Command - - type Option = local.Option - - interface CommandOptions { - noHelp?: boolean; - isDefault?: boolean; - } - - interface ParseOptionsResult { - args: string[]; - unknown: string[]; - } - - interface CommanderStatic extends Command { - Command: typeof local.Command; - Option: typeof local.Option; - CommandOptions: CommandOptions; - ParseOptionsResult: ParseOptionsResult; - } - -} - -declare const commander: commander.CommanderStatic; -export = commander; diff --git a/node_modules/github-linguist/node_modules/glob/LICENSE b/node_modules/github-linguist/node_modules/glob/LICENSE deleted file mode 100644 index 42ca266df1..0000000000 --- a/node_modules/github-linguist/node_modules/glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -## Glob Logo - -Glob's logo created by Tanya Brassie , licensed -under a Creative Commons Attribution-ShareAlike 4.0 International License -https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/node_modules/github-linguist/node_modules/glob/README.md b/node_modules/github-linguist/node_modules/glob/README.md deleted file mode 100644 index 83f0c83a0c..0000000000 --- a/node_modules/github-linguist/node_modules/glob/README.md +++ /dev/null @@ -1,378 +0,0 @@ -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -![a fun cartoon logo made of glob characters](logo/glob.png) - -## Usage - -Install with npm - -``` -npm i glob -``` - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Glob Primer - -"Globs" are the patterns you type when you do stuff like `ls *.js` on -the command line, or put `build/*` in a `.gitignore` file. - -Before parsing the path part patterns, braced sections are expanded -into a set. Braced sections start with `{` and end with `}`, with any -number of comma-delimited sections within. Braced sections may contain -slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in a -path portion: - -* `*` Matches 0 or more characters in a single path portion -* `?` Matches 1 character -* `[...]` Matches a range of characters, similar to a RegExp range. - If the first character of the range is `!` or `^` then it matches - any character not in the range. -* `!(pattern|pattern|pattern)` Matches anything that does not match - any of the patterns provided. -* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the - patterns provided. -* `+(pattern|pattern|pattern)` Matches one or more occurrences of the - patterns provided. -* `*(a|b|c)` Matches zero or more occurrences of the patterns provided -* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided -* `**` If a "globstar" is alone in a path portion, then it matches - zero or more directories and subdirectories searching for matches. - It does not crawl symlinked directories. - -### Dots - -If a file or directory path portion has a `.` as the first character, -then it will not match any glob pattern unless that pattern's -corresponding path part also has a `.` as its first character. - -For example, the pattern `a/.*/c` would match the file at `a/.b/c`. -However the pattern `a/*/c` would not, because `*` does not start with -a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has no -slashes in it, then it will seek for any file anywhere in the tree -with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Empty Sets - -If no matching files are found, then an empty array is returned. This -differs from the shell, where the pattern itself is returned. For -example: - - $ echo a*s*d*f - a*s*d*f - -To get the bash-style behavior, set the `nonull:true` in the options. - -### See Also: - -* `man sh` -* `man bash` (Search for "Pattern Matching") -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob.hasMagic(pattern, [options]) - -Returns `true` if there are any special characters in the pattern, and -`false` otherwise. - -Note that the options affect the results. If `noext:true` is set in -the options object, then `+(a|b)` will not be considered a magic -pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` -then that is considered magical, unless `nobrace:true` is set in the -options. - -## glob(pattern, [options], cb) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* `cb` `{Function}` - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* return: `{Array}` filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` `{String}` pattern to search for -* `options` `{Object}` -* `cb` `{Function}` Called when an error occurs, or matches are found - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'FILE'` - Path exists, and is not a directory - * `'DIR'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the specific - thing that matched. It is not deduplicated or resolved to a realpath. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of glob patterns to exclude matches. - Note: `ignore` patterns are *always* in `dot:true` mode, regardless - of any other settings. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) -* `absolute` Set to true to always receive absolute paths for matched - files. Unlike `realpath`, this also affects the values returned in - the `match` event. -* `fs` File-system object with Node's `fs` API. By default, the built-in - `fs` module will be used. Set to a volume provided by a library like - `memfs` to avoid using the "real" file-system. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -### Comments and Negation - -Previously, this module let you mark a pattern as a "comment" if it -started with a `#` character, or a "negated" pattern if it started -with a `!` character. - -These options were deprecated in version 5, and removed in version 6. - -To specify things that should not match, use the `ignore` option. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Glob Logo -Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo). - -The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/). - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` - -![](oh-my-glob.gif) diff --git a/node_modules/github-linguist/node_modules/glob/common.js b/node_modules/github-linguist/node_modules/glob/common.js deleted file mode 100644 index 8e363b6c1f..0000000000 --- a/node_modules/github-linguist/node_modules/glob/common.js +++ /dev/null @@ -1,236 +0,0 @@ -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var fs = require("fs") -var path = require("path") -var minimatch = require("minimatch") -var isAbsolute = require("path-is-absolute") -var Minimatch = minimatch.Minimatch - -function alphasort (a, b) { - return a.localeCompare(b, 'en') -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - self.absolute = !!options.absolute - self.fs = options.fs || fs - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = path.resolve(options.cwd) - self.changedCwd = self.cwd !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - // TODO: is an absolute `cwd` supposed to be resolved against `root`? - // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - var notDir = !(/\/$/.test(e)) - var c = self.cache[e] || self.cache[makeAbs(self, e)] - if (notDir && c) - notDir = c !== 'DIR' && !Array.isArray(c) - return notDir - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - - if (process.platform === 'win32') - abs = abs.replace(/\\/g, '/') - - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} diff --git a/node_modules/github-linguist/node_modules/glob/glob.js b/node_modules/github-linguist/node_modules/glob/glob.js deleted file mode 100644 index afcf82752c..0000000000 --- a/node_modules/github-linguist/node_modules/glob/glob.js +++ /dev/null @@ -1,787 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var inherits = require('inherits') -var EE = require('events').EventEmitter -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var globSync = require('./sync.js') -var common = require('./common.js') -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = require('inflight') -var util = require('util') -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = require('once') - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -function extend (origin, add) { - if (add === null || typeof add !== 'object') { - return origin - } - - var keys = Object.keys(add) - var i = keys.length - while (i--) { - origin[keys[i]] = add[keys[i]] - } - return origin -} - -glob.hasMagic = function (pattern, options_) { - var options = extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - - if (!pattern) - return false - - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - this._processing = 0 - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - var sync = true - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - sync = false - - function done () { - --self._processing - if (self._processing <= 0) { - if (sync) { - process.nextTick(function () { - self._finish() - }) - } else { - self._finish() - } - } - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - rp.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = isAbsolute(e) ? e : this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) - e = abs - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - self.fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er && er.code === 'ENOENT') - return cb() - - var isSym = lstat && lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - self.fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - this.emit('error', error) - this.abort() - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - self.fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return self.fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) - return cb(null, false, stat) - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return cb() - - return cb(null, c, stat) -} diff --git a/node_modules/github-linguist/node_modules/glob/package.json b/node_modules/github-linguist/node_modules/glob/package.json deleted file mode 100644 index cc1a57a896..0000000000 --- a/node_modules/github-linguist/node_modules/glob/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "name": "glob", - "description": "a little globber", - "version": "7.2.0", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "main": "glob.js", - "files": [ - "glob.js", - "sync.js", - "common.js" - ], - "engines": { - "node": "*" - }, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "devDependencies": { - "memfs": "^3.2.0", - "mkdirp": "0", - "rimraf": "^2.2.8", - "tap": "^15.0.6", - "tick": "0.0.6" - }, - "tap": { - "before": "test/00-setup.js", - "after": "test/zz-cleanup.js", - "jobs": 1 - }, - "scripts": { - "prepublish": "npm run benchclean", - "profclean": "rm -f v8.log profile.txt", - "test": "tap", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", - "bench": "bash benchmark.sh", - "prof": "bash prof.sh && cat profile.txt", - "benchclean": "node benchclean.js" - }, - "license": "ISC", - "funding": { - "url": "https://github.com/sponsors/isaacs" - } -} diff --git a/node_modules/github-linguist/node_modules/glob/sync.js b/node_modules/github-linguist/node_modules/glob/sync.js deleted file mode 100644 index 4f46f90559..0000000000 --- a/node_modules/github-linguist/node_modules/glob/sync.js +++ /dev/null @@ -1,483 +0,0 @@ -module.exports = globSync -globSync.GlobSync = GlobSync - -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var Glob = require('./glob.js').Glob -var util = require('util') -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var common = require('./common.js') -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = rp.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return - - var abs = this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) { - e = abs - } - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null - } - } - - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } - } - - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} diff --git a/node_modules/github-linguist/node_modules/globby/index.js b/node_modules/github-linguist/node_modules/globby/index.js deleted file mode 100644 index 587a0fdd1c..0000000000 --- a/node_modules/github-linguist/node_modules/globby/index.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; -var Promise = require('pinkie-promise'); -var arrayUnion = require('array-union'); -var objectAssign = require('object-assign'); -var glob = require('glob'); -var pify = require('pify'); - -var globP = pify(glob, Promise).bind(glob); - -function isNegative(pattern) { - return pattern[0] === '!'; -} - -function isString(value) { - return typeof value === 'string'; -} - -function assertPatternsInput(patterns) { - if (!patterns.every(isString)) { - throw new TypeError('patterns must be a string or an array of strings'); - } -} - -function generateGlobTasks(patterns, opts) { - patterns = [].concat(patterns); - assertPatternsInput(patterns); - - var globTasks = []; - - opts = objectAssign({ - cache: Object.create(null), - statCache: Object.create(null), - realpathCache: Object.create(null), - symlinks: Object.create(null), - ignore: [] - }, opts); - - patterns.forEach(function (pattern, i) { - if (isNegative(pattern)) { - return; - } - - var ignore = patterns.slice(i).filter(isNegative).map(function (pattern) { - return pattern.slice(1); - }); - - globTasks.push({ - pattern: pattern, - opts: objectAssign({}, opts, { - ignore: opts.ignore.concat(ignore) - }) - }); - }); - - return globTasks; -} - -module.exports = function (patterns, opts) { - var globTasks; - - try { - globTasks = generateGlobTasks(patterns, opts); - } catch (err) { - return Promise.reject(err); - } - - return Promise.all(globTasks.map(function (task) { - return globP(task.pattern, task.opts); - })).then(function (paths) { - return arrayUnion.apply(null, paths); - }); -}; - -module.exports.sync = function (patterns, opts) { - var globTasks = generateGlobTasks(patterns, opts); - - return globTasks.reduce(function (matches, task) { - return arrayUnion(matches, glob.sync(task.pattern, task.opts)); - }, []); -}; - -module.exports.generateGlobTasks = generateGlobTasks; - -module.exports.hasMagic = function (patterns, opts) { - return [].concat(patterns).some(function (pattern) { - return glob.hasMagic(pattern, opts); - }); -}; diff --git a/node_modules/github-linguist/node_modules/globby/license b/node_modules/github-linguist/node_modules/globby/license deleted file mode 100644 index 654d0bfe94..0000000000 --- a/node_modules/github-linguist/node_modules/globby/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/github-linguist/node_modules/globby/package.json b/node_modules/github-linguist/node_modules/globby/package.json deleted file mode 100644 index 9251488626..0000000000 --- a/node_modules/github-linguist/node_modules/globby/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "globby", - "version": "6.1.0", - "description": "Extends `glob` with support for multiple patterns and exposes a Promise API", - "license": "MIT", - "repository": "sindresorhus/globby", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "bench": "npm update glob-stream && matcha bench.js", - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "all", - "array", - "directories", - "dirs", - "expand", - "files", - "filesystem", - "filter", - "find", - "fnmatch", - "folders", - "fs", - "glob", - "globbing", - "globs", - "gulpfriendly", - "match", - "matcher", - "minimatch", - "multi", - "multiple", - "paths", - "pattern", - "patterns", - "traverse", - "util", - "utility", - "wildcard", - "wildcards", - "promise" - ], - "dependencies": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "devDependencies": { - "ava": "*", - "glob-stream": "gulpjs/glob-stream#master", - "globby": "sindresorhus/globby#master", - "matcha": "^0.7.0", - "rimraf": "^2.2.8", - "xo": "^0.16.0" - } -} diff --git a/node_modules/github-linguist/node_modules/globby/readme.md b/node_modules/github-linguist/node_modules/globby/readme.md deleted file mode 100644 index e10a48868f..0000000000 --- a/node_modules/github-linguist/node_modules/globby/readme.md +++ /dev/null @@ -1,88 +0,0 @@ -# globby [![Build Status](https://travis-ci.org/sindresorhus/globby.svg?branch=master)](https://travis-ci.org/sindresorhus/globby) - -> Extends [glob](https://github.com/isaacs/node-glob) with support for multiple patterns and exposes a Promise API - - -## Install - -``` -$ npm install --save globby -``` - - -## Usage - -``` -├── unicorn -├── cake -└── rainbow -``` - -```js -const globby = require('globby'); - -globby(['*', '!cake']).then(paths => { - console.log(paths); - //=> ['unicorn', 'rainbow'] -}); -``` - - -## API - -### globby(patterns, [options]) - -Returns a Promise for an array of matching paths. - -### globby.sync(patterns, [options]) - -Returns an array of matching paths. - -### globby.generateGlobTasks(patterns, [options]) - -Returns an array of objects in the format `{ pattern: string, opts: Object }`, which can be passed as arguments to [`node-glob`](https://github.com/isaacs/node-glob). This is useful for other globbing-related packages. - -Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration. - -### globby.hasMagic(patterns, [options]) - -Returns a `boolean` of whether there are any special glob characters in the `patterns`. - -Note that the options affect the results. If `noext: true` is set, then `+(a|b)` will not be considered a magic pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`, then that is considered magical, unless `nobrace: true` is set. - -#### patterns - -Type: `string` `Array` - -See supported `minimatch` [patterns](https://github.com/isaacs/minimatch#usage). - -#### options - -Type: `Object` - -See the `node-glob` [options](https://github.com/isaacs/node-glob#options). - - -## Globbing patterns - -Just a quick overview. - -- `*` matches any number of characters, but not `/` -- `?` matches a single character, but not `/` -- `**` matches any number of characters, including `/`, as long as it's the only thing in a path part -- `{}` allows for a comma-separated list of "or" expressions -- `!` at the beginning of a pattern will negate the match - -[Various patterns and expected matches.](https://github.com/sindresorhus/multimatch/blob/master/test.js) - - -## Related - -- [multimatch](https://github.com/sindresorhus/multimatch) - Match against a list instead of the filesystem -- [glob-stream](https://github.com/wearefractal/glob-stream) - Streaming alternative -- [matcher](https://github.com/sindresorhus/matcher) - Simple wildcard matching - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/github-linguist/node_modules/pify/index.js b/node_modules/github-linguist/node_modules/pify/index.js deleted file mode 100644 index 7c720ebee8..0000000000 --- a/node_modules/github-linguist/node_modules/pify/index.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -var processFn = function (fn, P, opts) { - return function () { - var that = this; - var args = new Array(arguments.length); - - for (var i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - - return new P(function (resolve, reject) { - args.push(function (err, result) { - if (err) { - reject(err); - } else if (opts.multiArgs) { - var results = new Array(arguments.length - 1); - - for (var i = 1; i < arguments.length; i++) { - results[i - 1] = arguments[i]; - } - - resolve(results); - } else { - resolve(result); - } - }); - - fn.apply(that, args); - }); - }; -}; - -var pify = module.exports = function (obj, P, opts) { - if (typeof P !== 'function') { - opts = P; - P = Promise; - } - - opts = opts || {}; - opts.exclude = opts.exclude || [/.+Sync$/]; - - var filter = function (key) { - var match = function (pattern) { - return typeof pattern === 'string' ? key === pattern : pattern.test(key); - }; - - return opts.include ? opts.include.some(match) : !opts.exclude.some(match); - }; - - var ret = typeof obj === 'function' ? function () { - if (opts.excludeMain) { - return obj.apply(this, arguments); - } - - return processFn(obj, P, opts).apply(this, arguments); - } : {}; - - return Object.keys(obj).reduce(function (ret, key) { - var x = obj[key]; - - ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x; - - return ret; - }, ret); -}; - -pify.all = pify; diff --git a/node_modules/github-linguist/node_modules/pify/license b/node_modules/github-linguist/node_modules/pify/license deleted file mode 100644 index 654d0bfe94..0000000000 --- a/node_modules/github-linguist/node_modules/pify/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/github-linguist/node_modules/pify/package.json b/node_modules/github-linguist/node_modules/pify/package.json deleted file mode 100644 index 311d1982e0..0000000000 --- a/node_modules/github-linguist/node_modules/pify/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "pify", - "version": "2.3.0", - "description": "Promisify a callback-style function", - "license": "MIT", - "repository": "sindresorhus/pify", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava && npm run optimization-test", - "optimization-test": "node --allow-natives-syntax optimization-test.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "promises", - "promisify", - "denodify", - "denodeify", - "callback", - "cb", - "node", - "then", - "thenify", - "convert", - "transform", - "wrap", - "wrapper", - "bind", - "to", - "async", - "es2015" - ], - "devDependencies": { - "ava": "*", - "pinkie-promise": "^1.0.0", - "v8-natives": "0.0.2", - "xo": "*" - } -} diff --git a/node_modules/github-linguist/node_modules/pify/readme.md b/node_modules/github-linguist/node_modules/pify/readme.md deleted file mode 100644 index c79ca8bf64..0000000000 --- a/node_modules/github-linguist/node_modules/pify/readme.md +++ /dev/null @@ -1,119 +0,0 @@ -# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify) - -> Promisify a callback-style function - - -## Install - -``` -$ npm install --save pify -``` - - -## Usage - -```js -const fs = require('fs'); -const pify = require('pify'); - -// promisify a single function - -pify(fs.readFile)('package.json', 'utf8').then(data => { - console.log(JSON.parse(data).name); - //=> 'pify' -}); - -// or promisify all methods in a module - -pify(fs).readFile('package.json', 'utf8').then(data => { - console.log(JSON.parse(data).name); - //=> 'pify' -}); -``` - - -## API - -### pify(input, [promiseModule], [options]) - -Returns a promise wrapped version of the supplied function or module. - -#### input - -Type: `function`, `object` - -Callback-style function or module whose methods you want to promisify. - -#### promiseModule - -Type: `function` - -Custom promise module to use instead of the native one. - -Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill. - -#### options - -##### multiArgs - -Type: `boolean` -Default: `false` - -By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. - -```js -const request = require('request'); -const pify = require('pify'); - -pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => { - const [httpResponse, body] = result; -}); -``` - -##### include - -Type: `array` of (`string`|`regex`) - -Methods in a module to promisify. Remaining methods will be left untouched. - -##### exclude - -Type: `array` of (`string`|`regex`) -Default: `[/.+Sync$/]` - -Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default. - -##### excludeMain - -Type: `boolean` -Default: `false` - -By default, if given module is a function itself, this function will be promisified. Turn this option on if you want to promisify only methods of the module. - -```js -const pify = require('pify'); - -function fn() { - return true; -} - -fn.method = (data, callback) => { - setImmediate(() => { - callback(data, null); - }); -}; - -// promisify methods but not fn() -const promiseFn = pify(fn, {excludeMain: true}); - -if (promiseFn()) { - promiseFn.method('hi').then(data => { - console.log(data); - }); -} -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/github-linguist/package.json b/node_modules/github-linguist/package.json deleted file mode 100644 index e184645f87..0000000000 --- a/node_modules/github-linguist/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "github-linguist", - "version": "2.4.4", - "description": "A tool to count lines of code in a repository powered by github-linguist langauge mappings.", - "keywords": [ - "loc", - "cloc", - "linguist", - "lines of code" - ], - "homepage": "https://github.com/aeisenberg/linguist#readme", - "bugs": { - "url": "https://github.com/aeisenberg/linguist/issues" - }, - "bin": { - "loc": "dist/cli.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/aeisenberg/linguist.git" - }, - "license": "MIT", - "authors": [ - "ephoton (https://github.com/ephoton)", - "chenshuai2144 (https://github.com/chenshuai2144)", - "Andrew Eisenberg (https://github.com/aeisenberg)" - ], - "main": "dist/index.js", - "typings": "dist/index.d.ts", - "directories": { - "test": "test" - }, - "scripts": { - "build": "tsc -d", - "lint": "eslint --cache --ext .ts ./src", - "prettier": "prettier -c --write \"**/*\"", - "prepublishOnly": "npm run build", - "test": "jest" - }, - "dependencies": { - "chalk": "^2.2.0", - "commander": "^2.11.0", - "fs-extra": "^4.0.3", - "globby": "^6.1.0", - "language-map": "^1.3.0", - "slash2": "^2.0.0" - }, - "devDependencies": { - "@types/chai": "^4.0.4", - "@types/chalk": "^0.4.31", - "@types/commander": "^2.11.0", - "@types/fs-extra": "^4.0.2", - "@types/globby": "^6.1.0", - "@types/jest": "^27.0.1", - "@types/mocha": "^2.2.43", - "@types/node": "^8.0.45", - "@typescript-eslint/eslint-plugin": "^4.29.3", - "@typescript-eslint/parser": "^4.29.3", - "chai": "^4.1.2", - "coveralls": "^3.0.0", - "eslint": "^7.32.0", - "eslint-config-airbnb-base": "^14.2.1", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.24.1", - "eslint-plugin-prettier": "^3.4.1", - "jest": "^27.0.6", - "prettier": "^2.3.2", - "ts-jest": "^27.0.5", - "ts-node": "^10.2.1", - "typescript": "^3.9.10" - } -} diff --git a/node_modules/github-linguist/src/cli.ts b/node_modules/github-linguist/src/cli.ts deleted file mode 100644 index b900b61d63..0000000000 --- a/node_modules/github-linguist/src/cli.ts +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env node - -import chalk from 'chalk'; -import program from 'commander'; - -import { LocDir } from './directory'; -import { LocFile, LineInfo } from './file'; -import { getVersion } from './utils'; - -program - .version(getVersion(), '-v') - .command('file ') - .description('count lines of code in a file') - .action(async (pathPattern) => { - try { - const info = await new LocFile(pathPattern).getFileInfo(); - // eslint-disable-next-line no-console - console.log( - chalk.cyan(` - path: \t\t${pathPattern} - language: \t${info.languages} - total lines: \t${String(info.lines.total)} - code lines: \t${String(info.lines.code)} - comment lines: \t${String(info.lines.comment)} - `), - ); - } catch (e) { - console.error(e); - console.error(e.stacl); - } - }); - -const formatInfo = ( - info: LineInfo, - languages: { - [key: string]: LineInfo & { - sum: number; - }; - }, -) => ` - \ttotal lines: \t${String(info.total)} - \tcode lines: \t${String(info.code)} - \tcomment lines: \t${String(info.comment)} - \t--------------------${Object.keys(languages) - .map((key) => { - const languageInfo = languages[key]; - return `\n\t${key.padEnd(10)} \t file count:${String(languageInfo.sum)} \ttotal:${String( - languageInfo.total, - )} \tcomment:${String(languageInfo.comment)} \tcode:${String(languageInfo.code)}`; - }) - .join('')}`; - -program.arguments(' [env]').action(async (cmd) => { - try { - const { info, languages } = await new LocDir({ - include: cmd, - }).loadInfo(); - // eslint-disable-next-line no-console - console.log(chalk.cyan(formatInfo(info, languages))); - } catch (e) { - console.error(e); - console.error(e.stacl); - } -}); - -program.parse(process.argv); diff --git a/node_modules/github-linguist/src/declarations.d.ts b/node_modules/github-linguist/src/declarations.d.ts deleted file mode 100644 index 8638a7a149..0000000000 --- a/node_modules/github-linguist/src/declarations.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare module 'slash2'; -declare module 'language-map/languages.json'; diff --git a/node_modules/github-linguist/src/directory.ts b/node_modules/github-linguist/src/directory.ts deleted file mode 100644 index 914d859f32..0000000000 --- a/node_modules/github-linguist/src/directory.ts +++ /dev/null @@ -1,227 +0,0 @@ -import globby from 'globby'; -import fs from 'fs-extra'; -import path from 'path'; -import slash from 'slash2'; - -import { LineInfo, LocFile } from './file'; -import { Languages } from './languages'; - -const defaultInfo: LineInfo = { - total: 0, - code: 0, - comment: 0, -}; - -export interface LocDirOptions { - cwd?: string; - include?: string[] | string; - exclude?: string[] | string; - analysisLanguages?: string[]; -} - -export interface LocResult { - files: string[]; - info: LineInfo; - languages: { - [key: string]: LineInfo & { - sum: number; - }; - }; -} - -const defaultExclude = [ - // javascript - '**/*.map', - '**/yarn**', - '**/.github', - '**/node_modules/**', - '**/dist/**', - '**/*.snap', - - // java - '**/target', - '**/*.class', - '**/*.o', - '**/bin', - '**/*.map', - - // python - '**/*.pyc', - '**/*.pyo', - - // other - '**/*.dil', - '**/*.ra', - - // images - '**/*.png', - '**/*.jpg', - '**/*.jpeg', - '**/*.gif', - '**/*.ico', - '**/*.bmp', - '**/*.webp', - '**/*.tiff', - '**/*.psd', - '**/*.ai', - '**/*.ps', - '**/*.eps', - - // fonts - '**/*.ttf', - '**/*.otf', - '**/*.woff', - '**/*.woff2', - '**/*.eot', - '**/*.ttc', - - // audio - '**/*.mp3', - '**/*.wav', - '**/*.ogg', - '**/*.flac', - '**/*.aac', - '**/*.m4a', - '**/*.aif*', - - // video - '**/*.mp4', - '**/*.mkv', - '**/*.avi', - '**/*.mov', - '**/*.wmv', - '**/*.mpg', - '**/*.mpeg', - '**/*.m2v', - '**/*.m4v', - - // office - '**/*.doc', - '**/*.docx', - '**/*.docm', - '**/*.dot', - '**/*.dotx', - '**/*.xls', - '**/*.xlsx', - - // documents - '**/*.pdf', - '**/*.epub', - '**/*.mobi', - - // archives - '**/*.rar', - '**/*.zip', - '**/*.7z', - '**/*.tar', - '**/*.gz', - '**/*.bz2', - '**/*.bz', - '**/*.tbz', - '**/*.tgz', -]; - -function ensureArray(arr?: string[] | string, dfault?: string) { - if (!arr) { - return dfault ? [dfault] : []; - } - return Array.isArray(arr) ? arr : [arr]; -} - -/** - * Collect the info of a directory. - */ -export class LocDir { - private cwd: string; - - private include: string[]; - - private exclude: string[]; - - private analysisLanguages?: string[]; - - private allLanguages = new Languages(); - - constructor(options: LocDirOptions) { - // ensure all excludes are globstar. Note that '**/*.ts/**' matches files - // that end in .ts because the globstar indicates 0 or more directory paths. - this.exclude = ensureArray(options.exclude) - .concat(defaultExclude) - .map((item) => (item.endsWith('**') ? item : `${item}/**`)); - - // remove all leading './' since this messes up globstar matches in the - // excludes. - this.include = ensureArray(options.include, '**') - .map((item) => (item.startsWith('./') ? item.substring(2) : item)) - .map((item) => (item.endsWith('**') ? item : `${item}/**`)); - this.cwd = options.cwd || process.cwd(); - this.analysisLanguages = options.analysisLanguages; - } - - /** - * Calculate directory info. - */ - async loadInfo(): Promise { - const paths = await globby(this.include, { - cwd: this.cwd, - ignore: this.exclude, - nodir: true, - }); - const files: string[] = []; - const info: LineInfo = { ...defaultInfo }; - let languages: { - [key: string]: LineInfo & { - sum: number; - }; - } = {}; - - // We _could_ use Promise.all to count the files in parallel, but that - // would lead to out of memory errors when there are many files. - // eslint-disable-next-line no-restricted-syntax - for (const pathItem of paths) { - const fullPath = slash(path.join(this.cwd, pathItem)); - if ( - !pathItem || - this.ignoreLanguage(pathItem) || - !(await fs.pathExists(fullPath)) || - (await fs.stat(fullPath)).isDirectory() - ) { - continue; - } - - const file = new LocFile(fullPath); - const fileLineInfo = await file.getFileInfo(); - const { lines } = fileLineInfo; - info.total += lines.total; - info.code += lines.code; - info.comment += lines.comment; - const language = { ...languages[fileLineInfo.languages] }; - language.code = lines.code + (language.code || 0); - language.sum = (language.sum || 0) + 1; - language.comment = lines.comment + (language.comment || 0); - language.total = lines.total + (language.total || 0); - languages = { - ...languages, - [fileLineInfo.languages]: language, - }; - files.push(fullPath); - } - - return { - files, - info, - languages, - }; - } - - /** - * Ignore analyzing this file if analysis languages are specified - * and this language is not one of them. - */ - private ignoreLanguage(pathItem: string): boolean { - return ( - this.analysisLanguages && - !this.analysisLanguages.includes(this.allLanguages.getType(pathItem)) - ); - } -} diff --git a/node_modules/github-linguist/src/file.ts b/node_modules/github-linguist/src/file.ts deleted file mode 100644 index 3693cbece2..0000000000 --- a/node_modules/github-linguist/src/file.ts +++ /dev/null @@ -1,166 +0,0 @@ -/** - * detect file info - */ - -import * as fs from 'fs-extra'; -import slash from 'slash2'; - -import { Languages, Regexes } from './languages'; - -export interface LineInfo { - total: number; - code: number; - comment: number; -} - -export interface FileInfo { - name: string; - languages: string; - size: number; - lines: LineInfo; -} - -const DefaultLine: LineInfo = { - total: 0, - code: 0, - comment: 0, -}; - -const DefaultFileInfo: FileInfo = { - name: '', - languages: '', - size: 0, - lines: DefaultLine, -}; - -/** - * Collect language info for a single file - */ -export class LocFile { - public path: string; - - private rawPath: string; - - private languages = new Languages(); - - /** - * Creates an instance of LocFile. - */ - constructor(rawPath: string, private debug = false) { - this.path = slash(rawPath); - this.rawPath = rawPath; - } - - private filterData = (data: string, regexes: Regexes): LineInfo => { - const lines = data.split(/\n/); - let commentLength = 0; - let codeLength = lines.length; - const total = codeLength; - - let inMultiLineComment = false; - lines.forEach((origLine) => { - let lineType = 'code'; - const line = origLine.trim(); - - if (inMultiLineComment) { - let noCode = true; - if (regexes.multiLineCommentClose?.test(line)) { - // line contains the end of a multi-line comment - inMultiLineComment = false; - if (!regexes.multiLineCommentCloseEnd?.test(line)) { - // the multiline comment does not end this line. - // there is real code on it. - noCode = false; - } - } - - if (noCode) { - lineType = 'comm'; - commentLength += 1; - codeLength -= 1; - } - } else if (line) { - // non-empty line - if (regexes.multiLineCommentOpen?.test(line)) { - // line contains the start of a multi-line comment - // might contain some real code, but we'll let that slide - - if (!regexes.multiLineCommentOpenAndClose?.test(line)) { - // comment is not also closed on this line - inMultiLineComment = true; - } - - if (regexes.multiLineCommentOpenStart?.test(line)) { - // The comment starts the line. There is no other code on this line - commentLength += 1; - codeLength -= 1; - lineType = 'comm'; - } - } else if (regexes.singleLineComment?.test(line)) { - // line contains only a single line comment - commentLength += 1; - codeLength -= 1; - lineType = 'comm'; - } - } else { - // empty line - codeLength -= 1; - lineType = 'empt'; - } - - if (this.debug) { - console.log(lineType, line); - } - }); - - return { - ...DefaultLine, - total, - code: codeLength, - comment: commentLength, - }; - }; - - /** - * Get file info when LocFile init - */ - public async getFileInfo(data?: string): Promise { - if (!(await fs.pathExists(this.rawPath))) { - throw new Error(`Error: file ${this.rawPath} does not exist.`); - } - - let newData = data; - const info: FileInfo = { ...DefaultFileInfo }; - // note: do not use Path.sep here since we have already - // translated the path to a posix path using slash(...). - const name = this.path.split('/').pop() || ''; - try { - const stat = await fs.stat(this.path); - if (!stat.isFile()) { - return info; - } - newData = data || (await fs.readFile(this.path, 'utf-8')); - info.name = name; - info.size = (stat && stat.size) || 0; - info.languages = this.languages.getType(this.path); - if (!info.languages) { - return info; - } - if (newData) { - const regexes = this.languages.getRegexes(info.languages); - info.lines = this.filterData(newData, regexes); - } - } catch (err) { - throw new Error('read file failed.'); - } - return info; - } - - public getFileInfoByContent(name: string, data: string): FileInfo { - const info: FileInfo = { ...DefaultFileInfo }; - info.name = name; - info.languages = this.languages.getType(name); - info.lines = this.filterData(data, this.languages.getRegexes(info.languages)); - return info; - } -} diff --git a/node_modules/github-linguist/src/index.ts b/node_modules/github-linguist/src/index.ts deleted file mode 100644 index a346e068a1..0000000000 --- a/node_modules/github-linguist/src/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -import slash from 'slash2'; -import fs from 'fs-extra'; - -import { LocDir, LocResult } from './directory'; -import { LocFile } from './file'; - -export { LocDir, LocDirOptions } from './directory'; -export { LocFile, LineInfo } from './file'; - -const loc = async (fileOrDir: string): Promise => { - const stat = await fs.stat(slash(fileOrDir)); - if (stat.isFile()) { - const locFile = new LocFile(slash(fileOrDir)); - const info = await locFile.getFileInfo(); - const filePath = locFile.path; - return { - info: info.lines, - files: [filePath], - languages: { [info.languages]: { ...info.lines, sum: 1 } }, - }; - } - const locDir = new LocDir({ cwd: slash(fileOrDir) }); - return locDir.loadInfo(); -}; - -export default loc; diff --git a/node_modules/github-linguist/src/justify.json b/node_modules/github-linguist/src/justify.json deleted file mode 100644 index 12f5e47d04..0000000000 --- a/node_modules/github-linguist/src/justify.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - ".ts": "typescript", - ".tsx": "tsx" -} diff --git a/node_modules/github-linguist/src/languages.ts b/node_modules/github-linguist/src/languages.ts deleted file mode 100644 index 2ac74da1d3..0000000000 --- a/node_modules/github-linguist/src/languages.ts +++ /dev/null @@ -1,216 +0,0 @@ -import languageMap from 'language-map/languages.json'; -import { ExtensionJustify } from './utils'; - -interface ExtensionsTypes { - [key: string]: string; -} - -/** - * The extension map can contain multiple languages with the same extension, - * but we only want a single one. For the moment, these clashes are resolved - * by the simple heuristic below listing high-priority languages. We may want - * to consider smarter heuristics to correctly identify languages in cases - * where the extension is ambiguous. The ordering of the list matters and - * languages earlier on will get a higher priority when resolving clashes. - */ -const importantLanguages = [ - 'javascript', - 'typescript', - 'ruby', - 'python', - 'java', - 'c', - 'c++', - 'c#', - 'rust', - 'scala', - 'perl', - 'go', -]; - -export interface Regexes { - singleLineComment: RegExp; - multiLineCommentOpen?: RegExp; - multiLineCommentOpenStart?: RegExp; - multiLineCommentClose?: RegExp; - multiLineCommentCloseEnd?: RegExp; - multiLineCommentOpenAndClose?: RegExp; -} - -const ALL_REGEXES: Record = { - c: { - // matches when // are the first two characters of a line - singleLineComment: /^\/\//, - - // matches when /* exists in a line - multiLineCommentOpen: /\/\*/, - - // matches when /* starts a line - multiLineCommentOpenStart: /^\/\*/, - - // matches when */ exists a line - multiLineCommentClose: /\*\//, - - // matches when */ ends a line - multiLineCommentCloseEnd: /\*\/$/, - - // matches /* ... */ - multiLineCommentOpenAndClose: /\/\*.*\*\//, - }, - - python: { - // matches when # the first character of a line - singleLineComment: /^#/, - - // matches when """ starts a line. This is not right, since - // a multiline string is not always a comment, but for the - // sake of simplicity, we will do that here. - // multiLineCommentOpen: /"""/, - - // matches when """ starts a line - // multiLineCommentOpenStart: /^"""/, - - // matches when """ exists in a line - // multiLineCommentClose: /"""/, - - // matches when """ ends a line - // multiLineCommentCloseEnd: /"""$/, - - // matches """ ... """ - // multiLineCommentOpenAndClose: /""".*"""/, - }, - - ruby: { - // matches when # the first character of a line - singleLineComment: /^#/, - - // For ruby multiline comments, =begin and =end must be - // on their own lines - - // matches when =begin starts a line - multiLineCommentOpen: /^=begin/, - - // matches when "begin starts a line - multiLineCommentOpenStart: /^=begin/, - - // matches when "end ends a line - multiLineCommentClose: /^=end/, - - // matches when "end ends a line - multiLineCommentCloseEnd: /^=end$/, - - // not possible in ruby - multiLineCommentOpenAndClose: /^\0$/, - }, - - html: { - // There is no single line comment - singleLineComment: /^\0$/, - - // matches when =begin starts a line - multiLineCommentOpen: //, - - // matches when "end ends a line - multiLineCommentCloseEnd: /-->$/, - - // matches - multiLineCommentOpenAndClose: //, - }, -}; - -/** - * detecte program language through file extension - * - * @export - * @class LanguageDetector - */ -export class Languages { - extensionMap: { - [key: string]: string; - } = {}; - - /** - * Creates an instance of Detector. - */ - constructor() { - this.extensionMap = this.loadExtensionMap(); - } - - /** - * load language before detecting - */ - private loadExtensionMap = () => { - const extensions: ExtensionsTypes = {}; - - Object.keys(languageMap).forEach((language) => { - const languageMode = languageMap[language]; - const languageExtensions = (languageMode && languageMode.extensions) || []; - languageExtensions.forEach((extension: string) => { - const lowerCaseExtension = extension.toLowerCase(); - const lowerCaseLanguage = language.toLowerCase(); - if (!extensions[lowerCaseExtension]) { - extensions[lowerCaseExtension] = lowerCaseLanguage; - } else { - const currentLanguagePriority = importantLanguages.indexOf( - extensions[lowerCaseExtension], - ); - if (currentLanguagePriority === -1) { - extensions[lowerCaseExtension] = lowerCaseLanguage; - } else { - const otherPriority = importantLanguages.indexOf(lowerCaseLanguage); - if (otherPriority !== -1 && otherPriority < currentLanguagePriority) - extensions[lowerCaseExtension] = lowerCaseLanguage; - } - } - }); - }); - - return { ...extensions, ...ExtensionJustify }; - }; - - /** - * Retrieve the regular expressions for a given language. - * This is incomplete, but covers most of the languages we - * see in the wild. - * - * @param language the language to retrieve regexes for - */ - public getRegexes(language: string): Regexes { - switch (language) { - case 'html': - case 'xml': - return ALL_REGEXES.html; - - case 'ruby': - return ALL_REGEXES.ruby; - - case 'python': - return ALL_REGEXES.python; - - default: - // not exact, but likely the best guess for any other unspecified language. - return ALL_REGEXES.c; - } - } - - /** - * return extension map - */ - public getExtensionMap() { - return this.extensionMap; - } - - /** - * get file type through a path - */ - public getType(path: string): string { - const fileExtension = `.${path.split('.').pop()}`; - return this.extensionMap[fileExtension] || ''; - } -} diff --git a/node_modules/github-linguist/src/utils.ts b/node_modules/github-linguist/src/utils.ts deleted file mode 100644 index b7c790b4d0..0000000000 --- a/node_modules/github-linguist/src/utils.ts +++ /dev/null @@ -1,24 +0,0 @@ -import fs from 'fs'; -import path from 'path'; -import slash from 'slash2'; - -const packagePath = slash(path.join(__dirname, '../', 'package.json')); - -/** - * Get package version. - * - * @export getVersion - * @returns {string} - */ -export function getVersion(): string { - const packageInfo = JSON.parse(fs.readFileSync(packagePath, 'utf8')); - - return (packageInfo && packageInfo.version) || 'invalid version!'; -} - -export const ExtensionJustify = { - '.ts': 'typescript', - '.jsx': 'javascript', - '.js': 'javascript', - '.tsx': 'typescript', -}; diff --git a/node_modules/github-linguist/tsconfig.json b/node_modules/github-linguist/tsconfig.json deleted file mode 100644 index 3ad2b108d2..0000000000 --- a/node_modules/github-linguist/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "target": "es2018", - "noImplicitAny": true, - "moduleResolution": "node", - "outDir": "dist", - "baseUrl": ".", - "useDefineForClassFields": true, - "skipLibCheck": true, - "sourceMap": true, - "paths": { - "*": ["node_modules/*", "src/types/*"] - }, - "resolveJsonModule": true - }, - "include": ["src/**/*", "test/declarations.d.ts"] -} diff --git a/node_modules/jsonfile/CHANGELOG.md b/node_modules/jsonfile/CHANGELOG.md deleted file mode 100644 index 7718857abd..0000000000 --- a/node_modules/jsonfile/CHANGELOG.md +++ /dev/null @@ -1,145 +0,0 @@ -4.0.0 / 2017-07-12 ------------------- - -- **BREAKING:** Remove global `spaces` option. -- **BREAKING:** Drop support for Node 0.10, 0.12, and io.js. -- Remove undocumented `passParsingErrors` option. -- Added `EOL` override option to `writeFile` when using `spaces`. [#89] - -3.0.1 / 2017-07-05 ------------------- - -- Fixed bug in `writeFile` when there was a serialization error & no callback was passed. In previous versions, an empty file would be written; now no file is written. - -3.0.0 / 2017-04-25 ------------------- - -- Changed behavior of `throws` option for `readFileSync`; now does not throw filesystem errors when `throws` is `false` - -2.4.0 / 2016-09-15 ------------------- -### Changed -- added optional support for `graceful-fs` [#62] - -2.3.1 / 2016-05-13 ------------------- -- fix to support BOM. [#45][#45] - -2.3.0 / 2016-04-16 ------------------- -- add `throws` to `readFile()`. See [#39][#39] -- add support for any arbitrary `fs` module. Useful with [mock-fs](https://www.npmjs.com/package/mock-fs) - -2.2.3 / 2015-10-14 ------------------- -- include file name in parse error. See: https://github.com/jprichardson/node-jsonfile/pull/34 - -2.2.2 / 2015-09-16 ------------------- -- split out tests into separate files -- fixed `throws` when set to `true` in `readFileSync()`. See: https://github.com/jprichardson/node-jsonfile/pull/33 - -2.2.1 / 2015-06-25 ------------------- -- fixed regression when passing in string as encoding for options in `writeFile()` and `writeFileSync()`. See: https://github.com/jprichardson/node-jsonfile/issues/28 - -2.2.0 / 2015-06-25 ------------------- -- added `options.spaces` to `writeFile()` and `writeFileSync()` - -2.1.2 / 2015-06-22 ------------------- -- fixed if passed `readFileSync(file, 'utf8')`. See: https://github.com/jprichardson/node-jsonfile/issues/25 - -2.1.1 / 2015-06-19 ------------------- -- fixed regressions if `null` is passed for options. See: https://github.com/jprichardson/node-jsonfile/issues/24 - -2.1.0 / 2015-06-19 ------------------- -- cleanup: JavaScript Standard Style, rename files, dropped terst for assert -- methods now support JSON revivers/replacers - -2.0.1 / 2015-05-24 ------------------- -- update license attribute https://github.com/jprichardson/node-jsonfile/pull/21 - -2.0.0 / 2014-07-28 ------------------- -* added `\n` to end of file on write. [#14](https://github.com/jprichardson/node-jsonfile/pull/14) -* added `options.throws` to `readFileSync()` -* dropped support for Node v0.8 - -1.2.0 / 2014-06-29 ------------------- -* removed semicolons -* bugfix: passed `options` to `fs.readFile` and `fs.readFileSync`. This technically changes behavior, but -changes it according to docs. [#12][#12] - -1.1.1 / 2013-11-11 ------------------- -* fixed catching of callback bug (ffissore / #5) - -1.1.0 / 2013-10-11 ------------------- -* added `options` param to methods, (seanodell / #4) - -1.0.1 / 2013-09-05 ------------------- -* removed `homepage` field from package.json to remove NPM warning - -1.0.0 / 2013-06-28 ------------------- -* added `.npmignore`, #1 -* changed spacing default from `4` to `2` to follow Node conventions - -0.0.1 / 2012-09-10 ------------------- -* Initial release. - -[#89]: https://github.com/jprichardson/node-jsonfile/pull/89 -[#45]: https://github.com/jprichardson/node-jsonfile/issues/45 "Reading of UTF8-encoded (w/ BOM) files fails" -[#44]: https://github.com/jprichardson/node-jsonfile/issues/44 "Extra characters in written file" -[#43]: https://github.com/jprichardson/node-jsonfile/issues/43 "Prettyfy json when written to file" -[#42]: https://github.com/jprichardson/node-jsonfile/pull/42 "Moved fs.readFileSync within the try/catch" -[#41]: https://github.com/jprichardson/node-jsonfile/issues/41 "Linux: Hidden file not working" -[#40]: https://github.com/jprichardson/node-jsonfile/issues/40 "autocreate folder doesn't work from Path-value" -[#39]: https://github.com/jprichardson/node-jsonfile/pull/39 "Add `throws` option for readFile (async)" -[#38]: https://github.com/jprichardson/node-jsonfile/pull/38 "Update README.md writeFile[Sync] signature" -[#37]: https://github.com/jprichardson/node-jsonfile/pull/37 "support append file" -[#36]: https://github.com/jprichardson/node-jsonfile/pull/36 "Add typescript definition file." -[#35]: https://github.com/jprichardson/node-jsonfile/pull/35 "Add typescript definition file." -[#34]: https://github.com/jprichardson/node-jsonfile/pull/34 "readFile JSON parse error includes filename" -[#33]: https://github.com/jprichardson/node-jsonfile/pull/33 "fix throw->throws typo in readFileSync()" -[#32]: https://github.com/jprichardson/node-jsonfile/issues/32 "readFile & readFileSync can possible have strip-comments as an option?" -[#31]: https://github.com/jprichardson/node-jsonfile/pull/31 "[Modify] Support string include is unicode escape string" -[#30]: https://github.com/jprichardson/node-jsonfile/issues/30 "How to use Jsonfile package in Meteor.js App?" -[#29]: https://github.com/jprichardson/node-jsonfile/issues/29 "writefile callback if no error?" -[#28]: https://github.com/jprichardson/node-jsonfile/issues/28 "writeFile options argument broken " -[#27]: https://github.com/jprichardson/node-jsonfile/pull/27 "Use svg instead of png to get better image quality" -[#26]: https://github.com/jprichardson/node-jsonfile/issues/26 "Breaking change to fs-extra" -[#25]: https://github.com/jprichardson/node-jsonfile/issues/25 "support string encoding param for read methods" -[#24]: https://github.com/jprichardson/node-jsonfile/issues/24 "readFile: Passing in null options with a callback throws an error" -[#23]: https://github.com/jprichardson/node-jsonfile/pull/23 "Add appendFile and appendFileSync" -[#22]: https://github.com/jprichardson/node-jsonfile/issues/22 "Default value for spaces in readme.md is outdated" -[#21]: https://github.com/jprichardson/node-jsonfile/pull/21 "Update license attribute" -[#20]: https://github.com/jprichardson/node-jsonfile/issues/20 "Add simple caching functionallity" -[#19]: https://github.com/jprichardson/node-jsonfile/pull/19 "Add appendFileSync method" -[#18]: https://github.com/jprichardson/node-jsonfile/issues/18 "Add updateFile and updateFileSync methods" -[#17]: https://github.com/jprichardson/node-jsonfile/issues/17 "seem read & write sync has sequentially problem" -[#16]: https://github.com/jprichardson/node-jsonfile/pull/16 "export spaces defaulted to null" -[#15]: https://github.com/jprichardson/node-jsonfile/issues/15 "`jsonfile.spaces` should default to `null`" -[#14]: https://github.com/jprichardson/node-jsonfile/pull/14 "Add EOL at EOF" -[#13]: https://github.com/jprichardson/node-jsonfile/issues/13 "Add a final newline" -[#12]: https://github.com/jprichardson/node-jsonfile/issues/12 "readFile doesn't accept options" -[#11]: https://github.com/jprichardson/node-jsonfile/pull/11 "Added try,catch to readFileSync" -[#10]: https://github.com/jprichardson/node-jsonfile/issues/10 "No output or error from writeFile" -[#9]: https://github.com/jprichardson/node-jsonfile/pull/9 "Change 'js' to 'jf' in example." -[#8]: https://github.com/jprichardson/node-jsonfile/pull/8 "Updated forgotten module.exports to me." -[#7]: https://github.com/jprichardson/node-jsonfile/pull/7 "Add file name in error message" -[#6]: https://github.com/jprichardson/node-jsonfile/pull/6 "Use graceful-fs when possible" -[#5]: https://github.com/jprichardson/node-jsonfile/pull/5 "Jsonfile doesn't behave nicely when used inside a test suite." -[#4]: https://github.com/jprichardson/node-jsonfile/pull/4 "Added options parameter to writeFile and writeFileSync" -[#3]: https://github.com/jprichardson/node-jsonfile/issues/3 "test2" -[#2]: https://github.com/jprichardson/node-jsonfile/issues/2 "homepage field must be a string url. Deleted." -[#1]: https://github.com/jprichardson/node-jsonfile/pull/1 "adding an `.npmignore` file" diff --git a/node_modules/jsonfile/LICENSE b/node_modules/jsonfile/LICENSE deleted file mode 100644 index cb7e807b9b..0000000000 --- a/node_modules/jsonfile/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2015, JP Richardson - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files -(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/jsonfile/README.md b/node_modules/jsonfile/README.md deleted file mode 100644 index 721685c928..0000000000 --- a/node_modules/jsonfile/README.md +++ /dev/null @@ -1,168 +0,0 @@ -Node.js - jsonfile -================ - -Easily read/write JSON files. - -[![npm Package](https://img.shields.io/npm/v/jsonfile.svg?style=flat-square)](https://www.npmjs.org/package/jsonfile) -[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.svg)](http://travis-ci.org/jprichardson/node-jsonfile) -[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-jsonfile/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-jsonfile/branch/master) - -Standard JavaScript - -Why? ----- - -Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying. - - - -Installation ------------- - - npm install --save jsonfile - - - -API ---- - -### readFile(filename, [options], callback) - -`options` (`object`, default `undefined`): Pass in any `fs.readFile` options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). - - `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, pass this error to the callback. - If `false`, returns `null` for the object. - - -```js -var jsonfile = require('jsonfile') -var file = '/tmp/data.json' -jsonfile.readFile(file, function(err, obj) { - console.dir(obj) -}) -``` - - -### readFileSync(filename, [options]) - -`options` (`object`, default `undefined`): Pass in any `fs.readFileSync` options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). -- `throws` (`boolean`, default: `true`). If an error is encountered reading or parsing the file, throw the error. If `false`, returns `null` for the object. - -```js -var jsonfile = require('jsonfile') -var file = '/tmp/data.json' - -console.dir(jsonfile.readFileSync(file)) -``` - - -### writeFile(filename, obj, [options], callback) - -`options`: Pass in any `fs.writeFile` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces` and override `EOL` string. - - -```js -var jsonfile = require('jsonfile') - -var file = '/tmp/data.json' -var obj = {name: 'JP'} - -jsonfile.writeFile(file, obj, function (err) { - console.error(err) -}) -``` - -**formatting with spaces:** - -```js -var jsonfile = require('jsonfile') - -var file = '/tmp/data.json' -var obj = {name: 'JP'} - -jsonfile.writeFile(file, obj, {spaces: 2}, function(err) { - console.error(err) -}) -``` - -**overriding EOL:** - -```js -var jsonfile = require('jsonfile') - -var file = '/tmp/data.json' -var obj = {name: 'JP'} - -jsonfile.writeFile(file, obj, {spaces: 2, EOL: '\r\n'}, function(err) { - console.error(err) -}) -``` - -**appending to an existing JSON file:** - -You can use `fs.writeFile` option `{flag: 'a'}` to achieve this. - -```js -var jsonfile = require('jsonfile') - -var file = '/tmp/mayAlreadyExistedData.json' -var obj = {name: 'JP'} - -jsonfile.writeFile(file, obj, {flag: 'a'}, function (err) { - console.error(err) -}) -``` - -### writeFileSync(filename, obj, [options]) - -`options`: Pass in any `fs.writeFileSync` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces` and override `EOL` string. - -```js -var jsonfile = require('jsonfile') - -var file = '/tmp/data.json' -var obj = {name: 'JP'} - -jsonfile.writeFileSync(file, obj) -``` - -**formatting with spaces:** - -```js -var jsonfile = require('jsonfile') - -var file = '/tmp/data.json' -var obj = {name: 'JP'} - -jsonfile.writeFileSync(file, obj, {spaces: 2}) -``` - -**overriding EOL:** - -```js -var jsonfile = require('jsonfile') - -var file = '/tmp/data.json' -var obj = {name: 'JP'} - -jsonfile.writeFileSync(file, obj, {spaces: 2, EOL: '\r\n'}) -``` - -**appending to an existing JSON file:** - -You can use `fs.writeFileSync` option `{flag: 'a'}` to achieve this. - -```js -var jsonfile = require('jsonfile') - -var file = '/tmp/mayAlreadyExistedData.json' -var obj = {name: 'JP'} - -jsonfile.writeFileSync(file, obj, {flag: 'a'}) -``` - -License -------- - -(MIT License) - -Copyright 2012-2016, JP Richardson diff --git a/node_modules/jsonfile/index.js b/node_modules/jsonfile/index.js deleted file mode 100644 index d1e5827ca9..0000000000 --- a/node_modules/jsonfile/index.js +++ /dev/null @@ -1,134 +0,0 @@ -var _fs -try { - _fs = require('graceful-fs') -} catch (_) { - _fs = require('fs') -} - -function readFile (file, options, callback) { - if (callback == null) { - callback = options - options = {} - } - - if (typeof options === 'string') { - options = {encoding: options} - } - - options = options || {} - var fs = options.fs || _fs - - var shouldThrow = true - if ('throws' in options) { - shouldThrow = options.throws - } - - fs.readFile(file, options, function (err, data) { - if (err) return callback(err) - - data = stripBom(data) - - var obj - try { - obj = JSON.parse(data, options ? options.reviver : null) - } catch (err2) { - if (shouldThrow) { - err2.message = file + ': ' + err2.message - return callback(err2) - } else { - return callback(null, null) - } - } - - callback(null, obj) - }) -} - -function readFileSync (file, options) { - options = options || {} - if (typeof options === 'string') { - options = {encoding: options} - } - - var fs = options.fs || _fs - - var shouldThrow = true - if ('throws' in options) { - shouldThrow = options.throws - } - - try { - var content = fs.readFileSync(file, options) - content = stripBom(content) - return JSON.parse(content, options.reviver) - } catch (err) { - if (shouldThrow) { - err.message = file + ': ' + err.message - throw err - } else { - return null - } - } -} - -function stringify (obj, options) { - var spaces - var EOL = '\n' - if (typeof options === 'object' && options !== null) { - if (options.spaces) { - spaces = options.spaces - } - if (options.EOL) { - EOL = options.EOL - } - } - - var str = JSON.stringify(obj, options ? options.replacer : null, spaces) - - return str.replace(/\n/g, EOL) + EOL -} - -function writeFile (file, obj, options, callback) { - if (callback == null) { - callback = options - options = {} - } - options = options || {} - var fs = options.fs || _fs - - var str = '' - try { - str = stringify(obj, options) - } catch (err) { - // Need to return whether a callback was passed or not - if (callback) callback(err, null) - return - } - - fs.writeFile(file, str, options, callback) -} - -function writeFileSync (file, obj, options) { - options = options || {} - var fs = options.fs || _fs - - var str = stringify(obj, options) - // not sure if fs.writeFileSync returns anything, but just in case - return fs.writeFileSync(file, str, options) -} - -function stripBom (content) { - // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified - if (Buffer.isBuffer(content)) content = content.toString('utf8') - content = content.replace(/^\uFEFF/, '') - return content -} - -var jsonfile = { - readFile: readFile, - readFileSync: readFileSync, - writeFile: writeFile, - writeFileSync: writeFileSync -} - -module.exports = jsonfile diff --git a/node_modules/jsonfile/package.json b/node_modules/jsonfile/package.json deleted file mode 100644 index 29e783f4f1..0000000000 --- a/node_modules/jsonfile/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "jsonfile", - "version": "4.0.0", - "description": "Easily read/write JSON files.", - "repository": { - "type": "git", - "url": "git@github.com:jprichardson/node-jsonfile.git" - }, - "keywords": [ - "read", - "write", - "file", - "json", - "fs", - "fs-extra" - ], - "author": "JP Richardson ", - "license": "MIT", - "dependencies": {}, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - }, - "devDependencies": { - "mocha": "2.x", - "rimraf": "^2.4.0", - "standard": "^10.0.3" - }, - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "lint": "standard", - "test": "npm run lint && npm run unit", - "unit": "mocha" - } -} diff --git a/node_modules/language-map/.travis.yml b/node_modules/language-map/.travis.yml deleted file mode 100644 index c075309862..0000000000 --- a/node_modules/language-map/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js - -notifications: - email: - on_success: never - on_failure: change - -node_js: - - "0.10" - -after_script: "npm install coveralls@2 && cat ./coverage/lcov.info | coveralls" diff --git a/node_modules/language-map/LICENSE b/node_modules/language-map/LICENSE deleted file mode 100644 index 983fbe8aec..0000000000 --- a/node_modules/language-map/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/language-map/README.md b/node_modules/language-map/README.md deleted file mode 100644 index 511392ca6c..0000000000 --- a/node_modules/language-map/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# Language Map - -[![NPM version][npm-image]][npm-url] -[![NPM downloads][downloads-image]][downloads-url] -[![Build status][travis-image]][travis-url] -[![Test coverage][coveralls-image]][coveralls-url] - -JSON map of programming languages to meta data. Converted from GitHub's [Linguist YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). - -**Useful Properties:** - -* `type` - Either data, programming, markup, or undefined -* `aliases` - An array of additional lowercased aliases -* `filenames` - An array of filenames associated with the language -* `extensions` - An array of associated extensions -* `interpreters` - An array of associated interpreters - -**GitHub Specific Properties:** - -* `wrap` - Boolean flag to enable line wrapping -* `color` - CSS hex color to represent the language -* `group` - Associated language grouping -* `aceMode` - A string name of the ace mode -* `searchable` - Boolean flag to enable searching -* `searchTerm` - Deprecated: Some languages maybe indexed under a different alias - -## Installation - -``` -npm install language-map --save -``` - -## Usage - -```javascript -var map = require('language-map') - -console.log(map["JavaScript"]) -//=> { type: 'programming', aceMode: 'javascript', color: '#f15501', ... } -``` - -## License - -MIT - -``` -Copyright (c) 2011-2014 GitHub, Inc. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. -``` - -[npm-image]: https://img.shields.io/npm/v/language-map.svg?style=flat -[npm-url]: https://npmjs.org/package/language-map -[downloads-image]: https://img.shields.io/npm/dm/language-map.svg?style=flat -[downloads-url]: https://npmjs.org/package/language-map -[travis-image]: https://img.shields.io/travis/blakeembrey/language-map.svg?style=flat -[travis-url]: https://travis-ci.org/blakeembrey/language-map -[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/language-map.svg?style=flat -[coveralls-url]: https://coveralls.io/r/blakeembrey/language-map?branch=master diff --git a/node_modules/language-map/languages.json b/node_modules/language-map/languages.json deleted file mode 100644 index c073146f4b..0000000000 --- a/node_modules/language-map/languages.json +++ /dev/null @@ -1,6762 +0,0 @@ -{ - "1C Enterprise": { - "type": "programming", - "color": "#814CCC", - "extensions": [ - ".bsl", - ".os" - ], - "tmScope": "source.bsl", - "aceMode": "text", - "languageId": 0 - }, - "ABAP": { - "type": "programming", - "color": "#E8274B", - "extensions": [ - ".abap" - ], - "aceMode": "abap", - "languageId": 1 - }, - "ABNF": { - "type": "data", - "aceMode": "text", - "extensions": [ - ".abnf" - ], - "tmScope": "source.abnf", - "languageId": 429 - }, - "AGS Script": { - "type": "programming", - "color": "#B9D9FF", - "aliases": [ - "ags" - ], - "extensions": [ - ".asc", - ".ash" - ], - "tmScope": "source.c++", - "aceMode": "c_cpp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-c++src", - "languageId": 2 - }, - "AMPL": { - "type": "programming", - "color": "#E6EFBB", - "extensions": [ - ".ampl", - ".mod" - ], - "tmScope": "source.ampl", - "aceMode": "text", - "languageId": 3 - }, - "ANTLR": { - "type": "programming", - "color": "#9DC3FF", - "extensions": [ - ".g4" - ], - "aceMode": "text", - "languageId": 4 - }, - "API Blueprint": { - "type": "markup", - "color": "#2ACCA8", - "aceMode": "markdown", - "extensions": [ - ".apib" - ], - "tmScope": "text.html.markdown.source.gfm.apib", - "languageId": 5 - }, - "APL": { - "type": "programming", - "color": "#5A8164", - "extensions": [ - ".apl", - ".dyalog" - ], - "interpreters": [ - "apl", - "aplx", - "dyalog" - ], - "tmScope": "source.apl", - "aceMode": "text", - "codemirrorMode": "apl", - "codemirrorMimeType": "text/apl", - "languageId": 6 - }, - "ASN.1": { - "type": "data", - "extensions": [ - ".asn", - ".asn1" - ], - "tmScope": "source.asn", - "aceMode": "text", - "codemirrorMode": "asn.1", - "codemirrorMimeType": "text/x-ttcn-asn", - "languageId": 7 - }, - "ASP": { - "type": "programming", - "color": "#6a40fd", - "tmScope": "text.html.asp", - "aliases": [ - "aspx", - "aspx-vb" - ], - "extensions": [ - ".asp", - ".asax", - ".ascx", - ".ashx", - ".asmx", - ".aspx", - ".axd" - ], - "aceMode": "text", - "codemirrorMode": "htmlembedded", - "codemirrorMimeType": "application/x-aspx", - "languageId": 8 - }, - "ATS": { - "type": "programming", - "color": "#1ac620", - "aliases": [ - "ats2" - ], - "extensions": [ - ".dats", - ".hats", - ".sats" - ], - "tmScope": "source.ats", - "aceMode": "ocaml", - "languageId": 9 - }, - "ActionScript": { - "type": "programming", - "tmScope": "source.actionscript.3", - "color": "#882B0F", - "aliases": [ - "actionscript 3", - "actionscript3", - "as3" - ], - "extensions": [ - ".as" - ], - "aceMode": "actionscript", - "languageId": 10 - }, - "Ada": { - "type": "programming", - "color": "#02f88c", - "extensions": [ - ".adb", - ".ada", - ".ads" - ], - "aliases": [ - "ada95", - "ada2005" - ], - "aceMode": "ada", - "languageId": 11 - }, - "Adobe Font Metrics": { - "type": "data", - "tmScope": "source.afm", - "extensions": [ - ".afm" - ], - "aliases": [ - "acfm", - "adobe composite font metrics", - "adobe multiple font metrics", - "amfm" - ], - "aceMode": "text", - "languageId": 147198098 - }, - "Agda": { - "type": "programming", - "color": "#315665", - "extensions": [ - ".agda" - ], - "aceMode": "text", - "languageId": 12 - }, - "Alloy": { - "type": "programming", - "color": "#64C800", - "extensions": [ - ".als" - ], - "aceMode": "text", - "languageId": 13 - }, - "Alpine Abuild": { - "type": "programming", - "group": "Shell", - "aliases": [ - "abuild", - "apkbuild" - ], - "filenames": [ - "APKBUILD" - ], - "tmScope": "source.shell", - "aceMode": "sh", - "codemirrorMode": "shell", - "codemirrorMimeType": "text/x-sh", - "languageId": 14 - }, - "AngelScript": { - "type": "programming", - "color": "#C7D7DC", - "extensions": [ - ".as", - ".angelscript" - ], - "tmScope": "source.angelscript", - "aceMode": "text", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-c++src", - "languageId": 389477596 - }, - "Ant Build System": { - "type": "data", - "tmScope": "text.xml.ant", - "filenames": [ - "ant.xml", - "build.xml" - ], - "aceMode": "xml", - "codemirrorMode": "xml", - "codemirrorMimeType": "application/xml", - "languageId": 15 - }, - "ApacheConf": { - "type": "data", - "aliases": [ - "aconf", - "apache" - ], - "extensions": [ - ".apacheconf", - ".vhost" - ], - "filenames": [ - ".htaccess", - "apache2.conf", - "httpd.conf" - ], - "tmScope": "source.apache-config", - "aceMode": "apache_conf", - "languageId": 16 - }, - "Apex": { - "type": "programming", - "extensions": [ - ".cls" - ], - "tmScope": "source.java", - "aceMode": "java", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-java", - "languageId": 17 - }, - "Apollo Guidance Computer": { - "type": "programming", - "group": "Assembly", - "extensions": [ - ".agc" - ], - "tmScope": "source.agc", - "aceMode": "assembly_x86", - "languageId": 18 - }, - "AppleScript": { - "type": "programming", - "aliases": [ - "osascript" - ], - "extensions": [ - ".applescript", - ".scpt" - ], - "interpreters": [ - "osascript" - ], - "aceMode": "applescript", - "color": "#101F1F", - "languageId": 19 - }, - "Arc": { - "type": "programming", - "color": "#aa2afe", - "extensions": [ - ".arc" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 20 - }, - "AsciiDoc": { - "type": "prose", - "aceMode": "asciidoc", - "wrap": true, - "extensions": [ - ".asciidoc", - ".adoc", - ".asc" - ], - "tmScope": "text.html.asciidoc", - "languageId": 22 - }, - "AspectJ": { - "type": "programming", - "color": "#a957b0", - "extensions": [ - ".aj" - ], - "tmScope": "source.aspectj", - "aceMode": "text", - "languageId": 23 - }, - "Assembly": { - "type": "programming", - "color": "#6E4C13", - "aliases": [ - "asm", - "nasm" - ], - "extensions": [ - ".asm", - ".a51", - ".inc", - ".nasm" - ], - "tmScope": "source.assembly", - "aceMode": "assembly_x86", - "languageId": 24 - }, - "Augeas": { - "type": "programming", - "extensions": [ - ".aug" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 25 - }, - "AutoHotkey": { - "type": "programming", - "color": "#6594b9", - "aliases": [ - "ahk" - ], - "extensions": [ - ".ahk", - ".ahkl" - ], - "tmScope": "source.ahk", - "aceMode": "autohotkey", - "languageId": 26 - }, - "AutoIt": { - "type": "programming", - "color": "#1C3552", - "aliases": [ - "au3", - "AutoIt3", - "AutoItScript" - ], - "extensions": [ - ".au3" - ], - "tmScope": "source.autoit", - "aceMode": "autohotkey", - "languageId": 27 - }, - "Awk": { - "type": "programming", - "extensions": [ - ".awk", - ".auk", - ".gawk", - ".mawk", - ".nawk" - ], - "interpreters": [ - "awk", - "gawk", - "mawk", - "nawk" - ], - "aceMode": "text", - "languageId": 28 - }, - "Ballerina": { - "type": "programming", - "extensions": [ - ".bal" - ], - "tmScope": "source.ballerina", - "aceMode": "text", - "color": "#FF5000", - "languageId": 720859680 - }, - "Batchfile": { - "type": "programming", - "aliases": [ - "bat", - "batch", - "dosbatch", - "winbatch" - ], - "extensions": [ - ".bat", - ".cmd" - ], - "tmScope": "source.batchfile", - "aceMode": "batchfile", - "color": "#C1F12E", - "languageId": 29 - }, - "Befunge": { - "type": "programming", - "extensions": [ - ".befunge" - ], - "aceMode": "text", - "languageId": 30 - }, - "Bison": { - "type": "programming", - "group": "Yacc", - "tmScope": "source.bison", - "extensions": [ - ".bison" - ], - "aceMode": "text", - "languageId": 31 - }, - "BitBake": { - "type": "programming", - "tmScope": "none", - "extensions": [ - ".bb" - ], - "aceMode": "text", - "languageId": 32 - }, - "Blade": { - "type": "markup", - "group": "HTML", - "extensions": [ - ".blade", - ".blade.php" - ], - "tmScope": "text.html.php.blade", - "aceMode": "text", - "languageId": 33 - }, - "BlitzBasic": { - "type": "programming", - "aliases": [ - "b3d", - "blitz3d", - "blitzplus", - "bplus" - ], - "extensions": [ - ".bb", - ".decls" - ], - "tmScope": "source.blitzmax", - "aceMode": "text", - "languageId": 34 - }, - "BlitzMax": { - "type": "programming", - "color": "#cd6400", - "extensions": [ - ".bmx" - ], - "aliases": [ - "bmax" - ], - "aceMode": "text", - "languageId": 35 - }, - "Bluespec": { - "type": "programming", - "extensions": [ - ".bsv" - ], - "tmScope": "source.bsv", - "aceMode": "verilog", - "languageId": 36 - }, - "Boo": { - "type": "programming", - "color": "#d4bec1", - "extensions": [ - ".boo" - ], - "aceMode": "text", - "tmScope": "source.boo", - "languageId": 37 - }, - "Brainfuck": { - "type": "programming", - "color": "#2F2530", - "extensions": [ - ".b", - ".bf" - ], - "tmScope": "source.bf", - "aceMode": "text", - "codemirrorMode": "brainfuck", - "codemirrorMimeType": "text/x-brainfuck", - "languageId": 38 - }, - "Brightscript": { - "type": "programming", - "extensions": [ - ".brs" - ], - "tmScope": "source.brightscript", - "aceMode": "text", - "languageId": 39 - }, - "Bro": { - "type": "programming", - "extensions": [ - ".bro" - ], - "aceMode": "text", - "languageId": 40 - }, - "C": { - "type": "programming", - "color": "#555555", - "extensions": [ - ".c", - ".cats", - ".h", - ".idc" - ], - "interpreters": [ - "tcc" - ], - "aceMode": "c_cpp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-csrc", - "languageId": 41 - }, - "C#": { - "type": "programming", - "aceMode": "csharp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-csharp", - "tmScope": "source.cs", - "color": "#178600", - "aliases": [ - "csharp" - ], - "extensions": [ - ".cs", - ".cake", - ".cshtml", - ".csx" - ], - "languageId": 42 - }, - "C++": { - "type": "programming", - "aceMode": "c_cpp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-c++src", - "color": "#f34b7d", - "aliases": [ - "cpp" - ], - "extensions": [ - ".cpp", - ".c++", - ".cc", - ".cp", - ".cxx", - ".h", - ".h++", - ".hh", - ".hpp", - ".hxx", - ".inc", - ".inl", - ".ino", - ".ipp", - ".re", - ".tcc", - ".tpp" - ], - "languageId": 43 - }, - "C-ObjDump": { - "type": "data", - "extensions": [ - ".c-objdump" - ], - "tmScope": "objdump.x86asm", - "aceMode": "assembly_x86", - "languageId": 44 - }, - "C2hs Haskell": { - "type": "programming", - "group": "Haskell", - "aliases": [ - "c2hs" - ], - "extensions": [ - ".chs" - ], - "tmScope": "source.haskell", - "aceMode": "haskell", - "codemirrorMode": "haskell", - "codemirrorMimeType": "text/x-haskell", - "languageId": 45 - }, - "CLIPS": { - "type": "programming", - "extensions": [ - ".clp" - ], - "tmScope": "source.clips", - "aceMode": "text", - "languageId": 46 - }, - "CMake": { - "type": "programming", - "extensions": [ - ".cmake", - ".cmake.in" - ], - "filenames": [ - "CMakeLists.txt" - ], - "aceMode": "text", - "codemirrorMode": "cmake", - "codemirrorMimeType": "text/x-cmake", - "languageId": 47 - }, - "COBOL": { - "type": "programming", - "extensions": [ - ".cob", - ".cbl", - ".ccp", - ".cobol", - ".cpy" - ], - "aceMode": "cobol", - "codemirrorMode": "cobol", - "codemirrorMimeType": "text/x-cobol", - "languageId": 48 - }, - "COLLADA": { - "type": "data", - "extensions": [ - ".dae" - ], - "tmScope": "text.xml", - "aceMode": "xml", - "codemirrorMode": "xml", - "codemirrorMimeType": "text/xml", - "languageId": 49 - }, - "CSON": { - "type": "data", - "group": "CoffeeScript", - "tmScope": "source.coffee", - "aceMode": "coffee", - "codemirrorMode": "coffeescript", - "codemirrorMimeType": "text/x-coffeescript", - "searchable": false, - "extensions": [ - ".cson" - ], - "languageId": 424 - }, - "CSS": { - "type": "markup", - "tmScope": "source.css", - "aceMode": "css", - "codemirrorMode": "css", - "codemirrorMimeType": "text/css", - "color": "#563d7c", - "extensions": [ - ".css" - ], - "languageId": 50 - }, - "CSV": { - "type": "data", - "aceMode": "text", - "tmScope": "none", - "extensions": [ - ".csv" - ], - "languageId": 51 - }, - "CWeb": { - "type": "programming", - "extensions": [ - ".w" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 657332628 - }, - "Cap'n Proto": { - "type": "programming", - "tmScope": "source.capnp", - "extensions": [ - ".capnp" - ], - "aceMode": "text", - "languageId": 52 - }, - "CartoCSS": { - "type": "programming", - "aliases": [ - "Carto" - ], - "extensions": [ - ".mss" - ], - "aceMode": "text", - "tmScope": "source.css.mss", - "languageId": 53 - }, - "Ceylon": { - "type": "programming", - "color": "#dfa535", - "extensions": [ - ".ceylon" - ], - "tmScope": "source.ceylon", - "aceMode": "text", - "languageId": 54 - }, - "Chapel": { - "type": "programming", - "color": "#8dc63f", - "aliases": [ - "chpl" - ], - "extensions": [ - ".chpl" - ], - "aceMode": "text", - "languageId": 55 - }, - "Charity": { - "type": "programming", - "extensions": [ - ".ch" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 56 - }, - "ChucK": { - "type": "programming", - "extensions": [ - ".ck" - ], - "tmScope": "source.java", - "aceMode": "java", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-java", - "languageId": 57 - }, - "Cirru": { - "type": "programming", - "color": "#ccccff", - "aceMode": "cirru", - "extensions": [ - ".cirru" - ], - "languageId": 58 - }, - "Clarion": { - "type": "programming", - "color": "#db901e", - "aceMode": "text", - "extensions": [ - ".clw" - ], - "tmScope": "source.clarion", - "languageId": 59 - }, - "Clean": { - "type": "programming", - "color": "#3F85AF", - "extensions": [ - ".icl", - ".dcl" - ], - "tmScope": "source.clean", - "aceMode": "text", - "languageId": 60 - }, - "Click": { - "type": "programming", - "color": "#E4E6F3", - "extensions": [ - ".click" - ], - "tmScope": "source.click", - "aceMode": "text", - "languageId": 61 - }, - "Clojure": { - "type": "programming", - "aceMode": "clojure", - "codemirrorMode": "clojure", - "codemirrorMimeType": "text/x-clojure", - "color": "#db5855", - "extensions": [ - ".clj", - ".boot", - ".cl2", - ".cljc", - ".cljs", - ".cljs.hl", - ".cljscm", - ".cljx", - ".hic" - ], - "filenames": [ - "riemann.config" - ], - "languageId": 62 - }, - "Closure Templates": { - "type": "markup", - "group": "HTML", - "aceMode": "soy_template", - "codemirrorMode": "soy", - "codemirrorMimeType": "text/x-soy", - "aliases": [ - "soy" - ], - "extensions": [ - ".soy" - ], - "tmScope": "text.html.soy", - "languageId": 357046146 - }, - "Cloud Firestore Security Rules": { - "type": "data", - "aceMode": "less", - "codemirrorMode": "css", - "codemirrorMimeType": "text/css", - "tmScope": "source.firestore", - "filenames": [ - "firestore.rules" - ], - "languageId": 407996372 - }, - "CoNLL-U": { - "type": "data", - "extensions": [ - ".conllu", - ".conll" - ], - "tmScope": "text.conllu", - "aceMode": "text", - "aliases": [ - "CoNLL", - "CoNLL-X" - ], - "languageId": 421026389 - }, - "CoffeeScript": { - "type": "programming", - "tmScope": "source.coffee", - "aceMode": "coffee", - "codemirrorMode": "coffeescript", - "codemirrorMimeType": "text/x-coffeescript", - "color": "#244776", - "aliases": [ - "coffee", - "coffee-script" - ], - "extensions": [ - ".coffee", - "._coffee", - ".cake", - ".cjsx", - ".iced" - ], - "filenames": [ - "Cakefile" - ], - "interpreters": [ - "coffee" - ], - "languageId": 63 - }, - "ColdFusion": { - "type": "programming", - "aceMode": "coldfusion", - "color": "#ed2cd6", - "aliases": [ - "cfm", - "cfml", - "coldfusion html" - ], - "extensions": [ - ".cfm", - ".cfml" - ], - "tmScope": "text.html.cfm", - "languageId": 64 - }, - "ColdFusion CFC": { - "type": "programming", - "group": "ColdFusion", - "aceMode": "coldfusion", - "aliases": [ - "cfc" - ], - "extensions": [ - ".cfc" - ], - "tmScope": "source.cfscript", - "languageId": 65 - }, - "Common Lisp": { - "type": "programming", - "tmScope": "source.lisp", - "color": "#3fb68b", - "aliases": [ - "lisp" - ], - "extensions": [ - ".lisp", - ".asd", - ".cl", - ".l", - ".lsp", - ".ny", - ".podsl", - ".sexp" - ], - "interpreters": [ - "lisp", - "sbcl", - "ccl", - "clisp", - "ecl" - ], - "aceMode": "lisp", - "codemirrorMode": "commonlisp", - "codemirrorMimeType": "text/x-common-lisp", - "languageId": 66 - }, - "Common Workflow Language": { - "aliases": [ - "cwl" - ], - "type": "programming", - "aceMode": "yaml", - "codemirrorMode": "yaml", - "codemirrorMimeType": "text/x-yaml", - "extensions": [ - ".cwl" - ], - "interpreters": [ - "cwl-runner" - ], - "color": "#B5314C", - "tmScope": "source.cwl", - "languageId": 988547172 - }, - "Component Pascal": { - "type": "programming", - "color": "#B0CE4E", - "extensions": [ - ".cp", - ".cps" - ], - "tmScope": "source.pascal", - "aliases": [ - "delphi", - "objectpascal" - ], - "aceMode": "pascal", - "codemirrorMode": "pascal", - "codemirrorMimeType": "text/x-pascal", - "languageId": 67 - }, - "Cool": { - "type": "programming", - "extensions": [ - ".cl" - ], - "tmScope": "source.cool", - "aceMode": "text", - "languageId": 68 - }, - "Coq": { - "type": "programming", - "extensions": [ - ".coq", - ".v" - ], - "aceMode": "text", - "languageId": 69 - }, - "Cpp-ObjDump": { - "type": "data", - "extensions": [ - ".cppobjdump", - ".c++-objdump", - ".c++objdump", - ".cpp-objdump", - ".cxx-objdump" - ], - "tmScope": "objdump.x86asm", - "aliases": [ - "c++-objdump" - ], - "aceMode": "assembly_x86", - "languageId": 70 - }, - "Creole": { - "type": "prose", - "wrap": true, - "extensions": [ - ".creole" - ], - "tmScope": "text.html.creole", - "aceMode": "text", - "languageId": 71 - }, - "Crystal": { - "type": "programming", - "color": "#776791", - "extensions": [ - ".cr" - ], - "aceMode": "ruby", - "codemirrorMode": "crystal", - "codemirrorMimeType": "text/x-crystal", - "tmScope": "source.crystal", - "interpreters": [ - "crystal" - ], - "languageId": 72 - }, - "Csound": { - "type": "programming", - "aliases": [ - "csound-orc" - ], - "extensions": [ - ".orc", - ".udo" - ], - "tmScope": "source.csound", - "aceMode": "csound_orchestra", - "languageId": 73 - }, - "Csound Document": { - "type": "programming", - "aliases": [ - "csound-csd" - ], - "extensions": [ - ".csd" - ], - "tmScope": "source.csound-document", - "aceMode": "csound_document", - "languageId": 74 - }, - "Csound Score": { - "type": "programming", - "aliases": [ - "csound-sco" - ], - "extensions": [ - ".sco" - ], - "tmScope": "source.csound-score", - "aceMode": "csound_score", - "languageId": 75 - }, - "Cuda": { - "type": "programming", - "extensions": [ - ".cu", - ".cuh" - ], - "tmScope": "source.cuda-c++", - "aceMode": "c_cpp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-c++src", - "color": "#3A4E3A", - "languageId": 77 - }, - "Cycript": { - "type": "programming", - "extensions": [ - ".cy" - ], - "tmScope": "source.js", - "aceMode": "javascript", - "codemirrorMode": "javascript", - "codemirrorMimeType": "text/javascript", - "languageId": 78 - }, - "Cython": { - "type": "programming", - "group": "Python", - "extensions": [ - ".pyx", - ".pxd", - ".pxi" - ], - "aliases": [ - "pyrex" - ], - "aceMode": "text", - "codemirrorMode": "python", - "codemirrorMimeType": "text/x-cython", - "languageId": 79 - }, - "D": { - "type": "programming", - "color": "#ba595e", - "extensions": [ - ".d", - ".di" - ], - "aceMode": "d", - "codemirrorMode": "d", - "codemirrorMimeType": "text/x-d", - "languageId": 80 - }, - "D-ObjDump": { - "type": "data", - "extensions": [ - ".d-objdump" - ], - "tmScope": "objdump.x86asm", - "aceMode": "assembly_x86", - "languageId": 81 - }, - "DIGITAL Command Language": { - "type": "programming", - "aliases": [ - "dcl" - ], - "extensions": [ - ".com" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 82 - }, - "DM": { - "type": "programming", - "color": "#447265", - "extensions": [ - ".dm" - ], - "aliases": [ - "byond" - ], - "tmScope": "source.dm", - "aceMode": "c_cpp", - "languageId": 83 - }, - "DNS Zone": { - "type": "data", - "extensions": [ - ".zone", - ".arpa" - ], - "tmScope": "text.zone_file", - "aceMode": "text", - "languageId": 84 - }, - "DTrace": { - "type": "programming", - "aliases": [ - "dtrace-script" - ], - "extensions": [ - ".d" - ], - "interpreters": [ - "dtrace" - ], - "tmScope": "source.c", - "aceMode": "c_cpp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-csrc", - "languageId": 85 - }, - "Darcs Patch": { - "type": "data", - "aliases": [ - "dpatch" - ], - "extensions": [ - ".darcspatch", - ".dpatch" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 86 - }, - "Dart": { - "type": "programming", - "color": "#00B4AB", - "extensions": [ - ".dart" - ], - "interpreters": [ - "dart" - ], - "aceMode": "dart", - "codemirrorMode": "dart", - "codemirrorMimeType": "application/dart", - "languageId": 87 - }, - "DataWeave": { - "type": "programming", - "color": "#003a52", - "extensions": [ - ".dwl" - ], - "aceMode": "text", - "tmScope": "source.data-weave", - "languageId": 974514097 - }, - "Diff": { - "type": "data", - "extensions": [ - ".diff", - ".patch" - ], - "aliases": [ - "udiff" - ], - "tmScope": "source.diff", - "aceMode": "diff", - "codemirrorMode": "diff", - "codemirrorMimeType": "text/x-diff", - "languageId": 88 - }, - "Dockerfile": { - "type": "programming", - "color": "#0db7ed", - "tmScope": "source.dockerfile", - "extensions": [ - ".dockerfile" - ], - "filenames": [ - "Dockerfile" - ], - "aceMode": "dockerfile", - "codemirrorMode": "dockerfile", - "codemirrorMimeType": "text/x-dockerfile", - "languageId": 89 - }, - "Dogescript": { - "type": "programming", - "color": "#cca760", - "extensions": [ - ".djs" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 90 - }, - "Dylan": { - "type": "programming", - "color": "#6c616e", - "extensions": [ - ".dylan", - ".dyl", - ".intr", - ".lid" - ], - "aceMode": "text", - "codemirrorMode": "dylan", - "codemirrorMimeType": "text/x-dylan", - "languageId": 91 - }, - "E": { - "type": "programming", - "color": "#ccce35", - "extensions": [ - ".E" - ], - "interpreters": [ - "rune" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 92 - }, - "EBNF": { - "type": "data", - "extensions": [ - ".ebnf" - ], - "tmScope": "source.ebnf", - "aceMode": "text", - "codemirrorMode": "ebnf", - "codemirrorMimeType": "text/x-ebnf", - "languageId": 430 - }, - "ECL": { - "type": "programming", - "color": "#8a1267", - "extensions": [ - ".ecl", - ".eclxml" - ], - "tmScope": "none", - "aceMode": "text", - "codemirrorMode": "ecl", - "codemirrorMimeType": "text/x-ecl", - "languageId": 93 - }, - "ECLiPSe": { - "type": "programming", - "group": "prolog", - "extensions": [ - ".ecl" - ], - "tmScope": "source.prolog.eclipse", - "aceMode": "prolog", - "languageId": 94 - }, - "EJS": { - "type": "markup", - "group": "HTML", - "extensions": [ - ".ejs" - ], - "tmScope": "text.html.js", - "aceMode": "ejs", - "languageId": 95 - }, - "EML": { - "type": "data", - "extensions": [ - ".eml", - ".mbox" - ], - "tmScope": "text.eml.basic", - "aceMode": "text", - "languageId": 529653389 - }, - "EQ": { - "type": "programming", - "color": "#a78649", - "extensions": [ - ".eq" - ], - "tmScope": "source.cs", - "aceMode": "csharp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-csharp", - "languageId": 96 - }, - "Eagle": { - "type": "data", - "extensions": [ - ".sch", - ".brd" - ], - "tmScope": "text.xml", - "aceMode": "xml", - "codemirrorMode": "xml", - "codemirrorMimeType": "text/xml", - "languageId": 97 - }, - "Easybuild": { - "type": "data", - "group": "Python", - "aceMode": "python", - "codemirrorMode": "python", - "codemirrorMimeType": "text/x-python", - "tmScope": "source.python", - "extensions": [ - ".eb" - ], - "languageId": 342840477 - }, - "Ecere Projects": { - "type": "data", - "group": "JavaScript", - "extensions": [ - ".epj" - ], - "tmScope": "source.json", - "aceMode": "json", - "codemirrorMode": "javascript", - "codemirrorMimeType": "application/json", - "languageId": 98 - }, - "Edje Data Collection": { - "type": "data", - "extensions": [ - ".edc" - ], - "tmScope": "source.json", - "aceMode": "json", - "codemirrorMode": "javascript", - "codemirrorMimeType": "application/json", - "languageId": 342840478 - }, - "Eiffel": { - "type": "programming", - "color": "#946d57", - "extensions": [ - ".e" - ], - "aceMode": "eiffel", - "codemirrorMode": "eiffel", - "codemirrorMimeType": "text/x-eiffel", - "languageId": 99 - }, - "Elixir": { - "type": "programming", - "color": "#6e4a7e", - "extensions": [ - ".ex", - ".exs" - ], - "aceMode": "elixir", - "filenames": [ - "mix.lock" - ], - "interpreters": [ - "elixir" - ], - "languageId": 100 - }, - "Elm": { - "type": "programming", - "color": "#60B5CC", - "extensions": [ - ".elm" - ], - "tmScope": "source.elm", - "aceMode": "elm", - "codemirrorMode": "elm", - "codemirrorMimeType": "text/x-elm", - "languageId": 101 - }, - "Emacs Lisp": { - "type": "programming", - "tmScope": "source.emacs.lisp", - "color": "#c065db", - "aliases": [ - "elisp", - "emacs" - ], - "filenames": [ - ".abbrev_defs", - ".emacs", - ".emacs.desktop", - ".gnus", - ".spacemacs", - ".viper", - "Cask", - "Project.ede", - "_emacs", - "abbrev_defs" - ], - "extensions": [ - ".el", - ".emacs", - ".emacs.desktop" - ], - "aceMode": "lisp", - "codemirrorMode": "commonlisp", - "codemirrorMimeType": "text/x-common-lisp", - "languageId": 102 - }, - "EmberScript": { - "type": "programming", - "color": "#FFF4F3", - "extensions": [ - ".em", - ".emberscript" - ], - "tmScope": "source.coffee", - "aceMode": "coffee", - "codemirrorMode": "coffeescript", - "codemirrorMimeType": "text/x-coffeescript", - "languageId": 103 - }, - "Erlang": { - "type": "programming", - "color": "#B83998", - "extensions": [ - ".erl", - ".app.src", - ".es", - ".escript", - ".hrl", - ".xrl", - ".yrl" - ], - "filenames": [ - "Emakefile", - "rebar.config", - "rebar.config.lock", - "rebar.lock" - ], - "aceMode": "erlang", - "codemirrorMode": "erlang", - "codemirrorMimeType": "text/x-erlang", - "interpreters": [ - "escript" - ], - "languageId": 104 - }, - "F#": { - "type": "programming", - "color": "#b845fc", - "aliases": [ - "fsharp" - ], - "extensions": [ - ".fs", - ".fsi", - ".fsx" - ], - "tmScope": "source.fsharp", - "aceMode": "text", - "codemirrorMode": "mllike", - "codemirrorMimeType": "text/x-fsharp", - "languageId": 105 - }, - "F*": { - "type": "programming", - "color": "#572e30", - "aliases": [ - "fstar" - ], - "extensions": [ - ".fst" - ], - "tmScope": "source.fstar", - "aceMode": "text", - "languageId": 336943375 - }, - "FIGlet Font": { - "type": "data", - "aliases": [ - "FIGfont" - ], - "extensions": [ - ".flf" - ], - "tmScope": "source.figfont", - "aceMode": "text", - "languageId": 686129783 - }, - "FLUX": { - "type": "programming", - "color": "#88ccff", - "extensions": [ - ".fx", - ".flux" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 106 - }, - "Factor": { - "type": "programming", - "color": "#636746", - "extensions": [ - ".factor" - ], - "filenames": [ - ".factor-boot-rc", - ".factor-rc" - ], - "aceMode": "text", - "codemirrorMode": "factor", - "codemirrorMimeType": "text/x-factor", - "languageId": 108 - }, - "Fancy": { - "type": "programming", - "color": "#7b9db4", - "extensions": [ - ".fy", - ".fancypack" - ], - "filenames": [ - "Fakefile" - ], - "aceMode": "text", - "languageId": 109 - }, - "Fantom": { - "type": "programming", - "color": "#14253c", - "extensions": [ - ".fan" - ], - "tmScope": "source.fan", - "aceMode": "text", - "languageId": 110 - }, - "Filebench WML": { - "type": "programming", - "extensions": [ - ".f" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 111 - }, - "Filterscript": { - "type": "programming", - "group": "RenderScript", - "extensions": [ - ".fs" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 112 - }, - "Formatted": { - "type": "data", - "extensions": [ - ".for", - ".eam.fs" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 113 - }, - "Forth": { - "type": "programming", - "color": "#341708", - "extensions": [ - ".fth", - ".4th", - ".f", - ".for", - ".forth", - ".fr", - ".frt", - ".fs" - ], - "aceMode": "forth", - "codemirrorMode": "forth", - "codemirrorMimeType": "text/x-forth", - "languageId": 114 - }, - "Fortran": { - "type": "programming", - "color": "#4d41b1", - "extensions": [ - ".f90", - ".f", - ".f03", - ".f08", - ".f77", - ".f95", - ".for", - ".fpp" - ], - "tmScope": "source.fortran.modern", - "aceMode": "text", - "codemirrorMode": "fortran", - "codemirrorMimeType": "text/x-fortran", - "languageId": 107 - }, - "FreeMarker": { - "type": "programming", - "color": "#0050b2", - "aliases": [ - "ftl" - ], - "extensions": [ - ".ftl" - ], - "tmScope": "text.html.ftl", - "aceMode": "ftl", - "languageId": 115 - }, - "Frege": { - "type": "programming", - "color": "#00cafe", - "extensions": [ - ".fr" - ], - "tmScope": "source.haskell", - "aceMode": "haskell", - "languageId": 116 - }, - "G-code": { - "type": "data", - "extensions": [ - ".g", - ".gco", - ".gcode" - ], - "tmScope": "source.gcode", - "aceMode": "gcode", - "languageId": 117 - }, - "GAMS": { - "type": "programming", - "extensions": [ - ".gms" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 118 - }, - "GAP": { - "type": "programming", - "extensions": [ - ".g", - ".gap", - ".gd", - ".gi", - ".tst" - ], - "tmScope": "source.gap", - "aceMode": "text", - "languageId": 119 - }, - "GCC Machine Description": { - "type": "programming", - "extensions": [ - ".md" - ], - "tmScope": "source.lisp", - "aceMode": "lisp", - "codemirrorMode": "commonlisp", - "codemirrorMimeType": "text/x-common-lisp", - "languageId": 121 - }, - "GDB": { - "type": "programming", - "extensions": [ - ".gdb", - ".gdbinit" - ], - "tmScope": "source.gdb", - "aceMode": "text", - "languageId": 122 - }, - "GDScript": { - "type": "programming", - "color": "#355570", - "extensions": [ - ".gd" - ], - "tmScope": "source.gdscript", - "aceMode": "text", - "languageId": 123 - }, - "GLSL": { - "type": "programming", - "extensions": [ - ".glsl", - ".fp", - ".frag", - ".frg", - ".fs", - ".fsh", - ".fshader", - ".geo", - ".geom", - ".glslv", - ".gshader", - ".shader", - ".tesc", - ".tese", - ".vert", - ".vrx", - ".vsh", - ".vshader" - ], - "aceMode": "glsl", - "languageId": 124 - }, - "GN": { - "type": "data", - "extensions": [ - ".gn", - ".gni" - ], - "interpreters": [ - "gn" - ], - "filenames": [ - ".gn" - ], - "tmScope": "source.gn", - "aceMode": "python", - "codemirrorMode": "python", - "codemirrorMimeType": "text/x-python", - "languageId": 302957008 - }, - "Game Maker Language": { - "type": "programming", - "color": "#71b417", - "extensions": [ - ".gml" - ], - "tmScope": "source.c++", - "aceMode": "c_cpp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-c++src", - "languageId": 125 - }, - "Genie": { - "type": "programming", - "aceMode": "text", - "extensions": [ - ".gs" - ], - "color": "#fb855d", - "tmScope": "none", - "languageId": 792408528 - }, - "Genshi": { - "type": "programming", - "extensions": [ - ".kid" - ], - "tmScope": "text.xml.genshi", - "aliases": [ - "xml+genshi", - "xml+kid" - ], - "aceMode": "xml", - "codemirrorMode": "xml", - "codemirrorMimeType": "text/xml", - "languageId": 126 - }, - "Gentoo Ebuild": { - "type": "programming", - "group": "Shell", - "extensions": [ - ".ebuild" - ], - "tmScope": "source.shell", - "aceMode": "sh", - "codemirrorMode": "shell", - "codemirrorMimeType": "text/x-sh", - "languageId": 127 - }, - "Gentoo Eclass": { - "type": "programming", - "group": "Shell", - "extensions": [ - ".eclass" - ], - "tmScope": "source.shell", - "aceMode": "sh", - "codemirrorMode": "shell", - "codemirrorMimeType": "text/x-sh", - "languageId": 128 - }, - "Gerber Image": { - "type": "data", - "aliases": [ - "rs-274x" - ], - "extensions": [ - ".gbr", - ".gbl", - ".gbo", - ".gbp", - ".gbs", - ".gko", - ".gpb", - ".gpt", - ".gtl", - ".gto", - ".gtp", - ".gts" - ], - "interpreters": [ - "gerbv", - "gerbview" - ], - "tmScope": "source.gerber", - "aceMode": "text", - "languageId": 404627610 - }, - "Gettext Catalog": { - "type": "prose", - "searchable": false, - "aliases": [ - "pot" - ], - "extensions": [ - ".po", - ".pot" - ], - "tmScope": "source.po", - "aceMode": "text", - "languageId": 129 - }, - "Gherkin": { - "type": "programming", - "extensions": [ - ".feature" - ], - "tmScope": "text.gherkin.feature", - "aliases": [ - "cucumber" - ], - "aceMode": "text", - "color": "#5B2063", - "languageId": 76 - }, - "Glyph": { - "type": "programming", - "color": "#c1ac7f", - "extensions": [ - ".glf" - ], - "tmScope": "source.tcl", - "aceMode": "tcl", - "codemirrorMode": "tcl", - "codemirrorMimeType": "text/x-tcl", - "languageId": 130 - }, - "Glyph Bitmap Distribution Format": { - "type": "data", - "extensions": [ - ".bdf" - ], - "tmScope": "source.bdf", - "aceMode": "text", - "languageId": 997665271 - }, - "Gnuplot": { - "type": "programming", - "color": "#f0a9f0", - "extensions": [ - ".gp", - ".gnu", - ".gnuplot", - ".plot", - ".plt" - ], - "interpreters": [ - "gnuplot" - ], - "aceMode": "text", - "languageId": 131 - }, - "Go": { - "type": "programming", - "color": "#375eab", - "aliases": [ - "golang" - ], - "extensions": [ - ".go" - ], - "aceMode": "golang", - "codemirrorMode": "go", - "codemirrorMimeType": "text/x-go", - "languageId": 132 - }, - "Golo": { - "type": "programming", - "color": "#88562A", - "extensions": [ - ".golo" - ], - "tmScope": "source.golo", - "aceMode": "text", - "languageId": 133 - }, - "Gosu": { - "type": "programming", - "color": "#82937f", - "extensions": [ - ".gs", - ".gst", - ".gsx", - ".vark" - ], - "tmScope": "source.gosu.2", - "aceMode": "text", - "languageId": 134 - }, - "Grace": { - "type": "programming", - "extensions": [ - ".grace" - ], - "tmScope": "source.grace", - "aceMode": "text", - "languageId": 135 - }, - "Gradle": { - "type": "data", - "extensions": [ - ".gradle" - ], - "tmScope": "source.groovy.gradle", - "aceMode": "text", - "languageId": 136 - }, - "Grammatical Framework": { - "type": "programming", - "aliases": [ - "gf" - ], - "wrap": false, - "extensions": [ - ".gf" - ], - "searchable": true, - "color": "#79aa7a", - "tmScope": "source.haskell", - "aceMode": "haskell", - "codemirrorMode": "haskell", - "codemirrorMimeType": "text/x-haskell", - "languageId": 137 - }, - "Graph Modeling Language": { - "type": "data", - "extensions": [ - ".gml" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 138 - }, - "GraphQL": { - "type": "data", - "extensions": [ - ".graphql", - ".gql" - ], - "tmScope": "source.graphql", - "aceMode": "text", - "languageId": 139 - }, - "Graphviz (DOT)": { - "type": "data", - "tmScope": "source.dot", - "extensions": [ - ".dot", - ".gv" - ], - "aceMode": "text", - "languageId": 140 - }, - "Groovy": { - "type": "programming", - "aceMode": "groovy", - "codemirrorMode": "groovy", - "codemirrorMimeType": "text/x-groovy", - "color": "#e69f56", - "extensions": [ - ".groovy", - ".grt", - ".gtpl", - ".gvy" - ], - "interpreters": [ - "groovy" - ], - "filenames": [ - "Jenkinsfile" - ], - "languageId": 142 - }, - "Groovy Server Pages": { - "type": "programming", - "group": "Groovy", - "aliases": [ - "gsp", - "java server page" - ], - "extensions": [ - ".gsp" - ], - "tmScope": "text.html.jsp", - "aceMode": "jsp", - "codemirrorMode": "htmlembedded", - "codemirrorMimeType": "application/x-jsp", - "languageId": 143 - }, - "HCL": { - "type": "programming", - "extensions": [ - ".hcl", - ".tf", - ".tfvars" - ], - "aceMode": "ruby", - "codemirrorMode": "ruby", - "codemirrorMimeType": "text/x-ruby", - "tmScope": "source.terraform", - "languageId": 144 - }, - "HLSL": { - "type": "programming", - "extensions": [ - ".hlsl", - ".cginc", - ".fx", - ".fxh", - ".hlsli" - ], - "aceMode": "text", - "tmScope": "source.hlsl", - "languageId": 145 - }, - "HTML": { - "type": "markup", - "tmScope": "text.html.basic", - "aceMode": "html", - "codemirrorMode": "htmlmixed", - "codemirrorMimeType": "text/html", - "color": "#e34c26", - "aliases": [ - "xhtml" - ], - "extensions": [ - ".html", - ".htm", - ".html.hl", - ".inc", - ".st", - ".xht", - ".xhtml" - ], - "languageId": 146 - }, - "HTML+Django": { - "type": "markup", - "tmScope": "text.html.django", - "group": "HTML", - "extensions": [ - ".jinja", - ".jinja2", - ".mustache", - ".njk" - ], - "aliases": [ - "django", - "html+django/jinja", - "html+jinja", - "htmldjango", - "njk", - "nunjucks" - ], - "aceMode": "django", - "codemirrorMode": "django", - "codemirrorMimeType": "text/x-django", - "languageId": 147 - }, - "HTML+ECR": { - "type": "markup", - "tmScope": "text.html.ecr", - "group": "HTML", - "aliases": [ - "ecr" - ], - "extensions": [ - ".ecr" - ], - "aceMode": "text", - "codemirrorMode": "htmlmixed", - "codemirrorMimeType": "text/html", - "languageId": 148 - }, - "HTML+EEX": { - "type": "markup", - "tmScope": "text.html.elixir", - "group": "HTML", - "aliases": [ - "eex" - ], - "extensions": [ - ".eex" - ], - "aceMode": "text", - "codemirrorMode": "htmlmixed", - "codemirrorMimeType": "text/html", - "languageId": 149 - }, - "HTML+ERB": { - "type": "markup", - "tmScope": "text.html.erb", - "group": "HTML", - "aliases": [ - "erb" - ], - "extensions": [ - ".erb", - ".erb.deface" - ], - "aceMode": "text", - "codemirrorMode": "htmlembedded", - "codemirrorMimeType": "application/x-erb", - "languageId": 150 - }, - "HTML+PHP": { - "type": "markup", - "tmScope": "text.html.php", - "group": "HTML", - "extensions": [ - ".phtml" - ], - "aceMode": "php", - "codemirrorMode": "php", - "codemirrorMimeType": "application/x-httpd-php", - "languageId": 151 - }, - "HTTP": { - "type": "data", - "extensions": [ - ".http" - ], - "tmScope": "source.httpspec", - "aceMode": "text", - "codemirrorMode": "http", - "codemirrorMimeType": "message/http", - "languageId": 152 - }, - "HXML": { - "type": "data", - "aceMode": "text", - "extensions": [ - ".hxml" - ], - "tmScope": "source.hxml", - "languageId": 786683730 - }, - "Hack": { - "type": "programming", - "aceMode": "php", - "codemirrorMode": "php", - "codemirrorMimeType": "application/x-httpd-php", - "extensions": [ - ".hh", - ".php" - ], - "tmScope": "text.html.php", - "color": "#878787", - "languageId": 153 - }, - "Haml": { - "group": "HTML", - "type": "markup", - "extensions": [ - ".haml", - ".haml.deface" - ], - "aceMode": "haml", - "codemirrorMode": "haml", - "codemirrorMimeType": "text/x-haml", - "languageId": 154 - }, - "Handlebars": { - "type": "markup", - "group": "HTML", - "aliases": [ - "hbs", - "htmlbars" - ], - "extensions": [ - ".handlebars", - ".hbs" - ], - "tmScope": "text.html.handlebars", - "aceMode": "handlebars", - "languageId": 155 - }, - "Harbour": { - "type": "programming", - "color": "#0e60e3", - "extensions": [ - ".hb" - ], - "tmScope": "source.harbour", - "aceMode": "text", - "languageId": 156 - }, - "Haskell": { - "type": "programming", - "color": "#5e5086", - "extensions": [ - ".hs", - ".hsc" - ], - "interpreters": [ - "runhaskell" - ], - "aceMode": "haskell", - "codemirrorMode": "haskell", - "codemirrorMimeType": "text/x-haskell", - "languageId": 157 - }, - "Haxe": { - "type": "programming", - "aceMode": "haxe", - "codemirrorMode": "haxe", - "codemirrorMimeType": "text/x-haxe", - "color": "#df7900", - "extensions": [ - ".hx", - ".hxsl" - ], - "tmScope": "source.hx", - "languageId": 158 - }, - "HiveQL": { - "type": "programming", - "extensions": [ - ".q" - ], - "color": "#dce200", - "tmScope": "source.hql", - "aceMode": "sql", - "languageId": 931814087 - }, - "Hy": { - "type": "programming", - "aceMode": "text", - "color": "#7790B2", - "extensions": [ - ".hy" - ], - "interpreters": [ - "hy" - ], - "aliases": [ - "hylang" - ], - "tmScope": "source.hy", - "languageId": 159 - }, - "HyPhy": { - "type": "programming", - "aceMode": "text", - "extensions": [ - ".bf" - ], - "tmScope": "none", - "languageId": 160 - }, - "IDL": { - "type": "programming", - "color": "#a3522f", - "extensions": [ - ".pro", - ".dlm" - ], - "aceMode": "text", - "codemirrorMode": "idl", - "codemirrorMimeType": "text/x-idl", - "languageId": 161 - }, - "IGOR Pro": { - "type": "programming", - "extensions": [ - ".ipf" - ], - "aliases": [ - "igor", - "igorpro" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 162 - }, - "INI": { - "type": "data", - "extensions": [ - ".ini", - ".cfg", - ".lektorproject", - ".prefs", - ".pro", - ".properties" - ], - "filenames": [ - ".editorconfig", - ".gitconfig", - "buildozer.spec" - ], - "tmScope": "source.ini", - "aliases": [ - "dosini" - ], - "aceMode": "ini", - "codemirrorMode": "properties", - "codemirrorMimeType": "text/x-properties", - "languageId": 163 - }, - "IRC log": { - "type": "data", - "aliases": [ - "irc", - "irc logs" - ], - "extensions": [ - ".irclog", - ".weechatlog" - ], - "tmScope": "none", - "aceMode": "text", - "codemirrorMode": "mirc", - "codemirrorMimeType": "text/mirc", - "languageId": 164 - }, - "Idris": { - "type": "programming", - "color": "#b30000", - "extensions": [ - ".idr", - ".lidr" - ], - "aceMode": "text", - "tmScope": "source.idris", - "languageId": 165 - }, - "Inform 7": { - "type": "programming", - "wrap": true, - "extensions": [ - ".ni", - ".i7x" - ], - "tmScope": "source.inform7", - "aliases": [ - "i7", - "inform7" - ], - "aceMode": "text", - "languageId": 166 - }, - "Inno Setup": { - "type": "programming", - "extensions": [ - ".iss" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 167 - }, - "Io": { - "type": "programming", - "color": "#a9188d", - "extensions": [ - ".io" - ], - "interpreters": [ - "io" - ], - "aceMode": "io", - "languageId": 168 - }, - "Ioke": { - "type": "programming", - "color": "#078193", - "extensions": [ - ".ik" - ], - "interpreters": [ - "ioke" - ], - "aceMode": "text", - "languageId": 169 - }, - "Isabelle": { - "type": "programming", - "color": "#FEFE00", - "extensions": [ - ".thy" - ], - "tmScope": "source.isabelle.theory", - "aceMode": "text", - "languageId": 170 - }, - "Isabelle ROOT": { - "type": "programming", - "group": "Isabelle", - "filenames": [ - "ROOT" - ], - "tmScope": "source.isabelle.root", - "aceMode": "text", - "languageId": 171 - }, - "J": { - "type": "programming", - "color": "#9EEDFF", - "extensions": [ - ".ijs" - ], - "interpreters": [ - "jconsole" - ], - "tmScope": "source.j", - "aceMode": "text", - "languageId": 172 - }, - "JFlex": { - "type": "programming", - "group": "Lex", - "extensions": [ - ".flex", - ".jflex" - ], - "tmScope": "source.jflex", - "aceMode": "text", - "languageId": 173 - }, - "JSON": { - "type": "data", - "tmScope": "source.json", - "group": "JavaScript", - "aceMode": "json", - "codemirrorMode": "javascript", - "codemirrorMimeType": "application/json", - "searchable": false, - "extensions": [ - ".json", - ".avsc", - ".geojson", - ".gltf", - ".JSON-tmLanguage", - ".jsonl", - ".tfstate", - ".tfstate.backup", - ".topojson", - ".webapp", - ".webmanifest", - ".yy", - ".yyp" - ], - "filenames": [ - ".arcconfig", - ".htmlhintrc", - ".tern-config", - ".tern-project", - "composer.lock", - "mcmod.info" - ], - "languageId": 174 - }, - "JSON with Comments": { - "type": "data", - "group": "JSON", - "tmScope": "source.js", - "aceMode": "javascript", - "codemirrorMode": "javascript", - "codemirrorMimeType": "text/javascript", - "aliases": [ - "jsonc" - ], - "extensions": [ - ".sublime-build", - ".sublime-commands", - ".sublime-completions", - ".sublime-keymap", - ".sublime-macro", - ".sublime-menu", - ".sublime-mousemap", - ".sublime-project", - ".sublime-settings", - ".sublime-theme", - ".sublime-workspace", - ".sublime_metrics", - ".sublime_session" - ], - "filenames": [ - ".babelrc", - ".eslintrc.json", - ".jscsrc", - ".jshintrc", - ".jslintrc", - "tsconfig.json" - ], - "languageId": 423 - }, - "JSON5": { - "type": "data", - "extensions": [ - ".json5" - ], - "tmScope": "source.js", - "aceMode": "javascript", - "codemirrorMode": "javascript", - "codemirrorMimeType": "application/json", - "languageId": 175 - }, - "JSONLD": { - "type": "data", - "group": "JavaScript", - "aceMode": "javascript", - "extensions": [ - ".jsonld" - ], - "tmScope": "source.js", - "languageId": 176 - }, - "JSONiq": { - "color": "#40d47e", - "type": "programming", - "aceMode": "jsoniq", - "codemirrorMode": "javascript", - "codemirrorMimeType": "application/json", - "extensions": [ - ".jq" - ], - "tmScope": "source.jq", - "languageId": 177 - }, - "JSX": { - "type": "programming", - "group": "JavaScript", - "extensions": [ - ".jsx" - ], - "tmScope": "source.js.jsx", - "aceMode": "javascript", - "codemirrorMode": "jsx", - "codemirrorMimeType": "text/jsx", - "languageId": 178 - }, - "Jasmin": { - "type": "programming", - "aceMode": "java", - "extensions": [ - ".j" - ], - "tmScope": "source.jasmin", - "languageId": 180 - }, - "Java": { - "type": "programming", - "aceMode": "java", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-java", - "color": "#b07219", - "extensions": [ - ".java" - ], - "languageId": 181 - }, - "Java Properties": { - "type": "data", - "extensions": [ - ".properties" - ], - "tmScope": "source.java-properties", - "aceMode": "properties", - "codemirrorMode": "properties", - "codemirrorMimeType": "text/x-properties", - "languageId": 519377561 - }, - "Java Server Pages": { - "type": "programming", - "group": "Java", - "aliases": [ - "jsp" - ], - "extensions": [ - ".jsp" - ], - "tmScope": "text.html.jsp", - "aceMode": "jsp", - "codemirrorMode": "htmlembedded", - "codemirrorMimeType": "application/x-jsp", - "languageId": 182 - }, - "JavaScript": { - "type": "programming", - "tmScope": "source.js", - "aceMode": "javascript", - "codemirrorMode": "javascript", - "codemirrorMimeType": "text/javascript", - "color": "#f1e05a", - "aliases": [ - "js", - "node" - ], - "extensions": [ - ".js", - "._js", - ".bones", - ".es", - ".es6", - ".frag", - ".gs", - ".jake", - ".jsb", - ".jscad", - ".jsfl", - ".jsm", - ".jss", - ".mjs", - ".njs", - ".pac", - ".sjs", - ".ssjs", - ".xsjs", - ".xsjslib" - ], - "filenames": [ - "Jakefile" - ], - "interpreters": [ - "node" - ], - "languageId": 183 - }, - "Jison": { - "type": "programming", - "group": "Yacc", - "extensions": [ - ".jison" - ], - "tmScope": "source.jison", - "aceMode": "text", - "languageId": 284531423 - }, - "Jison Lex": { - "type": "programming", - "group": "Lex", - "extensions": [ - ".jisonlex" - ], - "tmScope": "source.jisonlex", - "aceMode": "text", - "languageId": 406395330 - }, - "Jolie": { - "type": "programming", - "extensions": [ - ".ol", - ".iol" - ], - "interpreters": [ - "jolie" - ], - "color": "#843179", - "aceMode": "text", - "tmScope": "source.jolie", - "languageId": 998078858 - }, - "Julia": { - "type": "programming", - "extensions": [ - ".jl" - ], - "interpreters": [ - "julia" - ], - "color": "#a270ba", - "aceMode": "julia", - "codemirrorMode": "julia", - "codemirrorMimeType": "text/x-julia", - "languageId": 184 - }, - "Jupyter Notebook": { - "type": "markup", - "aceMode": "json", - "codemirrorMode": "javascript", - "codemirrorMimeType": "application/json", - "tmScope": "source.json", - "color": "#DA5B0B", - "extensions": [ - ".ipynb" - ], - "filenames": [ - "Notebook" - ], - "aliases": [ - "IPython Notebook" - ], - "languageId": 185 - }, - "KRL": { - "type": "programming", - "color": "#28430A", - "extensions": [ - ".krl" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 186 - }, - "KiCad Layout": { - "type": "data", - "aliases": [ - "pcbnew" - ], - "extensions": [ - ".kicad_pcb", - ".kicad_mod", - ".kicad_wks" - ], - "filenames": [ - "fp-lib-table" - ], - "tmScope": "source.pcb.sexp", - "aceMode": "lisp", - "codemirrorMode": "commonlisp", - "codemirrorMimeType": "text/x-common-lisp", - "languageId": 187 - }, - "KiCad Legacy Layout": { - "type": "data", - "extensions": [ - ".brd" - ], - "tmScope": "source.pcb.board", - "aceMode": "text", - "languageId": 140848857 - }, - "KiCad Schematic": { - "type": "data", - "aliases": [ - "eeschema schematic" - ], - "extensions": [ - ".sch" - ], - "tmScope": "source.pcb.schematic", - "aceMode": "text", - "languageId": 622447435 - }, - "Kit": { - "type": "markup", - "aceMode": "html", - "codemirrorMode": "htmlmixed", - "codemirrorMimeType": "text/html", - "extensions": [ - ".kit" - ], - "tmScope": "text.html.basic", - "languageId": 188 - }, - "Kotlin": { - "type": "programming", - "color": "#F18E33", - "extensions": [ - ".kt", - ".ktm", - ".kts" - ], - "tmScope": "source.kotlin", - "aceMode": "text", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-kotlin", - "languageId": 189 - }, - "LFE": { - "type": "programming", - "color": "#4C3023", - "extensions": [ - ".lfe" - ], - "tmScope": "source.lisp", - "aceMode": "lisp", - "codemirrorMode": "commonlisp", - "codemirrorMimeType": "text/x-common-lisp", - "languageId": 190 - }, - "LLVM": { - "type": "programming", - "extensions": [ - ".ll" - ], - "aceMode": "text", - "color": "#185619", - "languageId": 191 - }, - "LOLCODE": { - "type": "programming", - "extensions": [ - ".lol" - ], - "color": "#cc9900", - "tmScope": "none", - "aceMode": "text", - "languageId": 192 - }, - "LSL": { - "type": "programming", - "aceMode": "lsl", - "extensions": [ - ".lsl", - ".lslp" - ], - "interpreters": [ - "lsl" - ], - "color": "#3d9970", - "languageId": 193 - }, - "LabVIEW": { - "type": "programming", - "extensions": [ - ".lvproj" - ], - "tmScope": "text.xml", - "aceMode": "xml", - "codemirrorMode": "xml", - "codemirrorMimeType": "text/xml", - "languageId": 194 - }, - "Lasso": { - "type": "programming", - "color": "#999999", - "extensions": [ - ".lasso", - ".las", - ".lasso8", - ".lasso9", - ".ldml" - ], - "tmScope": "file.lasso", - "aliases": [ - "lassoscript" - ], - "aceMode": "text", - "languageId": 195 - }, - "Latte": { - "type": "markup", - "group": "HTML", - "extensions": [ - ".latte" - ], - "tmScope": "text.html.smarty", - "aceMode": "smarty", - "codemirrorMode": "smarty", - "codemirrorMimeType": "text/x-smarty", - "languageId": 196 - }, - "Lean": { - "type": "programming", - "extensions": [ - ".lean", - ".hlean" - ], - "aceMode": "text", - "languageId": 197 - }, - "Less": { - "type": "markup", - "group": "CSS", - "extensions": [ - ".less" - ], - "tmScope": "source.css.less", - "aceMode": "less", - "codemirrorMode": "css", - "codemirrorMimeType": "text/css", - "languageId": 198 - }, - "Lex": { - "type": "programming", - "color": "#DBCA00", - "aliases": [ - "flex" - ], - "extensions": [ - ".l", - ".lex" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 199 - }, - "LilyPond": { - "type": "programming", - "extensions": [ - ".ly", - ".ily" - ], - "aceMode": "text", - "languageId": 200 - }, - "Limbo": { - "type": "programming", - "extensions": [ - ".b", - ".m" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 201 - }, - "Linker Script": { - "type": "data", - "extensions": [ - ".ld", - ".lds", - ".x" - ], - "filenames": [ - "ld.script" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 202 - }, - "Linux Kernel Module": { - "type": "data", - "extensions": [ - ".mod" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 203 - }, - "Liquid": { - "type": "markup", - "extensions": [ - ".liquid" - ], - "tmScope": "text.html.liquid", - "aceMode": "liquid", - "languageId": 204 - }, - "Literate Agda": { - "type": "programming", - "group": "Agda", - "extensions": [ - ".lagda" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 205 - }, - "Literate CoffeeScript": { - "type": "programming", - "tmScope": "source.litcoffee", - "group": "CoffeeScript", - "aceMode": "text", - "wrap": true, - "aliases": [ - "litcoffee" - ], - "extensions": [ - ".litcoffee" - ], - "languageId": 206 - }, - "Literate Haskell": { - "type": "programming", - "group": "Haskell", - "aliases": [ - "lhaskell", - "lhs" - ], - "extensions": [ - ".lhs" - ], - "tmScope": "text.tex.latex.haskell", - "aceMode": "text", - "codemirrorMode": "haskell-literate", - "codemirrorMimeType": "text/x-literate-haskell", - "languageId": 207 - }, - "LiveScript": { - "type": "programming", - "color": "#499886", - "aliases": [ - "live-script", - "ls" - ], - "extensions": [ - ".ls", - "._ls" - ], - "filenames": [ - "Slakefile" - ], - "aceMode": "livescript", - "codemirrorMode": "livescript", - "codemirrorMimeType": "text/x-livescript", - "languageId": 208 - }, - "Logos": { - "type": "programming", - "extensions": [ - ".xm", - ".x", - ".xi" - ], - "aceMode": "text", - "tmScope": "source.logos", - "languageId": 209 - }, - "Logtalk": { - "type": "programming", - "extensions": [ - ".lgt", - ".logtalk" - ], - "aceMode": "text", - "languageId": 210 - }, - "LookML": { - "type": "programming", - "aceMode": "yaml", - "codemirrorMode": "yaml", - "codemirrorMimeType": "text/x-yaml", - "color": "#652B81", - "extensions": [ - ".lookml", - ".model.lkml", - ".view.lkml" - ], - "tmScope": "source.yaml", - "languageId": 211 - }, - "LoomScript": { - "type": "programming", - "extensions": [ - ".ls" - ], - "tmScope": "source.loomscript", - "aceMode": "text", - "languageId": 212 - }, - "Lua": { - "type": "programming", - "aceMode": "lua", - "codemirrorMode": "lua", - "codemirrorMimeType": "text/x-lua", - "color": "#000080", - "extensions": [ - ".lua", - ".fcgi", - ".nse", - ".p8", - ".pd_lua", - ".rbxs", - ".wlua" - ], - "interpreters": [ - "lua" - ], - "languageId": 213 - }, - "M": { - "type": "programming", - "aliases": [ - "mumps" - ], - "extensions": [ - ".mumps", - ".m" - ], - "aceMode": "text", - "codemirrorMode": "mumps", - "codemirrorMimeType": "text/x-mumps", - "languageId": 214, - "tmScope": "none" - }, - "M4": { - "type": "programming", - "extensions": [ - ".m4" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 215 - }, - "M4Sugar": { - "type": "programming", - "group": "M4", - "aliases": [ - "autoconf" - ], - "extensions": [ - ".m4" - ], - "filenames": [ - "configure.ac" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 216 - }, - "MAXScript": { - "type": "programming", - "color": "#00a6a6", - "extensions": [ - ".ms", - ".mcr" - ], - "tmScope": "source.maxscript", - "aceMode": "text", - "languageId": 217 - }, - "MQL4": { - "type": "programming", - "color": "#62A8D6", - "extensions": [ - ".mq4", - ".mqh" - ], - "tmScope": "source.mql5", - "aceMode": "c_cpp", - "languageId": 426 - }, - "MQL5": { - "type": "programming", - "color": "#4A76B8", - "extensions": [ - ".mq5", - ".mqh" - ], - "tmScope": "source.mql5", - "aceMode": "c_cpp", - "languageId": 427 - }, - "MTML": { - "type": "markup", - "color": "#b7e1f4", - "extensions": [ - ".mtml" - ], - "tmScope": "text.html.basic", - "aceMode": "html", - "codemirrorMode": "htmlmixed", - "codemirrorMimeType": "text/html", - "languageId": 218 - }, - "MUF": { - "type": "programming", - "group": "Forth", - "extensions": [ - ".muf", - ".m" - ], - "tmScope": "none", - "aceMode": "forth", - "codemirrorMode": "forth", - "codemirrorMimeType": "text/x-forth", - "languageId": 219 - }, - "Makefile": { - "type": "programming", - "color": "#427819", - "aliases": [ - "bsdmake", - "make", - "mf" - ], - "extensions": [ - ".mak", - ".d", - ".make", - ".mk", - ".mkfile" - ], - "filenames": [ - "BSDmakefile", - "GNUmakefile", - "Kbuild", - "Makefile", - "Makefile.am", - "Makefile.boot", - "Makefile.frag", - "Makefile.in", - "Makefile.inc", - "Makefile.wat", - "makefile", - "makefile.sco", - "mkfile" - ], - "interpreters": [ - "make" - ], - "aceMode": "makefile", - "codemirrorMode": "cmake", - "codemirrorMimeType": "text/x-cmake", - "languageId": 220 - }, - "Mako": { - "type": "programming", - "extensions": [ - ".mako", - ".mao" - ], - "tmScope": "text.html.mako", - "aceMode": "text", - "languageId": 221 - }, - "Markdown": { - "type": "prose", - "aliases": [ - "pandoc" - ], - "aceMode": "markdown", - "codemirrorMode": "gfm", - "codemirrorMimeType": "text/x-gfm", - "wrap": true, - "extensions": [ - ".md", - ".markdown", - ".mdown", - ".mdwn", - ".mkd", - ".mkdn", - ".mkdown", - ".ronn", - ".workbook" - ], - "filenames": [ - "contents.lr" - ], - "tmScope": "source.gfm", - "languageId": 222 - }, - "Marko": { - "group": "HTML", - "type": "markup", - "tmScope": "text.marko", - "extensions": [ - ".marko" - ], - "aliases": [ - "markojs" - ], - "aceMode": "text", - "codemirrorMode": "htmlmixed", - "codemirrorMimeType": "text/html", - "languageId": 932782397 - }, - "Mask": { - "type": "markup", - "color": "#f97732", - "aceMode": "mask", - "extensions": [ - ".mask" - ], - "tmScope": "source.mask", - "languageId": 223 - }, - "Mathematica": { - "type": "programming", - "extensions": [ - ".mathematica", - ".cdf", - ".m", - ".ma", - ".mt", - ".nb", - ".nbp", - ".wl", - ".wlt" - ], - "aliases": [ - "mma" - ], - "aceMode": "text", - "codemirrorMode": "mathematica", - "codemirrorMimeType": "text/x-mathematica", - "languageId": 224 - }, - "Matlab": { - "type": "programming", - "color": "#e16737", - "aliases": [ - "octave" - ], - "extensions": [ - ".matlab", - ".m" - ], - "aceMode": "matlab", - "codemirrorMode": "octave", - "codemirrorMimeType": "text/x-octave", - "languageId": 225 - }, - "Maven POM": { - "type": "data", - "tmScope": "text.xml.pom", - "filenames": [ - "pom.xml" - ], - "aceMode": "xml", - "codemirrorMode": "xml", - "codemirrorMimeType": "text/xml", - "languageId": 226 - }, - "Max": { - "type": "programming", - "color": "#c4a79c", - "aliases": [ - "max/msp", - "maxmsp" - ], - "extensions": [ - ".maxpat", - ".maxhelp", - ".maxproj", - ".mxt", - ".pat" - ], - "tmScope": "source.json", - "aceMode": "json", - "codemirrorMode": "javascript", - "codemirrorMimeType": "application/json", - "languageId": 227 - }, - "MediaWiki": { - "type": "prose", - "wrap": true, - "extensions": [ - ".mediawiki", - ".wiki" - ], - "tmScope": "text.html.mediawiki", - "aceMode": "text", - "languageId": 228 - }, - "Mercury": { - "type": "programming", - "color": "#ff2b2b", - "aceMode": "prolog", - "interpreters": [ - "mmi" - ], - "extensions": [ - ".m", - ".moo" - ], - "tmScope": "source.mercury", - "languageId": 229 - }, - "Meson": { - "type": "programming", - "color": "#007800", - "filenames": [ - "meson.build", - "meson_options.txt" - ], - "tmScope": "source.meson", - "aceMode": "text", - "languageId": 799141244 - }, - "Metal": { - "type": "programming", - "color": "#8f14e9", - "extensions": [ - ".metal" - ], - "tmScope": "source.c++", - "aceMode": "c_cpp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-c++src", - "languageId": 230 - }, - "MiniD": { - "type": "programming", - "searchable": false, - "extensions": [ - ".minid" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 231 - }, - "Mirah": { - "type": "programming", - "color": "#c7a938", - "extensions": [ - ".druby", - ".duby", - ".mirah" - ], - "tmScope": "source.ruby", - "aceMode": "ruby", - "codemirrorMode": "ruby", - "codemirrorMimeType": "text/x-ruby", - "languageId": 232 - }, - "Modelica": { - "type": "programming", - "extensions": [ - ".mo" - ], - "tmScope": "source.modelica", - "aceMode": "text", - "codemirrorMode": "modelica", - "codemirrorMimeType": "text/x-modelica", - "languageId": 233 - }, - "Modula-2": { - "type": "programming", - "extensions": [ - ".mod" - ], - "tmScope": "source.modula2", - "aceMode": "text", - "languageId": 234 - }, - "Modula-3": { - "type": "programming", - "extensions": [ - ".i3", - ".ig", - ".m3", - ".mg" - ], - "color": "#223388", - "aceMode": "text", - "tmScope": "source.modula-3", - "languageId": 564743864 - }, - "Module Management System": { - "type": "programming", - "extensions": [ - ".mms", - ".mmk" - ], - "filenames": [ - "descrip.mmk", - "descrip.mms" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 235 - }, - "Monkey": { - "type": "programming", - "extensions": [ - ".monkey", - ".monkey2" - ], - "aceMode": "text", - "tmScope": "source.monkey", - "languageId": 236 - }, - "Moocode": { - "type": "programming", - "extensions": [ - ".moo" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 237 - }, - "MoonScript": { - "type": "programming", - "extensions": [ - ".moon" - ], - "interpreters": [ - "moon" - ], - "aceMode": "text", - "languageId": 238 - }, - "Myghty": { - "type": "programming", - "extensions": [ - ".myt" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 239 - }, - "NCL": { - "type": "programming", - "color": "#28431f", - "extensions": [ - ".ncl" - ], - "tmScope": "source.ncl", - "aceMode": "text", - "languageId": 240 - }, - "NL": { - "type": "data", - "extensions": [ - ".nl" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 241 - }, - "NSIS": { - "type": "programming", - "extensions": [ - ".nsi", - ".nsh" - ], - "aceMode": "text", - "codemirrorMode": "nsis", - "codemirrorMimeType": "text/x-nsis", - "languageId": 242 - }, - "Nearley": { - "type": "programming", - "aceMode": "text", - "color": "#990000", - "extensions": [ - ".ne", - ".nearley" - ], - "tmScope": "source.ne", - "languageId": 521429430 - }, - "Nemerle": { - "type": "programming", - "color": "#3d3c6e", - "extensions": [ - ".n" - ], - "aceMode": "text", - "languageId": 243 - }, - "NetLinx": { - "type": "programming", - "color": "#0aa0ff", - "extensions": [ - ".axs", - ".axi" - ], - "tmScope": "source.netlinx", - "aceMode": "text", - "languageId": 244 - }, - "NetLinx+ERB": { - "type": "programming", - "color": "#747faa", - "extensions": [ - ".axs.erb", - ".axi.erb" - ], - "tmScope": "source.netlinx.erb", - "aceMode": "text", - "languageId": 245 - }, - "NetLogo": { - "type": "programming", - "color": "#ff6375", - "extensions": [ - ".nlogo" - ], - "tmScope": "source.lisp", - "aceMode": "lisp", - "codemirrorMode": "commonlisp", - "codemirrorMimeType": "text/x-common-lisp", - "languageId": 246 - }, - "NewLisp": { - "type": "programming", - "color": "#87AED7", - "extensions": [ - ".nl", - ".lisp", - ".lsp" - ], - "interpreters": [ - "newlisp" - ], - "tmScope": "source.lisp", - "aceMode": "lisp", - "codemirrorMode": "commonlisp", - "codemirrorMimeType": "text/x-common-lisp", - "languageId": 247 - }, - "Nextflow": { - "type": "programming", - "aceMode": "groovy", - "tmScope": "source.nextflow", - "color": "#3ac486", - "extensions": [ - ".nf" - ], - "filenames": [ - "nextflow.config" - ], - "interpreters": [ - "nextflow" - ], - "languageId": 506780613 - }, - "Nginx": { - "type": "data", - "extensions": [ - ".nginxconf", - ".vhost" - ], - "filenames": [ - "nginx.conf" - ], - "tmScope": "source.nginx", - "aliases": [ - "nginx configuration file" - ], - "aceMode": "text", - "codemirrorMode": "nginx", - "codemirrorMimeType": "text/x-nginx-conf", - "languageId": 248 - }, - "Nim": { - "type": "programming", - "color": "#37775b", - "extensions": [ - ".nim", - ".nimrod" - ], - "aceMode": "text", - "tmScope": "source.nim", - "languageId": 249 - }, - "Ninja": { - "type": "data", - "tmScope": "source.ninja", - "extensions": [ - ".ninja" - ], - "aceMode": "text", - "languageId": 250 - }, - "Nit": { - "type": "programming", - "color": "#009917", - "extensions": [ - ".nit" - ], - "tmScope": "source.nit", - "aceMode": "text", - "languageId": 251 - }, - "Nix": { - "type": "programming", - "color": "#7e7eff", - "extensions": [ - ".nix" - ], - "aliases": [ - "nixos" - ], - "tmScope": "source.nix", - "aceMode": "nix", - "languageId": 252 - }, - "Nu": { - "type": "programming", - "color": "#c9df40", - "aliases": [ - "nush" - ], - "extensions": [ - ".nu" - ], - "filenames": [ - "Nukefile" - ], - "tmScope": "source.nu", - "aceMode": "scheme", - "codemirrorMode": "scheme", - "codemirrorMimeType": "text/x-scheme", - "interpreters": [ - "nush" - ], - "languageId": 253 - }, - "NumPy": { - "type": "programming", - "group": "Python", - "extensions": [ - ".numpy", - ".numpyw", - ".numsc" - ], - "tmScope": "none", - "aceMode": "text", - "codemirrorMode": "python", - "codemirrorMimeType": "text/x-python", - "languageId": 254 - }, - "OCaml": { - "type": "programming", - "aceMode": "ocaml", - "codemirrorMode": "mllike", - "codemirrorMimeType": "text/x-ocaml", - "color": "#3be133", - "extensions": [ - ".ml", - ".eliom", - ".eliomi", - ".ml4", - ".mli", - ".mll", - ".mly" - ], - "interpreters": [ - "ocaml", - "ocamlrun", - "ocamlscript" - ], - "tmScope": "source.ocaml", - "languageId": 255 - }, - "ObjDump": { - "type": "data", - "extensions": [ - ".objdump" - ], - "tmScope": "objdump.x86asm", - "aceMode": "assembly_x86", - "languageId": 256 - }, - "Objective-C": { - "type": "programming", - "tmScope": "source.objc", - "color": "#438eff", - "aliases": [ - "obj-c", - "objc", - "objectivec" - ], - "extensions": [ - ".m", - ".h" - ], - "aceMode": "objectivec", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-objectivec", - "languageId": 257 - }, - "Objective-C++": { - "type": "programming", - "tmScope": "source.objc++", - "color": "#6866fb", - "aliases": [ - "obj-c++", - "objc++", - "objectivec++" - ], - "extensions": [ - ".mm" - ], - "aceMode": "objectivec", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-objectivec", - "languageId": 258 - }, - "Objective-J": { - "type": "programming", - "color": "#ff0c5a", - "aliases": [ - "obj-j", - "objectivej", - "objj" - ], - "extensions": [ - ".j", - ".sj" - ], - "tmScope": "source.js.objj", - "aceMode": "text", - "languageId": 259 - }, - "Omgrofl": { - "type": "programming", - "extensions": [ - ".omgrofl" - ], - "color": "#cabbff", - "tmScope": "none", - "aceMode": "text", - "languageId": 260 - }, - "Opa": { - "type": "programming", - "extensions": [ - ".opa" - ], - "aceMode": "text", - "languageId": 261 - }, - "Opal": { - "type": "programming", - "color": "#f7ede0", - "extensions": [ - ".opal" - ], - "tmScope": "source.opal", - "aceMode": "text", - "languageId": 262 - }, - "OpenCL": { - "type": "programming", - "group": "C", - "extensions": [ - ".cl", - ".opencl" - ], - "tmScope": "source.c", - "aceMode": "c_cpp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-csrc", - "languageId": 263 - }, - "OpenEdge ABL": { - "type": "programming", - "aliases": [ - "progress", - "openedge", - "abl" - ], - "extensions": [ - ".p", - ".cls", - ".w" - ], - "tmScope": "source.abl", - "aceMode": "text", - "languageId": 264 - }, - "OpenRC runscript": { - "type": "programming", - "group": "Shell", - "aliases": [ - "openrc" - ], - "interpreters": [ - "openrc-run" - ], - "tmScope": "source.shell", - "aceMode": "sh", - "codemirrorMode": "shell", - "codemirrorMimeType": "text/x-sh", - "languageId": 265 - }, - "OpenSCAD": { - "type": "programming", - "extensions": [ - ".scad" - ], - "tmScope": "source.scad", - "aceMode": "scad", - "languageId": 266 - }, - "OpenType Feature File": { - "type": "data", - "aliases": [ - "AFDKO" - ], - "extensions": [ - ".fea" - ], - "tmScope": "source.opentype", - "aceMode": "text", - "languageId": 374317347 - }, - "Org": { - "type": "prose", - "wrap": true, - "extensions": [ - ".org" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 267 - }, - "Ox": { - "type": "programming", - "extensions": [ - ".ox", - ".oxh", - ".oxo" - ], - "tmScope": "source.ox", - "aceMode": "text", - "languageId": 268 - }, - "Oxygene": { - "type": "programming", - "color": "#cdd0e3", - "extensions": [ - ".oxygene" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 269 - }, - "Oz": { - "type": "programming", - "color": "#fab738", - "extensions": [ - ".oz" - ], - "tmScope": "source.oz", - "aceMode": "text", - "codemirrorMode": "oz", - "codemirrorMimeType": "text/x-oz", - "languageId": 270 - }, - "P4": { - "type": "programming", - "color": "#7055b5", - "extensions": [ - ".p4" - ], - "tmScope": "source.p4", - "aceMode": "text", - "languageId": 348895984 - }, - "PAWN": { - "type": "programming", - "color": "#dbb284", - "extensions": [ - ".pwn", - ".inc" - ], - "tmScope": "source.pawn", - "aceMode": "text", - "languageId": 271 - }, - "PHP": { - "type": "programming", - "tmScope": "text.html.php", - "aceMode": "php", - "codemirrorMode": "php", - "codemirrorMimeType": "application/x-httpd-php", - "color": "#4F5D95", - "extensions": [ - ".php", - ".aw", - ".ctp", - ".fcgi", - ".inc", - ".php3", - ".php4", - ".php5", - ".phps", - ".phpt" - ], - "filenames": [ - ".php", - ".php_cs", - ".php_cs.dist", - "Phakefile" - ], - "interpreters": [ - "php" - ], - "aliases": [ - "inc" - ], - "languageId": 272 - }, - "PLSQL": { - "type": "programming", - "aceMode": "sql", - "codemirrorMode": "sql", - "codemirrorMimeType": "text/x-plsql", - "tmScope": "none", - "color": "#dad8d8", - "extensions": [ - ".pls", - ".bdy", - ".ddl", - ".fnc", - ".pck", - ".pkb", - ".pks", - ".plb", - ".plsql", - ".prc", - ".spc", - ".sql", - ".tpb", - ".tps", - ".trg", - ".vw" - ], - "languageId": 273 - }, - "PLpgSQL": { - "type": "programming", - "aceMode": "pgsql", - "codemirrorMode": "sql", - "codemirrorMimeType": "text/x-sql", - "tmScope": "source.sql", - "extensions": [ - ".sql" - ], - "languageId": 274 - }, - "POV-Ray SDL": { - "type": "programming", - "aliases": [ - "pov-ray", - "povray" - ], - "extensions": [ - ".pov", - ".inc" - ], - "aceMode": "text", - "languageId": 275 - }, - "Pan": { - "type": "programming", - "color": "#cc0000", - "extensions": [ - ".pan" - ], - "tmScope": "source.pan", - "aceMode": "text", - "languageId": 276 - }, - "Papyrus": { - "type": "programming", - "color": "#6600cc", - "extensions": [ - ".psc" - ], - "tmScope": "source.papyrus.skyrim", - "aceMode": "text", - "languageId": 277 - }, - "Parrot": { - "type": "programming", - "color": "#f3ca0a", - "extensions": [ - ".parrot" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 278 - }, - "Parrot Assembly": { - "group": "Parrot", - "type": "programming", - "aliases": [ - "pasm" - ], - "extensions": [ - ".pasm" - ], - "interpreters": [ - "parrot" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 279 - }, - "Parrot Internal Representation": { - "group": "Parrot", - "tmScope": "source.parrot.pir", - "type": "programming", - "aliases": [ - "pir" - ], - "extensions": [ - ".pir" - ], - "interpreters": [ - "parrot" - ], - "aceMode": "text", - "languageId": 280 - }, - "Pascal": { - "type": "programming", - "color": "#E3F171", - "extensions": [ - ".pas", - ".dfm", - ".dpr", - ".inc", - ".lpr", - ".pascal", - ".pp" - ], - "interpreters": [ - "instantfpc" - ], - "aceMode": "pascal", - "codemirrorMode": "pascal", - "codemirrorMimeType": "text/x-pascal", - "languageId": 281 - }, - "Pep8": { - "type": "programming", - "color": "#C76F5B", - "extensions": [ - ".pep" - ], - "aceMode": "text", - "tmScope": "source.pep8", - "languageId": 840372442 - }, - "Perl": { - "type": "programming", - "tmScope": "source.perl", - "aceMode": "perl", - "codemirrorMode": "perl", - "codemirrorMimeType": "text/x-perl", - "color": "#0298c3", - "extensions": [ - ".pl", - ".al", - ".cgi", - ".fcgi", - ".perl", - ".ph", - ".plx", - ".pm", - ".psgi", - ".t" - ], - "filenames": [ - "Makefile.PL", - "Rexfile", - "ack", - "cpanfile" - ], - "interpreters": [ - "cperl", - "perl" - ], - "aliases": [ - "cperl" - ], - "languageId": 282 - }, - "Perl 6": { - "type": "programming", - "color": "#0000fb", - "extensions": [ - ".6pl", - ".6pm", - ".nqp", - ".p6", - ".p6l", - ".p6m", - ".pl", - ".pl6", - ".pm", - ".pm6", - ".t" - ], - "interpreters": [ - "perl6" - ], - "aliases": [ - "perl6" - ], - "tmScope": "source.perl6fe", - "aceMode": "perl", - "codemirrorMode": "perl", - "codemirrorMimeType": "text/x-perl", - "languageId": 283 - }, - "Pic": { - "type": "markup", - "group": "Roff", - "tmScope": "source.pic", - "extensions": [ - ".pic", - ".chem" - ], - "aceMode": "text", - "codemirrorMode": "troff", - "codemirrorMimeType": "text/troff", - "languageId": 425 - }, - "Pickle": { - "type": "data", - "extensions": [ - ".pkl" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 284 - }, - "PicoLisp": { - "type": "programming", - "extensions": [ - ".l" - ], - "interpreters": [ - "picolisp", - "pil" - ], - "tmScope": "source.lisp", - "aceMode": "lisp", - "languageId": 285 - }, - "PigLatin": { - "type": "programming", - "color": "#fcd7de", - "extensions": [ - ".pig" - ], - "tmScope": "source.pig_latin", - "aceMode": "text", - "languageId": 286 - }, - "Pike": { - "type": "programming", - "color": "#005390", - "extensions": [ - ".pike", - ".pmod" - ], - "interpreters": [ - "pike" - ], - "aceMode": "text", - "languageId": 287 - }, - "Pod": { - "type": "prose", - "aceMode": "perl", - "codemirrorMode": "perl", - "codemirrorMimeType": "text/x-perl", - "wrap": true, - "extensions": [ - ".pod" - ], - "interpreters": [ - "perl" - ], - "tmScope": "none", - "languageId": 288 - }, - "PogoScript": { - "type": "programming", - "color": "#d80074", - "extensions": [ - ".pogo" - ], - "tmScope": "source.pogoscript", - "aceMode": "text", - "languageId": 289 - }, - "Pony": { - "type": "programming", - "extensions": [ - ".pony" - ], - "tmScope": "source.pony", - "aceMode": "text", - "languageId": 290 - }, - "PostCSS": { - "type": "markup", - "tmScope": "source.postcss", - "group": "CSS", - "extensions": [ - ".pcss" - ], - "aceMode": "text", - "languageId": 262764437 - }, - "PostScript": { - "type": "markup", - "color": "#da291c", - "extensions": [ - ".ps", - ".eps", - ".pfa" - ], - "tmScope": "source.postscript", - "aliases": [ - "postscr" - ], - "aceMode": "text", - "languageId": 291 - }, - "PowerBuilder": { - "type": "programming", - "color": "#8f0f8d", - "extensions": [ - ".pbt", - ".sra", - ".sru", - ".srw" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 292 - }, - "PowerShell": { - "type": "programming", - "color": "#012456", - "aceMode": "powershell", - "codemirrorMode": "powershell", - "codemirrorMimeType": "application/x-powershell", - "aliases": [ - "posh", - "pwsh" - ], - "extensions": [ - ".ps1", - ".psd1", - ".psm1" - ], - "interpreters": [ - "pwsh" - ], - "languageId": 293 - }, - "Processing": { - "type": "programming", - "color": "#0096D8", - "extensions": [ - ".pde" - ], - "aceMode": "text", - "languageId": 294 - }, - "Prolog": { - "type": "programming", - "color": "#74283c", - "extensions": [ - ".pl", - ".pro", - ".prolog", - ".yap" - ], - "interpreters": [ - "swipl", - "yap" - ], - "tmScope": "source.prolog", - "aceMode": "prolog", - "languageId": 295 - }, - "Propeller Spin": { - "type": "programming", - "color": "#7fa2a7", - "extensions": [ - ".spin" - ], - "tmScope": "source.spin", - "aceMode": "text", - "languageId": 296 - }, - "Protocol Buffer": { - "type": "data", - "aliases": [ - "protobuf", - "Protocol Buffers" - ], - "extensions": [ - ".proto" - ], - "tmScope": "source.protobuf", - "aceMode": "protobuf", - "codemirrorMode": "protobuf", - "codemirrorMimeType": "text/x-protobuf", - "languageId": 297 - }, - "Public Key": { - "type": "data", - "extensions": [ - ".asc", - ".pub" - ], - "tmScope": "none", - "aceMode": "text", - "codemirrorMode": "asciiarmor", - "codemirrorMimeType": "application/pgp", - "languageId": 298 - }, - "Pug": { - "group": "HTML", - "type": "markup", - "extensions": [ - ".jade", - ".pug" - ], - "tmScope": "text.jade", - "aceMode": "jade", - "codemirrorMode": "pug", - "codemirrorMimeType": "text/x-pug", - "languageId": 179 - }, - "Puppet": { - "type": "programming", - "color": "#302B6D", - "extensions": [ - ".pp" - ], - "filenames": [ - "Modulefile" - ], - "aceMode": "text", - "codemirrorMode": "puppet", - "codemirrorMimeType": "text/x-puppet", - "tmScope": "source.puppet", - "languageId": 299 - }, - "Pure Data": { - "type": "data", - "extensions": [ - ".pd" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 300 - }, - "PureBasic": { - "type": "programming", - "color": "#5a6986", - "extensions": [ - ".pb", - ".pbi" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 301 - }, - "PureScript": { - "type": "programming", - "color": "#1D222D", - "extensions": [ - ".purs" - ], - "tmScope": "source.purescript", - "aceMode": "haskell", - "codemirrorMode": "haskell", - "codemirrorMimeType": "text/x-haskell", - "languageId": 302 - }, - "Python": { - "type": "programming", - "aceMode": "python", - "codemirrorMode": "python", - "codemirrorMimeType": "text/x-python", - "color": "#3572A5", - "extensions": [ - ".py", - ".bzl", - ".cgi", - ".fcgi", - ".gyp", - ".gypi", - ".lmi", - ".py3", - ".pyde", - ".pyi", - ".pyp", - ".pyt", - ".pyw", - ".rpy", - ".spec", - ".tac", - ".wsgi", - ".xpy" - ], - "filenames": [ - ".gclient", - "BUCK", - "BUILD", - "BUILD.bazel", - "SConscript", - "SConstruct", - "Snakefile", - "WORKSPACE", - "wscript" - ], - "interpreters": [ - "python", - "python2", - "python3" - ], - "aliases": [ - "rusthon", - "python3" - ], - "languageId": 303 - }, - "Python console": { - "type": "programming", - "group": "Python", - "searchable": false, - "aliases": [ - "pycon" - ], - "tmScope": "text.python.console", - "aceMode": "text", - "languageId": 428 - }, - "Python traceback": { - "type": "data", - "group": "Python", - "searchable": false, - "extensions": [ - ".pytb" - ], - "tmScope": "text.python.traceback", - "aceMode": "text", - "languageId": 304 - }, - "QML": { - "type": "programming", - "color": "#44a51c", - "extensions": [ - ".qml", - ".qbs" - ], - "tmScope": "source.qml", - "aceMode": "text", - "languageId": 305 - }, - "QMake": { - "type": "programming", - "extensions": [ - ".pro", - ".pri" - ], - "interpreters": [ - "qmake" - ], - "aceMode": "text", - "languageId": 306 - }, - "Quake": { - "type": "programming", - "filenames": [ - "m3makefile", - "m3overrides" - ], - "color": "#882233", - "aceMode": "text", - "tmScope": "source.quake", - "languageId": 375265331 - }, - "R": { - "type": "programming", - "color": "#198CE7", - "aliases": [ - "R", - "Rscript", - "splus" - ], - "extensions": [ - ".r", - ".rd", - ".rsx" - ], - "filenames": [ - ".Rprofile", - "expr-dist" - ], - "interpreters": [ - "Rscript" - ], - "aceMode": "r", - "codemirrorMode": "r", - "codemirrorMimeType": "text/x-rsrc", - "languageId": 307 - }, - "RAML": { - "type": "markup", - "aceMode": "yaml", - "codemirrorMode": "yaml", - "codemirrorMimeType": "text/x-yaml", - "tmScope": "source.yaml", - "color": "#77d9fb", - "extensions": [ - ".raml" - ], - "languageId": 308 - }, - "RDoc": { - "type": "prose", - "aceMode": "rdoc", - "wrap": true, - "extensions": [ - ".rdoc" - ], - "tmScope": "text.rdoc", - "languageId": 309 - }, - "REALbasic": { - "type": "programming", - "extensions": [ - ".rbbas", - ".rbfrm", - ".rbmnu", - ".rbres", - ".rbtbar", - ".rbuistate" - ], - "tmScope": "source.vbnet", - "aceMode": "text", - "languageId": 310 - }, - "REXX": { - "type": "programming", - "aliases": [ - "arexx" - ], - "extensions": [ - ".rexx", - ".pprx", - ".rex" - ], - "interpreters": [ - "regina", - "rexx" - ], - "tmScope": "source.rexx", - "aceMode": "text", - "languageId": 311 - }, - "RHTML": { - "type": "markup", - "group": "HTML", - "extensions": [ - ".rhtml" - ], - "tmScope": "text.html.erb", - "aliases": [ - "html+ruby" - ], - "aceMode": "rhtml", - "codemirrorMode": "htmlembedded", - "codemirrorMimeType": "application/x-erb", - "languageId": 312 - }, - "RMarkdown": { - "type": "prose", - "wrap": true, - "aceMode": "markdown", - "codemirrorMode": "gfm", - "codemirrorMimeType": "text/x-gfm", - "extensions": [ - ".rmd" - ], - "tmScope": "source.gfm", - "languageId": 313 - }, - "RPC": { - "type": "programming", - "aliases": [ - "rpcgen", - "oncrpc", - "xdr" - ], - "aceMode": "c_cpp", - "extensions": [ - ".x" - ], - "tmScope": "source.c", - "languageId": 1031374237 - }, - "RPM Spec": { - "type": "data", - "tmScope": "source.rpm-spec", - "extensions": [ - ".spec" - ], - "aliases": [ - "specfile" - ], - "aceMode": "text", - "codemirrorMode": "rpm", - "codemirrorMimeType": "text/x-rpm-spec", - "languageId": 314 - }, - "RUNOFF": { - "type": "markup", - "color": "#665a4e", - "extensions": [ - ".rnh", - ".rno" - ], - "tmScope": "text.runoff", - "aceMode": "text", - "languageId": 315 - }, - "Racket": { - "type": "programming", - "color": "#22228f", - "extensions": [ - ".rkt", - ".rktd", - ".rktl", - ".scrbl" - ], - "interpreters": [ - "racket" - ], - "tmScope": "source.racket", - "aceMode": "lisp", - "languageId": 316 - }, - "Ragel": { - "type": "programming", - "color": "#9d5200", - "extensions": [ - ".rl" - ], - "aliases": [ - "ragel-rb", - "ragel-ruby" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 317 - }, - "Rascal": { - "type": "programming", - "color": "#fffaa0", - "extensions": [ - ".rsc" - ], - "tmScope": "source.rascal", - "aceMode": "text", - "languageId": 173616037 - }, - "Raw token data": { - "type": "data", - "aliases": [ - "raw" - ], - "extensions": [ - ".raw" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 318 - }, - "Reason": { - "type": "programming", - "group": "OCaml", - "aceMode": "rust", - "codemirrorMode": "rust", - "codemirrorMimeType": "text/x-rustsrc", - "extensions": [ - ".re", - ".rei" - ], - "interpreters": [ - "ocaml" - ], - "tmScope": "source.reason", - "languageId": 869538413 - }, - "Rebol": { - "type": "programming", - "color": "#358a5b", - "extensions": [ - ".reb", - ".r", - ".r2", - ".r3", - ".rebol" - ], - "aceMode": "text", - "tmScope": "source.rebol", - "languageId": 319 - }, - "Red": { - "type": "programming", - "color": "#f50000", - "extensions": [ - ".red", - ".reds" - ], - "aliases": [ - "red/system" - ], - "tmScope": "source.red", - "aceMode": "text", - "languageId": 320 - }, - "Redcode": { - "type": "programming", - "extensions": [ - ".cw" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 321 - }, - "Regular Expression": { - "type": "data", - "extensions": [ - ".regexp", - ".regex" - ], - "aliases": [ - "regexp", - "regex" - ], - "aceMode": "text", - "tmScope": "source.regexp", - "languageId": 363378884 - }, - "Ren'Py": { - "type": "programming", - "aliases": [ - "renpy" - ], - "color": "#ff7f7f", - "extensions": [ - ".rpy" - ], - "tmScope": "source.renpy", - "aceMode": "python", - "languageId": 322 - }, - "RenderScript": { - "type": "programming", - "extensions": [ - ".rs", - ".rsh" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 323 - }, - "Ring": { - "type": "programming", - "color": "#2D54CB", - "extensions": [ - ".ring" - ], - "tmScope": "source.ring", - "aceMode": "text", - "languageId": 431 - }, - "RobotFramework": { - "type": "programming", - "extensions": [ - ".robot" - ], - "tmScope": "text.robot", - "aceMode": "text", - "languageId": 324 - }, - "Roff": { - "type": "markup", - "color": "#ecdebe", - "extensions": [ - ".roff", - ".1", - ".1in", - ".1m", - ".1x", - ".2", - ".3", - ".3in", - ".3m", - ".3qt", - ".3x", - ".4", - ".5", - ".6", - ".7", - ".8", - ".9", - ".l", - ".man", - ".mdoc", - ".me", - ".ms", - ".n", - ".nr", - ".rno", - ".tmac" - ], - "filenames": [ - "mmn", - "mmt" - ], - "tmScope": "text.roff", - "aliases": [ - "groff", - "man", - "manpage", - "man page", - "man-page", - "mdoc", - "nroff", - "troff" - ], - "aceMode": "text", - "codemirrorMode": "troff", - "codemirrorMimeType": "text/troff", - "languageId": 141 - }, - "Rouge": { - "type": "programming", - "aceMode": "clojure", - "codemirrorMode": "clojure", - "codemirrorMimeType": "text/x-clojure", - "color": "#cc0088", - "extensions": [ - ".rg" - ], - "tmScope": "source.clojure", - "languageId": 325 - }, - "Ruby": { - "type": "programming", - "aceMode": "ruby", - "codemirrorMode": "ruby", - "codemirrorMimeType": "text/x-ruby", - "color": "#701516", - "aliases": [ - "jruby", - "macruby", - "rake", - "rb", - "rbx" - ], - "extensions": [ - ".rb", - ".builder", - ".eye", - ".fcgi", - ".gemspec", - ".god", - ".jbuilder", - ".mspec", - ".pluginspec", - ".podspec", - ".rabl", - ".rake", - ".rbuild", - ".rbw", - ".rbx", - ".ru", - ".ruby", - ".spec", - ".thor", - ".watchr" - ], - "interpreters": [ - "ruby", - "macruby", - "rake", - "jruby", - "rbx" - ], - "filenames": [ - ".irbrc", - ".pryrc", - "Appraisals", - "Berksfile", - "Brewfile", - "Buildfile", - "Capfile", - "Dangerfile", - "Deliverfile", - "Fastfile", - "Gemfile", - "Gemfile.lock", - "Guardfile", - "Jarfile", - "Mavenfile", - "Podfile", - "Puppetfile", - "Rakefile", - "Snapfile", - "Thorfile", - "Vagrantfile", - "buildfile" - ], - "languageId": 326 - }, - "Rust": { - "type": "programming", - "color": "#dea584", - "extensions": [ - ".rs", - ".rs.in" - ], - "aceMode": "rust", - "codemirrorMode": "rust", - "codemirrorMimeType": "text/x-rustsrc", - "languageId": 327 - }, - "SAS": { - "type": "programming", - "color": "#B34936", - "extensions": [ - ".sas" - ], - "tmScope": "source.sas", - "aceMode": "text", - "codemirrorMode": "sas", - "codemirrorMimeType": "text/x-sas", - "languageId": 328 - }, - "SCSS": { - "type": "markup", - "tmScope": "source.scss", - "group": "CSS", - "aceMode": "scss", - "codemirrorMode": "css", - "codemirrorMimeType": "text/x-scss", - "extensions": [ - ".scss" - ], - "languageId": 329 - }, - "SMT": { - "type": "programming", - "extensions": [ - ".smt2", - ".smt" - ], - "interpreters": [ - "boolector", - "cvc4", - "mathsat5", - "opensmt", - "smtinterpol", - "smt-rat", - "stp", - "verit", - "yices2", - "z3" - ], - "tmScope": "source.smt", - "aceMode": "text", - "languageId": 330 - }, - "SPARQL": { - "type": "data", - "tmScope": "source.sparql", - "aceMode": "text", - "codemirrorMode": "sparql", - "codemirrorMimeType": "application/sparql-query", - "extensions": [ - ".sparql", - ".rq" - ], - "languageId": 331 - }, - "SQF": { - "type": "programming", - "color": "#3F3F3F", - "extensions": [ - ".sqf", - ".hqf" - ], - "tmScope": "source.sqf", - "aceMode": "text", - "languageId": 332 - }, - "SQL": { - "type": "data", - "tmScope": "source.sql", - "aceMode": "sql", - "codemirrorMode": "sql", - "codemirrorMimeType": "text/x-sql", - "extensions": [ - ".sql", - ".cql", - ".ddl", - ".inc", - ".mysql", - ".prc", - ".tab", - ".udf", - ".viw" - ], - "languageId": 333 - }, - "SQLPL": { - "type": "programming", - "aceMode": "sql", - "codemirrorMode": "sql", - "codemirrorMimeType": "text/x-sql", - "tmScope": "source.sql", - "extensions": [ - ".sql", - ".db2" - ], - "languageId": 334 - }, - "SRecode Template": { - "type": "markup", - "color": "#348a34", - "tmScope": "source.lisp", - "aceMode": "lisp", - "codemirrorMode": "commonlisp", - "codemirrorMimeType": "text/x-common-lisp", - "extensions": [ - ".srt" - ], - "languageId": 335 - }, - "STON": { - "type": "data", - "group": "Smalltalk", - "extensions": [ - ".ston" - ], - "tmScope": "source.smalltalk", - "aceMode": "text", - "languageId": 336 - }, - "SVG": { - "type": "data", - "extensions": [ - ".svg" - ], - "tmScope": "text.xml", - "aceMode": "xml", - "codemirrorMode": "xml", - "codemirrorMimeType": "text/xml", - "languageId": 337 - }, - "Sage": { - "type": "programming", - "group": "Python", - "extensions": [ - ".sage", - ".sagews" - ], - "tmScope": "source.python", - "aceMode": "python", - "codemirrorMode": "python", - "codemirrorMimeType": "text/x-python", - "languageId": 338 - }, - "SaltStack": { - "type": "programming", - "color": "#646464", - "aliases": [ - "saltstate", - "salt" - ], - "extensions": [ - ".sls" - ], - "tmScope": "source.yaml.salt", - "aceMode": "yaml", - "codemirrorMode": "yaml", - "codemirrorMimeType": "text/x-yaml", - "languageId": 339 - }, - "Sass": { - "type": "markup", - "tmScope": "source.sass", - "group": "CSS", - "extensions": [ - ".sass" - ], - "aceMode": "sass", - "codemirrorMode": "sass", - "codemirrorMimeType": "text/x-sass", - "languageId": 340 - }, - "Scala": { - "type": "programming", - "aceMode": "scala", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-scala", - "color": "#c22d40", - "extensions": [ - ".scala", - ".kojo", - ".sbt", - ".sc" - ], - "interpreters": [ - "scala" - ], - "languageId": 341 - }, - "Scaml": { - "group": "HTML", - "type": "markup", - "extensions": [ - ".scaml" - ], - "tmScope": "source.scaml", - "aceMode": "text", - "languageId": 342 - }, - "Scheme": { - "type": "programming", - "color": "#1e4aec", - "extensions": [ - ".scm", - ".sch", - ".sld", - ".sls", - ".sps", - ".ss" - ], - "interpreters": [ - "guile", - "bigloo", - "chicken", - "csi", - "gosh", - "r6rs" - ], - "aceMode": "scheme", - "codemirrorMode": "scheme", - "codemirrorMimeType": "text/x-scheme", - "languageId": 343 - }, - "Scilab": { - "type": "programming", - "extensions": [ - ".sci", - ".sce", - ".tst" - ], - "aceMode": "text", - "languageId": 344 - }, - "Self": { - "type": "programming", - "color": "#0579aa", - "extensions": [ - ".self" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 345 - }, - "ShaderLab": { - "type": "programming", - "extensions": [ - ".shader" - ], - "aceMode": "text", - "tmScope": "source.shaderlab", - "languageId": 664257356 - }, - "Shell": { - "type": "programming", - "color": "#89e051", - "aliases": [ - "sh", - "shell-script", - "bash", - "zsh" - ], - "extensions": [ - ".sh", - ".bash", - ".bats", - ".cgi", - ".command", - ".fcgi", - ".ksh", - ".sh.in", - ".tmux", - ".tool", - ".zsh" - ], - "filenames": [ - ".bash_history", - ".bash_logout", - ".bash_profile", - ".bashrc", - ".cshrc", - ".login", - ".profile", - ".zlogin", - ".zlogout", - ".zprofile", - ".zshenv", - ".zshrc", - "9fs", - "PKGBUILD", - "bash_logout", - "bash_profile", - "bashrc", - "cshrc", - "gradlew", - "login", - "man", - "profile", - "zlogin", - "zlogout", - "zprofile", - "zshenv", - "zshrc" - ], - "interpreters": [ - "ash", - "bash", - "dash", - "ksh", - "mksh", - "pdksh", - "rc", - "sh", - "zsh" - ], - "aceMode": "sh", - "codemirrorMode": "shell", - "codemirrorMimeType": "text/x-sh", - "languageId": 346 - }, - "ShellSession": { - "type": "programming", - "extensions": [ - ".sh-session" - ], - "aliases": [ - "bash session", - "console" - ], - "tmScope": "text.shell-session", - "aceMode": "sh", - "codemirrorMode": "shell", - "codemirrorMimeType": "text/x-sh", - "languageId": 347 - }, - "Shen": { - "type": "programming", - "color": "#120F14", - "extensions": [ - ".shen" - ], - "tmScope": "source.shen", - "aceMode": "text", - "languageId": 348 - }, - "Slash": { - "type": "programming", - "color": "#007eff", - "extensions": [ - ".sl" - ], - "tmScope": "text.html.slash", - "aceMode": "text", - "languageId": 349 - }, - "Slice": { - "type": "programming", - "color": "#003fa2", - "tmScope": "source.slice", - "aceMode": "text", - "extensions": [ - ".ice" - ], - "languageId": 894641667 - }, - "Slim": { - "group": "HTML", - "type": "markup", - "extensions": [ - ".slim" - ], - "tmScope": "text.slim", - "aceMode": "text", - "codemirrorMode": "slim", - "codemirrorMimeType": "text/x-slim", - "languageId": 350 - }, - "Smali": { - "type": "programming", - "extensions": [ - ".smali" - ], - "aceMode": "text", - "tmScope": "source.smali", - "languageId": 351 - }, - "Smalltalk": { - "type": "programming", - "color": "#596706", - "extensions": [ - ".st", - ".cs" - ], - "aliases": [ - "squeak" - ], - "aceMode": "text", - "codemirrorMode": "smalltalk", - "codemirrorMimeType": "text/x-stsrc", - "languageId": 352 - }, - "Smarty": { - "type": "programming", - "extensions": [ - ".tpl" - ], - "aceMode": "smarty", - "codemirrorMode": "smarty", - "codemirrorMimeType": "text/x-smarty", - "tmScope": "text.html.smarty", - "languageId": 353 - }, - "Solidity": { - "type": "programming", - "color": "#AA6746", - "aceMode": "text", - "tmScope": "source.solidity", - "languageId": 237469032 - }, - "SourcePawn": { - "type": "programming", - "color": "#5c7611", - "aliases": [ - "sourcemod" - ], - "extensions": [ - ".sp", - ".inc", - ".sma" - ], - "tmScope": "source.sp", - "aceMode": "text", - "languageId": 354 - }, - "Spline Font Database": { - "type": "data", - "extensions": [ - ".sfd" - ], - "tmScope": "text.sfd", - "aceMode": "yaml", - "languageId": 767169629 - }, - "Squirrel": { - "type": "programming", - "color": "#800000", - "extensions": [ - ".nut" - ], - "tmScope": "source.c++", - "aceMode": "c_cpp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-c++src", - "languageId": 355 - }, - "Stan": { - "type": "programming", - "color": "#b2011d", - "extensions": [ - ".stan" - ], - "aceMode": "text", - "tmScope": "source.stan", - "languageId": 356 - }, - "Standard ML": { - "type": "programming", - "color": "#dc566d", - "aliases": [ - "sml" - ], - "extensions": [ - ".ML", - ".fun", - ".sig", - ".sml" - ], - "tmScope": "source.ml", - "aceMode": "text", - "codemirrorMode": "mllike", - "codemirrorMimeType": "text/x-ocaml", - "languageId": 357 - }, - "Stata": { - "type": "programming", - "extensions": [ - ".do", - ".ado", - ".doh", - ".ihlp", - ".mata", - ".matah", - ".sthlp" - ], - "aceMode": "text", - "languageId": 358 - }, - "Stylus": { - "type": "markup", - "group": "CSS", - "extensions": [ - ".styl" - ], - "tmScope": "source.stylus", - "aceMode": "stylus", - "languageId": 359 - }, - "SubRip Text": { - "type": "data", - "extensions": [ - ".srt" - ], - "aceMode": "text", - "tmScope": "text.srt", - "languageId": 360 - }, - "SugarSS": { - "type": "markup", - "tmScope": "source.css.postcss.sugarss", - "group": "CSS", - "extensions": [ - ".sss" - ], - "aceMode": "text", - "languageId": 826404698 - }, - "SuperCollider": { - "type": "programming", - "color": "#46390b", - "extensions": [ - ".sc", - ".scd" - ], - "interpreters": [ - "sclang", - "scsynth" - ], - "tmScope": "source.supercollider", - "aceMode": "text", - "languageId": 361 - }, - "Swift": { - "type": "programming", - "color": "#ffac45", - "extensions": [ - ".swift" - ], - "aceMode": "text", - "codemirrorMode": "swift", - "codemirrorMimeType": "text/x-swift", - "languageId": 362 - }, - "SystemVerilog": { - "type": "programming", - "color": "#DAE1C2", - "extensions": [ - ".sv", - ".svh", - ".vh" - ], - "aceMode": "verilog", - "codemirrorMode": "verilog", - "codemirrorMimeType": "text/x-systemverilog", - "languageId": 363 - }, - "TI Program": { - "type": "programming", - "aceMode": "text", - "color": "#A0AA87", - "extensions": [ - ".8xp", - ".8xk", - ".8xk.txt", - ".8xp.txt" - ], - "languageId": 422, - "tmScope": "none" - }, - "TLA": { - "type": "programming", - "extensions": [ - ".tla" - ], - "tmScope": "source.tla", - "aceMode": "text", - "languageId": 364 - }, - "TOML": { - "type": "data", - "extensions": [ - ".toml" - ], - "filenames": [ - "Cargo.lock", - "Gopkg.lock" - ], - "tmScope": "source.toml", - "aceMode": "toml", - "codemirrorMode": "toml", - "codemirrorMimeType": "text/x-toml", - "languageId": 365 - }, - "TXL": { - "type": "programming", - "extensions": [ - ".txl" - ], - "tmScope": "source.txl", - "aceMode": "text", - "languageId": 366 - }, - "Tcl": { - "type": "programming", - "color": "#e4cc98", - "extensions": [ - ".tcl", - ".adp", - ".tm" - ], - "filenames": [ - "owh", - "starfield" - ], - "interpreters": [ - "tclsh", - "wish" - ], - "aceMode": "tcl", - "codemirrorMode": "tcl", - "codemirrorMimeType": "text/x-tcl", - "languageId": 367 - }, - "Tcsh": { - "type": "programming", - "group": "Shell", - "extensions": [ - ".tcsh", - ".csh" - ], - "tmScope": "source.shell", - "aceMode": "sh", - "codemirrorMode": "shell", - "codemirrorMimeType": "text/x-sh", - "languageId": 368 - }, - "TeX": { - "type": "markup", - "color": "#3D6117", - "aceMode": "tex", - "codemirrorMode": "stex", - "codemirrorMimeType": "text/x-stex", - "wrap": true, - "aliases": [ - "latex" - ], - "extensions": [ - ".tex", - ".aux", - ".bbx", - ".bib", - ".cbx", - ".cls", - ".dtx", - ".ins", - ".lbx", - ".ltx", - ".mkii", - ".mkiv", - ".mkvi", - ".sty", - ".toc" - ], - "languageId": 369 - }, - "Tea": { - "type": "markup", - "extensions": [ - ".tea" - ], - "tmScope": "source.tea", - "aceMode": "text", - "languageId": 370 - }, - "Terra": { - "type": "programming", - "extensions": [ - ".t" - ], - "color": "#00004c", - "aceMode": "lua", - "codemirrorMode": "lua", - "codemirrorMimeType": "text/x-lua", - "interpreters": [ - "lua" - ], - "languageId": 371 - }, - "Text": { - "type": "prose", - "wrap": true, - "aliases": [ - "fundamental" - ], - "extensions": [ - ".txt", - ".fr", - ".nb", - ".ncl", - ".no" - ], - "filenames": [ - "COPYING", - "COPYING.regex", - "COPYRIGHT.regex", - "FONTLOG", - "INSTALL", - "INSTALL.mysql", - "LICENSE", - "LICENSE.mysql", - "NEWS", - "README.1ST", - "README.me", - "README.mysql", - "click.me", - "delete.me", - "keep.me", - "read.me", - "readme.1st", - "test.me" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 372 - }, - "Textile": { - "type": "prose", - "aceMode": "textile", - "codemirrorMode": "textile", - "codemirrorMimeType": "text/x-textile", - "wrap": true, - "extensions": [ - ".textile" - ], - "tmScope": "none", - "languageId": 373 - }, - "Thrift": { - "type": "programming", - "tmScope": "source.thrift", - "extensions": [ - ".thrift" - ], - "aceMode": "text", - "languageId": 374 - }, - "Turing": { - "type": "programming", - "color": "#cf142b", - "extensions": [ - ".t", - ".tu" - ], - "tmScope": "source.turing", - "aceMode": "text", - "languageId": 375 - }, - "Turtle": { - "type": "data", - "extensions": [ - ".ttl" - ], - "tmScope": "source.turtle", - "aceMode": "text", - "codemirrorMode": "turtle", - "codemirrorMimeType": "text/turtle", - "languageId": 376 - }, - "Twig": { - "type": "markup", - "group": "HTML", - "extensions": [ - ".twig" - ], - "tmScope": "text.html.twig", - "aceMode": "twig", - "codemirrorMode": "twig", - "codemirrorMimeType": "text/x-twig", - "languageId": 377 - }, - "Type Language": { - "type": "data", - "aliases": [ - "tl" - ], - "extensions": [ - ".tl" - ], - "tmScope": "source.tl", - "aceMode": "text", - "languageId": 632765617 - }, - "TypeScript": { - "type": "programming", - "color": "#2b7489", - "aliases": [ - "ts" - ], - "interpreters": [ - "node" - ], - "extensions": [ - ".ts", - ".tsx" - ], - "tmScope": "source.ts", - "aceMode": "typescript", - "codemirrorMode": "javascript", - "codemirrorMimeType": "application/typescript", - "languageId": 378 - }, - "Unified Parallel C": { - "type": "programming", - "group": "C", - "aceMode": "c_cpp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-csrc", - "extensions": [ - ".upc" - ], - "tmScope": "source.c", - "languageId": 379 - }, - "Unity3D Asset": { - "type": "data", - "aceMode": "yaml", - "codemirrorMode": "yaml", - "codemirrorMimeType": "text/x-yaml", - "extensions": [ - ".anim", - ".asset", - ".mat", - ".meta", - ".prefab", - ".unity" - ], - "tmScope": "source.yaml", - "languageId": 380 - }, - "Unix Assembly": { - "type": "programming", - "group": "Assembly", - "extensions": [ - ".s", - ".ms" - ], - "tmScope": "source.x86", - "aceMode": "assembly_x86", - "languageId": 120 - }, - "Uno": { - "type": "programming", - "extensions": [ - ".uno" - ], - "aceMode": "csharp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-csharp", - "tmScope": "source.cs", - "languageId": 381 - }, - "UnrealScript": { - "type": "programming", - "color": "#a54c4d", - "extensions": [ - ".uc" - ], - "tmScope": "source.java", - "aceMode": "java", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-java", - "languageId": 382 - }, - "UrWeb": { - "type": "programming", - "aliases": [ - "Ur/Web", - "Ur" - ], - "extensions": [ - ".ur", - ".urs" - ], - "tmScope": "source.ur", - "aceMode": "text", - "languageId": 383 - }, - "VCL": { - "type": "programming", - "color": "#148AA8", - "extensions": [ - ".vcl" - ], - "tmScope": "source.varnish.vcl", - "aceMode": "text", - "languageId": 384 - }, - "VHDL": { - "type": "programming", - "color": "#adb2cb", - "extensions": [ - ".vhdl", - ".vhd", - ".vhf", - ".vhi", - ".vho", - ".vhs", - ".vht", - ".vhw" - ], - "aceMode": "vhdl", - "codemirrorMode": "vhdl", - "codemirrorMimeType": "text/x-vhdl", - "languageId": 385 - }, - "Vala": { - "type": "programming", - "color": "#fbe5cd", - "extensions": [ - ".vala", - ".vapi" - ], - "aceMode": "vala", - "languageId": 386 - }, - "Verilog": { - "type": "programming", - "color": "#b2b7f8", - "extensions": [ - ".v", - ".veo" - ], - "aceMode": "verilog", - "codemirrorMode": "verilog", - "codemirrorMimeType": "text/x-verilog", - "languageId": 387 - }, - "Vim script": { - "type": "programming", - "color": "#199f4b", - "tmScope": "source.viml", - "aliases": [ - "vim", - "viml", - "nvim" - ], - "extensions": [ - ".vim" - ], - "filenames": [ - ".gvimrc", - ".nvimrc", - ".vimrc", - "_vimrc", - "gvimrc", - "nvimrc", - "vimrc" - ], - "aceMode": "text", - "languageId": 388 - }, - "Visual Basic": { - "type": "programming", - "color": "#945db7", - "extensions": [ - ".vb", - ".bas", - ".cls", - ".frm", - ".frx", - ".vba", - ".vbhtml", - ".vbs" - ], - "tmScope": "source.vbnet", - "aliases": [ - "vb.net", - "vbnet" - ], - "aceMode": "text", - "codemirrorMode": "vb", - "codemirrorMimeType": "text/x-vb", - "languageId": 389 - }, - "Volt": { - "type": "programming", - "color": "#1F1F1F", - "extensions": [ - ".volt" - ], - "tmScope": "source.d", - "aceMode": "d", - "codemirrorMode": "d", - "codemirrorMimeType": "text/x-d", - "languageId": 390 - }, - "Vue": { - "type": "markup", - "color": "#2c3e50", - "extensions": [ - ".vue" - ], - "tmScope": "text.html.vue", - "aceMode": "html", - "languageId": 391 - }, - "Wavefront Material": { - "type": "data", - "extensions": [ - ".mtl" - ], - "tmScope": "source.wavefront.mtl", - "aceMode": "text", - "languageId": 392 - }, - "Wavefront Object": { - "type": "data", - "extensions": [ - ".obj" - ], - "tmScope": "source.wavefront.obj", - "aceMode": "text", - "languageId": 393 - }, - "Web Ontology Language": { - "type": "data", - "extensions": [ - ".owl" - ], - "tmScope": "text.xml", - "aceMode": "xml", - "languageId": 394 - }, - "WebAssembly": { - "type": "programming", - "color": "#04133b", - "extensions": [ - ".wast", - ".wat" - ], - "aliases": [ - "wast", - "wasm" - ], - "tmScope": "source.webassembly", - "aceMode": "lisp", - "codemirrorMode": "commonlisp", - "codemirrorMimeType": "text/x-common-lisp", - "languageId": 956556503 - }, - "WebIDL": { - "type": "programming", - "extensions": [ - ".webidl" - ], - "tmScope": "source.webidl", - "aceMode": "text", - "codemirrorMode": "webidl", - "codemirrorMimeType": "text/x-webidl", - "languageId": 395 - }, - "Windows Registry Entries": { - "type": "data", - "extensions": [ - ".reg" - ], - "tmScope": "source.reg", - "aceMode": "ini", - "codemirrorMode": "properties", - "codemirrorMimeType": "text/x-properties", - "languageId": 969674868 - }, - "World of Warcraft Addon Data": { - "type": "data", - "extensions": [ - ".toc" - ], - "tmScope": "source.toc", - "aceMode": "text", - "languageId": 396 - }, - "X BitMap": { - "type": "data", - "group": "C", - "aliases": [ - "xbm" - ], - "extensions": [ - ".xbm" - ], - "aceMode": "c_cpp", - "tmScope": "source.c", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-csrc", - "languageId": 782911107 - }, - "X Font Directory Index": { - "type": "data", - "filenames": [ - "encodings.dir", - "fonts.alias", - "fonts.dir", - "fonts.scale" - ], - "tmScope": "source.fontdir", - "aceMode": "text", - "languageId": 208700028 - }, - "X PixMap": { - "type": "data", - "group": "C", - "aliases": [ - "xpm" - ], - "extensions": [ - ".xpm", - ".pm" - ], - "aceMode": "c_cpp", - "tmScope": "source.c", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-csrc", - "languageId": 781846279 - }, - "X10": { - "type": "programming", - "aliases": [ - "xten" - ], - "aceMode": "text", - "extensions": [ - ".x10" - ], - "color": "#4B6BEF", - "tmScope": "source.x10", - "languageId": 397 - }, - "XC": { - "type": "programming", - "color": "#99DA07", - "extensions": [ - ".xc" - ], - "tmScope": "source.xc", - "aceMode": "c_cpp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-csrc", - "languageId": 398 - }, - "XCompose": { - "type": "data", - "filenames": [ - ".XCompose", - "XCompose", - "xcompose" - ], - "tmScope": "config.xcompose", - "aceMode": "text", - "languageId": 225167241 - }, - "XML": { - "type": "data", - "aceMode": "xml", - "codemirrorMode": "xml", - "codemirrorMimeType": "text/xml", - "aliases": [ - "rss", - "xsd", - "wsdl" - ], - "extensions": [ - ".xml", - ".adml", - ".admx", - ".ant", - ".axml", - ".builds", - ".ccproj", - ".ccxml", - ".clixml", - ".cproject", - ".cscfg", - ".csdef", - ".csl", - ".csproj", - ".ct", - ".depproj", - ".dita", - ".ditamap", - ".ditaval", - ".dll.config", - ".dotsettings", - ".filters", - ".fsproj", - ".fxml", - ".glade", - ".gml", - ".gmx", - ".grxml", - ".iml", - ".ivy", - ".jelly", - ".jsproj", - ".kml", - ".launch", - ".mdpolicy", - ".mjml", - ".mm", - ".mod", - ".mxml", - ".natvis", - ".ncl", - ".ndproj", - ".nproj", - ".nuspec", - ".odd", - ".osm", - ".pkgproj", - ".plist", - ".pluginspec", - ".proj", - ".props", - ".ps1xml", - ".psc1", - ".pt", - ".rdf", - ".resx", - ".rss", - ".sch", - ".scxml", - ".sfproj", - ".shproj", - ".srdf", - ".storyboard", - ".stTheme", - ".sublime-snippet", - ".targets", - ".tmCommand", - ".tml", - ".tmLanguage", - ".tmPreferences", - ".tmSnippet", - ".tmTheme", - ".ts", - ".tsx", - ".ui", - ".urdf", - ".ux", - ".vbproj", - ".vcxproj", - ".vsixmanifest", - ".vssettings", - ".vstemplate", - ".vxml", - ".wixproj", - ".wsdl", - ".wsf", - ".wxi", - ".wxl", - ".wxs", - ".x3d", - ".xacro", - ".xaml", - ".xib", - ".xlf", - ".xliff", - ".xmi", - ".xml.dist", - ".xproj", - ".xsd", - ".xspec", - ".xul", - ".zcml" - ], - "filenames": [ - ".classpath", - ".cproject", - ".project", - "App.config", - "NuGet.config", - "Settings.StyleCop", - "Web.Debug.config", - "Web.Release.config", - "Web.config", - "packages.config" - ], - "languageId": 399 - }, - "XPages": { - "type": "data", - "extensions": [ - ".xsp-config", - ".xsp.metadata" - ], - "tmScope": "text.xml", - "aceMode": "xml", - "codemirrorMode": "xml", - "codemirrorMimeType": "text/xml", - "languageId": 400 - }, - "XProc": { - "type": "programming", - "extensions": [ - ".xpl", - ".xproc" - ], - "tmScope": "text.xml", - "aceMode": "xml", - "codemirrorMode": "xml", - "codemirrorMimeType": "text/xml", - "languageId": 401 - }, - "XQuery": { - "type": "programming", - "color": "#5232e7", - "extensions": [ - ".xquery", - ".xq", - ".xql", - ".xqm", - ".xqy" - ], - "aceMode": "xquery", - "codemirrorMode": "xquery", - "codemirrorMimeType": "application/xquery", - "tmScope": "source.xq", - "languageId": 402 - }, - "XS": { - "type": "programming", - "extensions": [ - ".xs" - ], - "tmScope": "source.c", - "aceMode": "c_cpp", - "codemirrorMode": "clike", - "codemirrorMimeType": "text/x-csrc", - "languageId": 403 - }, - "XSLT": { - "type": "programming", - "aliases": [ - "xsl" - ], - "extensions": [ - ".xslt", - ".xsl" - ], - "tmScope": "text.xml.xsl", - "aceMode": "xml", - "codemirrorMode": "xml", - "codemirrorMimeType": "text/xml", - "color": "#EB8CEB", - "languageId": 404 - }, - "Xojo": { - "type": "programming", - "extensions": [ - ".xojo_code", - ".xojo_menu", - ".xojo_report", - ".xojo_script", - ".xojo_toolbar", - ".xojo_window" - ], - "tmScope": "source.vbnet", - "aceMode": "text", - "languageId": 405 - }, - "Xtend": { - "type": "programming", - "extensions": [ - ".xtend" - ], - "aceMode": "text", - "languageId": 406 - }, - "YAML": { - "type": "data", - "tmScope": "source.yaml", - "aliases": [ - "yml" - ], - "extensions": [ - ".yml", - ".mir", - ".reek", - ".rviz", - ".sublime-syntax", - ".syntax", - ".yaml", - ".yaml-tmlanguage", - ".yml.mysql" - ], - "filenames": [ - ".clang-format", - ".clang-tidy", - ".gemrc", - "glide.lock" - ], - "aceMode": "yaml", - "codemirrorMode": "yaml", - "codemirrorMimeType": "text/x-yaml", - "languageId": 407 - }, - "YANG": { - "type": "data", - "extensions": [ - ".yang" - ], - "tmScope": "source.yang", - "aceMode": "text", - "languageId": 408 - }, - "YARA": { - "type": "programming", - "color": "#220000", - "aceMode": "text", - "extensions": [ - ".yar", - ".yara" - ], - "tmScope": "source.yara", - "languageId": 805122868 - }, - "YASnippet": { - "type": "markup", - "aliases": [ - "snippet", - "yas" - ], - "color": "#32AB90", - "extensions": [ - ".yasnippet" - ], - "tmScope": "source.yasnippet", - "aceMode": "text", - "languageId": 378760102 - }, - "Yacc": { - "type": "programming", - "extensions": [ - ".y", - ".yacc", - ".yy" - ], - "tmScope": "source.bison", - "aceMode": "text", - "color": "#4B6C4B", - "languageId": 409 - }, - "Zephir": { - "type": "programming", - "color": "#118f9e", - "extensions": [ - ".zep" - ], - "tmScope": "source.php.zephir", - "aceMode": "php", - "languageId": 410 - }, - "Zimpl": { - "type": "programming", - "extensions": [ - ".zimpl", - ".zmpl", - ".zpl" - ], - "tmScope": "none", - "aceMode": "text", - "languageId": 411 - }, - "desktop": { - "type": "data", - "extensions": [ - ".desktop", - ".desktop.in" - ], - "tmScope": "source.desktop", - "aceMode": "text", - "languageId": 412 - }, - "eC": { - "type": "programming", - "color": "#913960", - "extensions": [ - ".ec", - ".eh" - ], - "tmScope": "source.c.ec", - "aceMode": "text", - "languageId": 413 - }, - "edn": { - "type": "data", - "aceMode": "clojure", - "codemirrorMode": "clojure", - "codemirrorMimeType": "text/x-clojure", - "extensions": [ - ".edn" - ], - "tmScope": "source.clojure", - "languageId": 414 - }, - "fish": { - "type": "programming", - "group": "Shell", - "interpreters": [ - "fish" - ], - "extensions": [ - ".fish" - ], - "tmScope": "source.fish", - "aceMode": "text", - "languageId": 415 - }, - "mupad": { - "type": "programming", - "extensions": [ - ".mu" - ], - "aceMode": "text", - "languageId": 416 - }, - "nesC": { - "type": "programming", - "color": "#94B0C7", - "extensions": [ - ".nc" - ], - "aceMode": "text", - "tmScope": "source.nesc", - "languageId": 417 - }, - "ooc": { - "type": "programming", - "color": "#b0b77e", - "extensions": [ - ".ooc" - ], - "aceMode": "text", - "languageId": 418 - }, - "q": { - "type": "programming", - "extensions": [ - ".q" - ], - "tmScope": "source.q", - "aceMode": "text", - "color": "#0040cd", - "languageId": 970539067 - }, - "reStructuredText": { - "type": "prose", - "wrap": true, - "aliases": [ - "rst" - ], - "extensions": [ - ".rst", - ".rest", - ".rest.txt", - ".rst.txt" - ], - "aceMode": "text", - "codemirrorMode": "rst", - "codemirrorMimeType": "text/x-rst", - "languageId": 419 - }, - "sed": { - "type": "programming", - "color": "#64b970", - "extensions": [ - ".sed" - ], - "interpreters": [ - "gsed", - "minised", - "sed", - "ssed" - ], - "aceMode": "text", - "tmScope": "source.sed", - "languageId": 847830017 - }, - "wdl": { - "type": "programming", - "color": "#42f1f4", - "extensions": [ - ".wdl" - ], - "tmScope": "source.wdl", - "aceMode": "text", - "languageId": 374521672 - }, - "wisp": { - "type": "programming", - "aceMode": "clojure", - "codemirrorMode": "clojure", - "codemirrorMimeType": "text/x-clojure", - "color": "#7582D1", - "extensions": [ - ".wisp" - ], - "tmScope": "source.clojure", - "languageId": 420 - }, - "xBase": { - "type": "programming", - "color": "#403a40", - "aliases": [ - "advpl", - "clipper", - "foxpro" - ], - "extensions": [ - ".prg", - ".ch", - ".prw" - ], - "tmScope": "source.harbour", - "aceMode": "text", - "languageId": 421 - } -} \ No newline at end of file diff --git a/node_modules/language-map/package.json b/node_modules/language-map/package.json deleted file mode 100644 index 011e25d36d..0000000000 --- a/node_modules/language-map/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "language-map", - "version": "1.4.0", - "description": "GitHub's Linguist YAML language map provided as JSON", - "main": "languages.json", - "scripts": { - "test": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --bail", - "build": "node scripts/build" - }, - "repository": { - "type": "git", - "url": "git://github.com/blakeembrey/language-map.git" - }, - "keywords": [ - "language", - "map", - "linguist" - ], - "author": { - "name": "Blake Embrey", - "email": "hello@blakeembrey.com", - "url": "http://blakeembrey.me" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/blakeembrey/language-map/issues" - }, - "homepage": "https://github.com/blakeembrey/language-map", - "devDependencies": { - "camel-case": "^3.0.0", - "istanbul": "^0.4.5", - "js-yaml": "^3.0.2", - "mocha": "^5.2.0", - "request": "^2.34.0" - } -} diff --git a/node_modules/language-map/scripts/build b/node_modules/language-map/scripts/build deleted file mode 100644 index 74e0b91970..0000000000 --- a/node_modules/language-map/scripts/build +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env node - -var fs = require('fs'); -var yaml = require('js-yaml'); -var path = require('path'); -var request = require('request'); -var camelize = require('camel-case'); -var path = path.join(__dirname, '..', 'languages.json'); - -/** - * Sanitize the languages JSON object. - * - * @param {Object} obj - * @return {Object} - */ -var sanitizeYaml = function (obj) { - Object.keys(obj).forEach(function (language) { - Object.keys(obj[language]).forEach(function (key) { - var value = obj[language][key]; - - delete obj[language][key]; - obj[language][camelize(key)] = value; - }); - }); - - return obj; -}; - -/** - * Make a request to the YAML file hosted by GitHub and convert to JSON. - */ -request('https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml', function (err, res, body) { - var languages = sanitizeYaml(yaml.safeLoad(body)); - - fs.writeFileSync(path, JSON.stringify(languages, null, 2)); -}); diff --git a/node_modules/language-map/test.js b/node_modules/language-map/test.js deleted file mode 100644 index a14434cf00..0000000000 --- a/node_modules/language-map/test.js +++ /dev/null @@ -1,11 +0,0 @@ -var map = require('./'); -var assert = require('assert'); - -describe('language map', function () { - describe('module', function () { - it('should export an object with languages as the keys', function () { - assert.ok(map['Python'].extensions.indexOf('.py') > -1); - assert.ok(map['JavaScript'].extensions.indexOf('.js') > -1); - }); - }); -}); diff --git a/node_modules/object-assign/index.js b/node_modules/object-assign/index.js deleted file mode 100644 index 0930cf8890..0000000000 --- a/node_modules/object-assign/index.js +++ /dev/null @@ -1,90 +0,0 @@ -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ - -'use strict'; -/* eslint-disable no-unused-vars */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; - -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); -} - -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - - // Detect buggy property enumeration order in older V8 versions. - - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} - -module.exports = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; -}; diff --git a/node_modules/object-assign/license b/node_modules/object-assign/license deleted file mode 100644 index 654d0bfe94..0000000000 --- a/node_modules/object-assign/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/object-assign/package.json b/node_modules/object-assign/package.json deleted file mode 100644 index 503eb1e6d0..0000000000 --- a/node_modules/object-assign/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "object-assign", - "version": "4.1.1", - "description": "ES2015 `Object.assign()` ponyfill", - "license": "MIT", - "repository": "sindresorhus/object-assign", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava", - "bench": "matcha bench.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "object", - "assign", - "extend", - "properties", - "es2015", - "ecmascript", - "harmony", - "ponyfill", - "prollyfill", - "polyfill", - "shim", - "browser" - ], - "devDependencies": { - "ava": "^0.16.0", - "lodash": "^4.16.4", - "matcha": "^0.7.0", - "xo": "^0.16.0" - } -} diff --git a/node_modules/object-assign/readme.md b/node_modules/object-assign/readme.md deleted file mode 100644 index 1be09d35c7..0000000000 --- a/node_modules/object-assign/readme.md +++ /dev/null @@ -1,61 +0,0 @@ -# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) - -> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com) - - -## Use the built-in - -Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari), -support `Object.assign()` :tada:. If you target only those environments, then by all -means, use `Object.assign()` instead of this package. - - -## Install - -``` -$ npm install --save object-assign -``` - - -## Usage - -```js -const objectAssign = require('object-assign'); - -objectAssign({foo: 0}, {bar: 1}); -//=> {foo: 0, bar: 1} - -// multiple sources -objectAssign({foo: 0}, {bar: 1}, {baz: 2}); -//=> {foo: 0, bar: 1, baz: 2} - -// overwrites equal keys -objectAssign({foo: 0}, {foo: 1}, {foo: 2}); -//=> {foo: 2} - -// ignores null and undefined sources -objectAssign({foo: 0}, null, {bar: 1}, undefined); -//=> {foo: 0, bar: 1} -``` - - -## API - -### objectAssign(target, [source, ...]) - -Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. - - -## Resources - -- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign) - - -## Related - -- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pinkie-promise/index.js b/node_modules/pinkie-promise/index.js deleted file mode 100644 index 777377a1f7..0000000000 --- a/node_modules/pinkie-promise/index.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = typeof Promise === 'function' ? Promise : require('pinkie'); diff --git a/node_modules/pinkie-promise/license b/node_modules/pinkie-promise/license deleted file mode 100644 index 1aeb74fd25..0000000000 --- a/node_modules/pinkie-promise/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/pinkie-promise/package.json b/node_modules/pinkie-promise/package.json deleted file mode 100644 index 3515f8ff34..0000000000 --- a/node_modules/pinkie-promise/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "pinkie-promise", - "version": "2.0.1", - "description": "ES2015 Promise ponyfill", - "license": "MIT", - "repository": "floatdrop/pinkie-promise", - "author": { - "name": "Vsevolod Strukchinsky", - "email": "floatdrop@gmail.com", - "url": "github.com/floatdrop" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "promises", - "es2015", - "es6", - "polyfill", - "ponyfill" - ], - "dependencies": { - "pinkie": "^2.0.0" - }, - "devDependencies": { - "mocha": "*" - } -} diff --git a/node_modules/pinkie-promise/readme.md b/node_modules/pinkie-promise/readme.md deleted file mode 100644 index 78477f4297..0000000000 --- a/node_modules/pinkie-promise/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise) - -> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill - -Module exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill. - -## Install - -``` -$ npm install --save pinkie-promise -``` - -## Usage - -```js -var Promise = require('pinkie-promise'); - -new Promise(function (resolve) { resolve('unicorns'); }); -//=> Promise { 'unicorns' } -``` - -## Related - -- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function - -## License - -MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/node_modules/pinkie/index.js b/node_modules/pinkie/index.js deleted file mode 100644 index 14ce1bfe3d..0000000000 --- a/node_modules/pinkie/index.js +++ /dev/null @@ -1,292 +0,0 @@ -'use strict'; - -var PENDING = 'pending'; -var SETTLED = 'settled'; -var FULFILLED = 'fulfilled'; -var REJECTED = 'rejected'; -var NOOP = function () {}; -var isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function'; - -var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate; -var asyncQueue = []; -var asyncTimer; - -function asyncFlush() { - // run promise callbacks - for (var i = 0; i < asyncQueue.length; i++) { - asyncQueue[i][0](asyncQueue[i][1]); - } - - // reset async asyncQueue - asyncQueue = []; - asyncTimer = false; -} - -function asyncCall(callback, arg) { - asyncQueue.push([callback, arg]); - - if (!asyncTimer) { - asyncTimer = true; - asyncSetTimer(asyncFlush, 0); - } -} - -function invokeResolver(resolver, promise) { - function resolvePromise(value) { - resolve(promise, value); - } - - function rejectPromise(reason) { - reject(promise, reason); - } - - try { - resolver(resolvePromise, rejectPromise); - } catch (e) { - rejectPromise(e); - } -} - -function invokeCallback(subscriber) { - var owner = subscriber.owner; - var settled = owner._state; - var value = owner._data; - var callback = subscriber[settled]; - var promise = subscriber.then; - - if (typeof callback === 'function') { - settled = FULFILLED; - try { - value = callback(value); - } catch (e) { - reject(promise, e); - } - } - - if (!handleThenable(promise, value)) { - if (settled === FULFILLED) { - resolve(promise, value); - } - - if (settled === REJECTED) { - reject(promise, value); - } - } -} - -function handleThenable(promise, value) { - var resolved; - - try { - if (promise === value) { - throw new TypeError('A promises callback cannot return that same promise.'); - } - - if (value && (typeof value === 'function' || typeof value === 'object')) { - // then should be retrieved only once - var then = value.then; - - if (typeof then === 'function') { - then.call(value, function (val) { - if (!resolved) { - resolved = true; - - if (value === val) { - fulfill(promise, val); - } else { - resolve(promise, val); - } - } - }, function (reason) { - if (!resolved) { - resolved = true; - - reject(promise, reason); - } - }); - - return true; - } - } - } catch (e) { - if (!resolved) { - reject(promise, e); - } - - return true; - } - - return false; -} - -function resolve(promise, value) { - if (promise === value || !handleThenable(promise, value)) { - fulfill(promise, value); - } -} - -function fulfill(promise, value) { - if (promise._state === PENDING) { - promise._state = SETTLED; - promise._data = value; - - asyncCall(publishFulfillment, promise); - } -} - -function reject(promise, reason) { - if (promise._state === PENDING) { - promise._state = SETTLED; - promise._data = reason; - - asyncCall(publishRejection, promise); - } -} - -function publish(promise) { - promise._then = promise._then.forEach(invokeCallback); -} - -function publishFulfillment(promise) { - promise._state = FULFILLED; - publish(promise); -} - -function publishRejection(promise) { - promise._state = REJECTED; - publish(promise); - if (!promise._handled && isNode) { - global.process.emit('unhandledRejection', promise._data, promise); - } -} - -function notifyRejectionHandled(promise) { - global.process.emit('rejectionHandled', promise); -} - -/** - * @class - */ -function Promise(resolver) { - if (typeof resolver !== 'function') { - throw new TypeError('Promise resolver ' + resolver + ' is not a function'); - } - - if (this instanceof Promise === false) { - throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); - } - - this._then = []; - - invokeResolver(resolver, this); -} - -Promise.prototype = { - constructor: Promise, - - _state: PENDING, - _then: null, - _data: undefined, - _handled: false, - - then: function (onFulfillment, onRejection) { - var subscriber = { - owner: this, - then: new this.constructor(NOOP), - fulfilled: onFulfillment, - rejected: onRejection - }; - - if ((onRejection || onFulfillment) && !this._handled) { - this._handled = true; - if (this._state === REJECTED && isNode) { - asyncCall(notifyRejectionHandled, this); - } - } - - if (this._state === FULFILLED || this._state === REJECTED) { - // already resolved, call callback async - asyncCall(invokeCallback, subscriber); - } else { - // subscribe - this._then.push(subscriber); - } - - return subscriber.then; - }, - - catch: function (onRejection) { - return this.then(null, onRejection); - } -}; - -Promise.all = function (promises) { - if (!Array.isArray(promises)) { - throw new TypeError('You must pass an array to Promise.all().'); - } - - return new Promise(function (resolve, reject) { - var results = []; - var remaining = 0; - - function resolver(index) { - remaining++; - return function (value) { - results[index] = value; - if (!--remaining) { - resolve(results); - } - }; - } - - for (var i = 0, promise; i < promises.length; i++) { - promise = promises[i]; - - if (promise && typeof promise.then === 'function') { - promise.then(resolver(i), reject); - } else { - results[i] = promise; - } - } - - if (!remaining) { - resolve(results); - } - }); -}; - -Promise.race = function (promises) { - if (!Array.isArray(promises)) { - throw new TypeError('You must pass an array to Promise.race().'); - } - - return new Promise(function (resolve, reject) { - for (var i = 0, promise; i < promises.length; i++) { - promise = promises[i]; - - if (promise && typeof promise.then === 'function') { - promise.then(resolve, reject); - } else { - resolve(promise); - } - } - }); -}; - -Promise.resolve = function (value) { - if (value && typeof value === 'object' && value.constructor === Promise) { - return value; - } - - return new Promise(function (resolve) { - resolve(value); - }); -}; - -Promise.reject = function (reason) { - return new Promise(function (resolve, reject) { - reject(reason); - }); -}; - -module.exports = Promise; diff --git a/node_modules/pinkie/license b/node_modules/pinkie/license deleted file mode 100644 index 1aeb74fd25..0000000000 --- a/node_modules/pinkie/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/pinkie/package.json b/node_modules/pinkie/package.json deleted file mode 100644 index cb9057b815..0000000000 --- a/node_modules/pinkie/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "pinkie", - "version": "2.0.4", - "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation", - "license": "MIT", - "repository": "floatdrop/pinkie", - "author": { - "name": "Vsevolod Strukchinsky", - "email": "floatdrop@gmail.com", - "url": "github.com/floatdrop" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && nyc mocha", - "coverage": "nyc report --reporter=text-lcov | coveralls" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "promises", - "es2015", - "es6" - ], - "devDependencies": { - "core-assert": "^0.1.1", - "coveralls": "^2.11.4", - "mocha": "*", - "nyc": "^3.2.2", - "promises-aplus-tests": "*", - "xo": "^0.10.1" - } -} diff --git a/node_modules/pinkie/readme.md b/node_modules/pinkie/readme.md deleted file mode 100644 index 1565f95889..0000000000 --- a/node_modules/pinkie/readme.md +++ /dev/null @@ -1,83 +0,0 @@ -

-
- pinkie -
-
-

- -> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation - -[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master) - -There are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality. - -This module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though). - - -## Install - -``` -$ npm install --save pinkie -``` - - -## Usage - -```js -var fs = require('fs'); -var Promise = require('pinkie'); - -new Promise(function (resolve, reject) { - fs.readFile('foo.json', 'utf8', function (err, data) { - if (err) { - reject(err); - return; - } - - resolve(data); - }); -}); -//=> Promise -``` - - -### API - -`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot: - -#### new Promise(executor) - -Returns new instance of `Promise`. - -##### executor - -*Required* -Type: `function` - -Function with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it. - -#### pinkie.all(promises) - -Returns a promise that resolves when all of the promises in the `promises` Array argument have resolved. - -#### pinkie.race(promises) - -Returns a promise that resolves or rejects as soon as one of the promises in the `promises` Array resolves or rejects, with the value or reason from that promise. - -#### pinkie.reject(reason) - -Returns a Promise object that is rejected with the given `reason`. - -#### pinkie.resolve(value) - -Returns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`. - - -## Related - -- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module - - -## License - -MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/node_modules/slash2/index.js b/node_modules/slash2/index.js deleted file mode 100644 index 431cfd939a..0000000000 --- a/node_modules/slash2/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - - if (isExtendedLengthPath) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/slash2/license b/node_modules/slash2/license deleted file mode 100644 index e7af2f7710..0000000000 --- a/node_modules/slash2/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/slash2/package.json b/node_modules/slash2/package.json deleted file mode 100644 index 0ada687944..0000000000 --- a/node_modules/slash2/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "slash2", - "version": "2.0.0", - "description": "Convert Windows backslash paths to slash paths", - "license": "MIT", - "repository": "sorrycc/slash2", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/node_modules/slash2/readme.md b/node_modules/slash2/readme.md deleted file mode 100644 index 5e2fedbc96..0000000000 --- a/node_modules/slash2/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/package-lock.json b/package-lock.json index 2c611a3461..1ed51b87f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,6 @@ "file-url": "^3.0.0", "fs": "0.0.1-security", "get-folder-size": "^2.0.1", - "github-linguist": "^2.4.4", "glob": "^8.0.1", "js-yaml": "^4.1.0", "jsonschema": "1.2.6", @@ -1242,6 +1241,7 @@ "node_modules/ansi-styles": { "version": "3.2.1", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -1301,14 +1301,6 @@ "node": ">=8" } }, - "node_modules/array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array.prototype.flat": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", @@ -1689,6 +1681,7 @@ "node_modules/chalk": { "version": "2.4.2", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -1856,13 +1849,15 @@ "node_modules/color-convert": { "version": "1.9.3", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, "dependencies": { "color-name": "1.1.3" } }, "node_modules/color-name": { "version": "1.1.3", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true }, "node_modules/combined-stream": { "version": "1.0.8", @@ -2174,6 +2169,7 @@ "node_modules/escape-string-regexp": { "version": "1.0.5", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, "engines": { "node": ">=0.8.0" } @@ -3165,15 +3161,6 @@ "version": "0.0.1-security", "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" }, - "node_modules/fs-extra": { - "version": "4.0.3", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" @@ -3243,77 +3230,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/github-linguist": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/github-linguist/-/github-linguist-2.4.4.tgz", - "integrity": "sha512-QSw/HfSTqA13t7eqNeGLd62ghnTsTQAUrJQKkUG100NZqqzpsKB9c7gH7lFaGU1ZWGmNSWfhG6q1Ok/xotOA/g==", - "dependencies": { - "chalk": "^2.2.0", - "commander": "^2.11.0", - "fs-extra": "^4.0.3", - "globby": "^6.1.0", - "language-map": "^1.3.0", - "slash2": "^2.0.0" - }, - "bin": { - "loc": "dist/cli.js" - } - }, - "node_modules/github-linguist/node_modules/array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dependencies": { - "array-uniq": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/github-linguist/node_modules/commander": { - "version": "2.20.3", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "node_modules/github-linguist/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/github-linguist/node_modules/globby": { - "version": "6.1.0", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dependencies": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/github-linguist/node_modules/pify": { - "version": "2.3.0", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/glob": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.1.tgz", @@ -3426,6 +3342,7 @@ "node_modules/has-flag": { "version": "3.0.0", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, "engines": { "node": ">=4" } @@ -3851,13 +3768,6 @@ "json5": "lib/cli.js" } }, - "node_modules/jsonfile": { - "version": "4.0.0", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, "node_modules/jsonschema": { "version": "1.2.6", "integrity": "sha512-SqhURKZG07JyKKeo/ir24QnS4/BV7a6gQy93bUSe4lUdNp0QNpIz2c9elWJQ9dpc5cQYY6cvCzgRwy0MQCLyqA==", @@ -3871,10 +3781,6 @@ "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", "dev": true }, - "node_modules/language-map": { - "version": "1.4.0", - "integrity": "sha512-5XHMCqKQ/14VXwJTKZX7MZwsVyTrR0bwCsRBwrBq3nP4w7liMJiR0ixXgI29EF/T1/U6be8cYK2y0ibWW9kx2w==" - }, "node_modules/levn": { "version": "0.4.1", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", @@ -4247,13 +4153,6 @@ "node": ">=8" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", @@ -4523,23 +4422,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pinkie": { - "version": "2.0.4", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/pkg-conf": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz", @@ -5147,13 +5029,6 @@ "node": ">=8" } }, - "node_modules/slash2": { - "version": "2.0.0", - "integrity": "sha512-7ElvBydJPi3MHU/KEOblFSbO/skl4Z69jKkFCpYIYVOMSIZsKi4gYU43HGeZPmjxCXrHekoDAAewphPQNnsqtA==", - "engines": { - "node": ">=6" - } - }, "node_modules/slice-ansi": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", @@ -5411,6 +5286,7 @@ "node_modules/supports-color": { "version": "5.5.0", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, "dependencies": { "has-flag": "^3.0.0" }, diff --git a/package.json b/package.json index 6fa45a08af..49e95fd883 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "file-url": "^3.0.0", "fs": "0.0.1-security", "get-folder-size": "^2.0.1", - "github-linguist": "^2.4.4", "glob": "^8.0.1", "js-yaml": "^4.1.0", "jsonschema": "1.2.6", diff --git a/pr-checks/checks/go-custom-queries.yml b/pr-checks/checks/go-custom-queries.yml index b8215bebe7..20261adc3f 100644 --- a/pr-checks/checks/go-custom-queries.yml +++ b/pr-checks/checks/go-custom-queries.yml @@ -3,9 +3,6 @@ description: "Checks that Go works in conjunction with a config file specifying env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: - - uses: actions/setup-go@v3 - with: - go-version: "^1.13.1" - uses: ./../action/init with: languages: go diff --git a/pr-checks/checks/go-tracing-autobuilder.yml b/pr-checks/checks/go-tracing-autobuilder.yml index 4e0bafa94e..7ea1d7e263 100644 --- a/pr-checks/checks/go-tracing-autobuilder.yml +++ b/pr-checks/checks/go-tracing-autobuilder.yml @@ -4,9 +4,6 @@ operatingSystems: ["ubuntu", "macos"] env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: - - uses: actions/setup-go@v3 - with: - go-version: "^1.13.1" - uses: ./../action/init with: languages: go diff --git a/pr-checks/checks/go-tracing-custom-build-steps.yml b/pr-checks/checks/go-tracing-custom-build-steps.yml index 4267e8e090..361fa31ce9 100644 --- a/pr-checks/checks/go-tracing-custom-build-steps.yml +++ b/pr-checks/checks/go-tracing-custom-build-steps.yml @@ -2,9 +2,6 @@ name: "Go: tracing with custom build steps" description: "Checks that Go tracing traces the build when using custom build steps" operatingSystems: ["ubuntu", "macos"] steps: - - uses: actions/setup-go@v3 - with: - go-version: "^1.13.1" - uses: ./../action/init with: languages: go diff --git a/pr-checks/checks/go-tracing-legacy-workflow.yml b/pr-checks/checks/go-tracing-legacy-workflow.yml index ea5d6a881b..0c82542304 100644 --- a/pr-checks/checks/go-tracing-legacy-workflow.yml +++ b/pr-checks/checks/go-tracing-legacy-workflow.yml @@ -4,9 +4,6 @@ operatingSystems: ["ubuntu", "macos"] env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: - - uses: actions/setup-go@v3 - with: - go-version: "^1.13.1" - uses: ./../action/init with: languages: go diff --git a/pr-checks/checks/ml-powered-queries.yml b/pr-checks/checks/ml-powered-queries.yml index 58296a9bfc..2f06b8c16d 100644 --- a/pr-checks/checks/ml-powered-queries.yml +++ b/pr-checks/checks/ml-powered-queries.yml @@ -33,22 +33,17 @@ steps: - name: Check sarif uses: ./../action/.github/check-sarif - if: matrix.os != 'windows-latest' || matrix.version == 'latest' || matrix.version == 'nightly-latest' + # Running on Windows requires CodeQL CLI 2.9.0+. + if: "!(matrix.version == 'stable-20220120' && (matrix.os == 'windows-latest' || matrix.os == 'windows-2019'))" with: sarif-file: ${{ runner.temp }}/results/javascript.sarif queries-run: js/ml-powered/nosql-injection,js/ml-powered/path-injection,js/ml-powered/sql-injection,js/ml-powered/xss queries-not-run: foo,bar - name: Check results - # Running ML-powered queries on Windows requires CodeQL CLI 2.9.0+. We don't run these checks - # against Windows and `cached` while CodeQL CLI 2.9.0 makes its way into `cached` to avoid the - # test starting to fail when the cached CodeQL Bundle gets updated. Once the CodeQL Bundle - # containing CodeQL CLI 2.9.0 has been fully released, we can drop this line and start running - # these checks on Windows and `cached`. - if: matrix.os != 'windows-latest' || matrix.version != 'cached' env: - # Running on Windows requires CodeQL CLI 2.9.0+, which has so far only made it to 'latest'. - SHOULD_RUN_ML_POWERED_QUERIES: ${{ matrix.os != 'windows-latest' || matrix.version == 'latest' || matrix.version == 'nightly-latest' }} + # Running on Windows requires CodeQL CLI 2.9.0+. + SHOULD_RUN_ML_POWERED_QUERIES: ${{ !(matrix.version == 'stable-20220120' && (matrix.os == 'windows-latest' || matrix.os == 'windows-2019')) }} shell: bash run: | echo "Expecting ML-powered queries to be run: ${SHOULD_RUN_ML_POWERED_QUERIES}" diff --git a/pr-checks/checks/unset-environment.yml b/pr-checks/checks/unset-environment.yml new file mode 100644 index 0000000000..14174c40c1 --- /dev/null +++ b/pr-checks/checks/unset-environment.yml @@ -0,0 +1,55 @@ +name: "Test unsetting environment variables" +description: "An end-to-end integration test that unsets some environment variables" +operatingSystems: ["ubuntu"] +steps: + - uses: ./../action/init + with: + db-location: ${{ runner.temp }}/customDbLocation + tools: ${{ steps.prepare-test.outputs.tools-url }} + env: + TEST_MODE: true + - name: Build code + shell: bash + run: env -i PATH="$PATH" HOME="$HOME" ./build.sh + - uses: ./../action/analyze + id: analysis + env: + TEST_MODE: true + - shell: bash + run: | + CPP_DB="${{ fromJson(steps.analysis.outputs.db-locations).cpp }}" + if [[ ! -d "$CPP_DB" ]] || [[ ! "$CPP_DB" == "${RUNNER_TEMP}/customDbLocation/cpp" ]]; then + echo "::error::Did not create a database for CPP, or created it in the wrong location." \ + "Expected location was '${RUNNER_TEMP}/customDbLocation/cpp' but actual was '${CPP_DB}'" + exit 1 + fi + CSHARP_DB="${{ fromJson(steps.analysis.outputs.db-locations).csharp }}" + if [[ ! -d "$CSHARP_DB" ]] || [[ ! "$CSHARP_DB" == "${RUNNER_TEMP}/customDbLocation/csharp" ]]; then + echo "::error::Did not create a database for C Sharp, or created it in the wrong location." \ + "Expected location was '${RUNNER_TEMP}/customDbLocation/csharp' but actual was '${CSHARP_DB}'" + exit 1 + fi + GO_DB="${{ fromJson(steps.analysis.outputs.db-locations).go }}" + if [[ ! -d "$GO_DB" ]] || [[ ! "$GO_DB" == "${RUNNER_TEMP}/customDbLocation/go" ]]; then + echo "::error::Did not create a database for Go, or created it in the wrong location." \ + "Expected location was '${RUNNER_TEMP}/customDbLocation/go' but actual was '${GO_DB}'" + exit 1 + fi + JAVA_DB="${{ fromJson(steps.analysis.outputs.db-locations).java }}" + if [[ ! -d "$JAVA_DB" ]] || [[ ! "$JAVA_DB" == "${RUNNER_TEMP}/customDbLocation/java" ]]; then + echo "::error::Did not create a database for Java, or created it in the wrong location." \ + "Expected location was '${RUNNER_TEMP}/customDbLocation/java' but actual was '${JAVA_DB}'" + exit 1 + fi + JAVASCRIPT_DB="${{ fromJson(steps.analysis.outputs.db-locations).javascript }}" + if [[ ! -d "$JAVASCRIPT_DB" ]] || [[ ! "$JAVASCRIPT_DB" == "${RUNNER_TEMP}/customDbLocation/javascript" ]]; then + echo "::error::Did not create a database for Javascript, or created it in the wrong location." \ + "Expected location was '${RUNNER_TEMP}/customDbLocation/javascript' but actual was '${JAVASCRIPT_DB}'" + exit 1 + fi + PYTHON_DB="${{ fromJson(steps.analysis.outputs.db-locations).python }}" + if [[ ! -d "$PYTHON_DB" ]] || [[ ! "$PYTHON_DB" == "${RUNNER_TEMP}/customDbLocation/python" ]]; then + echo "::error::Did not create a database for Python, or created it in the wrong location." \ + "Expected location was '${RUNNER_TEMP}/customDbLocation/python' but actual was '${PYTHON_DB}'" + exit 1 + fi diff --git a/pr-checks/sync.py b/pr-checks/sync.py index 8682805aec..19189d3ac7 100644 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -3,12 +3,12 @@ # The default set of CodeQL Bundle versions to use for the PR checks. defaultTestVersions = [ - # The oldest supported CodeQL version: 2.4.5. If bumping, update `CODEQL_MINIMUM_VERSION` in `codeql.ts` - "stable-20210308", - # The last CodeQL release in the 2.4 series: 2.4.6. - "stable-20210319", - # The last CodeQL release in the 2.5 series: 2.5.9. - "stable-20210809", + # The oldest supported CodeQL version: 2.6.3. If bumping, update `CODEQL_MINIMUM_VERSION` in `codeql.ts` + "stable-20211005", + # The last CodeQL release in the 2.7 series: 2.7.6. + "stable-20220120", + # The last CodeQL release in the 2.8 series: 2.8.5. + "stable-20220401", # The version of CodeQL currently in the toolcache. Typically either the latest release or the one before. "cached", # The latest release of CodeQL. @@ -23,8 +23,8 @@ def isCompatibleWithLatestImages(version): return True date = version.split("-")[1] # The first version of the CodeQL CLI compatible with `ubuntu-22.04` and `windows-2022` is - # 2.7.3. This appears in CodeQL Bundle version codeql-bundle-20211208. - return date >= "20211208" + # 2.8.2. This appears in CodeQL Bundle version codeql-bundle-20220224. + return date >= "20220224" def operatingSystemsForVersion(version): @@ -58,6 +58,19 @@ def writeHeader(checkStream): with open(f"checks/{file}", 'r') as checkStream: checkSpecification = yaml.load(checkStream) + matrix = [] + for version in checkSpecification.get('versions', defaultTestVersions): + runnerImages = operatingSystemsForVersion(version) + if checkSpecification.get('operatingSystems', None): + runnerImages = [image for image in runnerImages for operatingSystem in checkSpecification['operatingSystems'] + if image.startswith(operatingSystem)] + + for runnerImage in runnerImages: + matrix.append({ + 'os': runnerImage, + 'version': version + }) + steps = [ { 'name': 'Check out repository', @@ -72,20 +85,18 @@ def writeHeader(checkStream): } } ] - steps.extend(checkSpecification['steps']) - matrix = [] - for version in checkSpecification.get('versions', defaultTestVersions): - runnerImages = operatingSystemsForVersion(version) - if checkSpecification.get('operatingSystems', None): - runnerImages = [image for image in runnerImages for operatingSystem in checkSpecification['operatingSystems'] - if image.startswith(operatingSystem)] + if any(not isCompatibleWithLatestImages(m['version']) for m in matrix): + steps.append({ + 'name': 'Set up Go', + 'if': "matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019'", + 'uses': 'actions/setup-go@v3', + 'with': { + 'go-version': '^1.13.1' + } + }) - for runnerImage in runnerImages: - matrix.append({ - 'os': runnerImage, - 'version': version - }) + steps.extend(checkSpecification['steps']) checkJob = { 'strategy': { diff --git a/src/analyze.test.ts b/src/analyze.test.ts index 33002c45dc..70b585c1bc 100644 --- a/src/analyze.test.ts +++ b/src/analyze.test.ts @@ -3,7 +3,6 @@ import * as path from "path"; import test, { ExecutionContext } from "ava"; import * as yaml from "js-yaml"; -import * as sinon from "sinon"; import { convertPackToQuerySuiteEntry, @@ -13,7 +12,6 @@ import { } from "./analyze"; import { setCodeQL } from "./codeql"; import { Config } from "./config-utils"; -import * as count from "./count-loc"; import { Language } from "./languages"; import { getRunnerLogger } from "./logging"; import { setupTests, setupActionsVars, createFeatures } from "./testing-utils"; @@ -25,12 +23,6 @@ setupTests(test); // and correct case of builtin or custom. Also checks the correct search // paths are set in the database analyze invocation. test("status report fields and search path setting", async (t) => { - const mockLinesOfCode = Object.values(Language).reduce((obj, lang, i) => { - // use a different line count for each language - obj[lang] = i + 1; - return obj; - }, {}); - sinon.stub(count, "countLoc").resolves(mockLinesOfCode); let searchPathsUsed: Array = []; return await util.withTmpDir(async (tmpDir) => { setupActionsVars(tmpDir, tmpDir); @@ -96,6 +88,7 @@ test("status report fields and search path setting", async (t) => { ); return ""; }, + databasePrintBaseline: async () => "", }); searchPathsUsed = []; @@ -202,35 +195,9 @@ test("status report fields and search path setting", async (t) => { t.true(`interpret_results_${language}_duration_ms` in customStatusReport); } - verifyLineCounts(tmpDir); verifyQuerySuites(tmpDir); }); - function verifyLineCounts(tmpDir: string) { - // eslint-disable-next-line github/array-foreach - Object.keys(Language).forEach((lang, i) => { - verifyLineCountForFile(path.join(tmpDir, `${lang}.sarif`), i + 1); - }); - } - - function verifyLineCountForFile(filePath: string, lineCount: number) { - const sarif = JSON.parse(fs.readFileSync(filePath, "utf8")); - t.deepEqual(sarif.runs[0].properties.metricResults, [ - { - rule: { - index: 0, - toolComponent: { - index: 0, - }, - }, - value: 123, - baseline: lineCount, - }, - ]); - // when the rule doesn't exist, it should not be added - t.deepEqual(sarif.runs[1].properties.metricResults, []); - } - function verifyQuerySuites(tmpDir: string) { const qlsContent = [ { diff --git a/src/analyze.ts b/src/analyze.ts index 8d637b091e..1f875adad1 100644 --- a/src/analyze.ts +++ b/src/analyze.ts @@ -8,14 +8,8 @@ import * as yaml from "js-yaml"; import { DatabaseCreationTimings } from "./actions-util"; import * as analysisPaths from "./analysis-paths"; -import { - CodeQL, - CODEQL_VERSION_COUNTS_LINES, - CODEQL_VERSION_NEW_TRACING, - getCodeQL, -} from "./codeql"; +import { CodeQL, CODEQL_VERSION_NEW_TRACING, getCodeQL } from "./codeql"; import * as configUtils from "./config-utils"; -import { countLoc } from "./count-loc"; import { FeatureEnablement } from "./feature-flags"; import { isScannedLanguage, Language } from "./languages"; import { Logger } from "./logging"; @@ -218,26 +212,6 @@ export async function runQueries( ): Promise { const statusReport: QueriesStatusReport = {}; - let locPromise: Promise>> = Promise.resolve( - {} - ); - const cliCanCountBaseline = await cliCanCountLoC(); - const countLocDebugMode = - process.env["INTERNAL_CODEQL_ACTION_DEBUG_LOC"] || config.debugMode; - if (!cliCanCountBaseline || countLocDebugMode) { - // count the number of lines in the background - locPromise = countLoc( - path.resolve(), - // config.paths specifies external directories. the current - // directory is included in the analysis by default. Replicate - // that here. - config.paths, - config.pathsIgnore, - config.languages, - logger - ); - } - const codeql = await getCodeQL(config.codeQLCmd); await util.logCodeScanningConfigInCli(codeql, featureEnablement, logger); @@ -255,13 +229,13 @@ export async function runQueries( if (!hasBuiltinQueries && !hasCustomQueries && !hasPackWithCustomQueries) { throw new Error( - `Unable to analyse ${language} as no queries were selected for this language` + `Unable to analyze ${language} as no queries were selected for this language` ); } try { if (await util.useCodeScanningConfigInCli(codeql, featureEnablement)) { - // If we are using the codescanning config in the CLI, + // If we are using the code scanning config in the CLI, // much of the work needed to generate the query suites // is done in the CLI. We just need to make a single // call to run all the queries for each language and @@ -346,20 +320,12 @@ export async function runQueries( sarifFile, config.debugMode ); - if (!cliCanCountBaseline) { - await injectLinesOfCode(sarifFile, language, locPromise); - } statusReport[`interpret_results_${language}_duration_ms`] = new Date().getTime() - startTimeInterpretResults; logger.endGroup(); logger.info(analysisSummary); } - if (!cliCanCountBaseline || countLocDebugMode) { - printLinesOfCodeSummary(logger, language, await locPromise); - } - if (cliCanCountBaseline) { - logger.info(await runPrintLinesOfCode(language)); - } + logger.info(await runPrintLinesOfCode(language)); } catch (e) { logger.info(String(e)); if (e instanceof Error) { @@ -394,13 +360,6 @@ export async function runQueries( ); } - async function cliCanCountLoC() { - return await util.codeQlVersionAbove( - await getCodeQL(config.codeQLCmd), - CODEQL_VERSION_COUNTS_LINES - ); - } - async function runPrintLinesOfCode(language: Language): Promise { const databasePath = util.getCodeQLDatabasePath(config, language); return await codeql.databasePrintBaseline(databasePath); @@ -548,50 +507,6 @@ export async function runCleanup( logger.endGroup(); } -async function injectLinesOfCode( - sarifFile: string, - language: Language, - locPromise: Promise>> -) { - const lineCounts = await locPromise; - if (language in lineCounts) { - const sarif = JSON.parse(fs.readFileSync(sarifFile, "utf8")); - - if (Array.isArray(sarif.runs)) { - for (const run of sarif.runs) { - run.properties = run.properties || {}; - run.properties.metricResults = run.properties.metricResults || []; - for (const metric of run.properties.metricResults) { - // Baseline is inserted when matching rule has tag lines-of-code - if (metric.rule && metric.rule.toolComponent) { - const matchingRule = - run.tool.extensions[metric.rule.toolComponent.index].rules[ - metric.rule.index - ]; - if (matchingRule.properties.tags?.includes("lines-of-code")) { - metric.baseline = lineCounts[language]; - } - } - } - } - } - - fs.writeFileSync(sarifFile, JSON.stringify(sarif)); - } -} - -function printLinesOfCodeSummary( - logger: Logger, - language: Language, - lineCounts: Partial> -) { - if (language in lineCounts) { - logger.info( - `Counted a baseline of ${lineCounts[language]} lines of code for ${language}.` - ); - } -} - // exported for testing export function validateQueryFilters(queryFilters?: configUtils.QueryFilter[]) { if (!queryFilters) { diff --git a/src/codeql.ts b/src/codeql.ts index eeb6f476aa..bda04e61d6 100644 --- a/src/codeql.ts +++ b/src/codeql.ts @@ -232,26 +232,19 @@ export const CODEQL_DEFAULT_ACTION_REPOSITORY = "github/codeql-action"; /** * The oldest version of CodeQL that the Action will run with. This should be - * at least three minor versions behind the current version. The version flags - * below can be used to conditionally enable certain features on versions newer - * than this. Please record the reason we cannot support an older version. + * at least three minor versions behind the current version and must include the + * CLI versions shipped with each supported version of GHES. * - * Reason: First version containing fix for the "We still have not reached - * idleness" deadlock. + * The version flags below can be used to conditionally enable certain features + * on versions newer than this. */ -const CODEQL_MINIMUM_VERSION = "2.4.5"; +const CODEQL_MINIMUM_VERSION = "2.6.3"; /** * Versions of CodeQL that version-flag certain functionality in the Action. * For convenience, please keep these in descending order. Once a version * flag is older than the oldest supported version above, it may be removed. */ -const CODEQL_VERSION_RAM_FINALIZE = "2.5.8"; -const CODEQL_VERSION_DIAGNOSTICS = "2.5.6"; -const CODEQL_VERSION_METRICS = "2.5.5"; -const CODEQL_VERSION_GROUP_RULES = "2.5.5"; -const CODEQL_VERSION_SARIF_GROUP = "2.5.3"; -export const CODEQL_VERSION_COUNTS_LINES = "2.6.2"; const CODEQL_VERSION_CUSTOM_QUERY_HELP = "2.7.1"; const CODEQL_VERSION_LUA_TRACER_CONFIG = "2.10.0"; export const CODEQL_VERSION_CONFIG_FILES = "2.10.1"; @@ -828,7 +821,7 @@ async function getCodeQLForCmd( } } - const configLocation = await generateCodescanningConfig( + const configLocation = await generateCodeScanningConfig( codeql, config, featureEnablement @@ -947,11 +940,10 @@ async function getCodeQLForCmd( "finalize", "--finalize-dataset", threadsFlag, + memoryFlag, ...getExtraOptionsFromEnv(["database", "finalize"]), databasePath, ]; - if (await util.codeQlVersionAbove(this, CODEQL_VERSION_RAM_FINALIZE)) - args.push(memoryFlag); await toolrunnerErrorCatcher(cmd, args, errorMatchers); }, async resolveLanguages() { @@ -1054,20 +1046,14 @@ async function getCodeQLForCmd( verbosityFlag, `--output=${sarifFile}`, addSnippetsFlag, + "--print-diagnostics-summary", + "--print-metrics-summary", + "--sarif-group-rules-by-pack", ...getExtraOptionsFromEnv(["database", "interpret-results"]), ]; - if (await util.codeQlVersionAbove(this, CODEQL_VERSION_DIAGNOSTICS)) - codeqlArgs.push("--print-diagnostics-summary"); - if (await util.codeQlVersionAbove(this, CODEQL_VERSION_METRICS)) - codeqlArgs.push("--print-metrics-summary"); - if (await util.codeQlVersionAbove(this, CODEQL_VERSION_GROUP_RULES)) - codeqlArgs.push("--sarif-group-rules-by-pack"); if (await util.codeQlVersionAbove(this, CODEQL_VERSION_CUSTOM_QUERY_HELP)) codeqlArgs.push("--sarif-add-query-help"); - if ( - automationDetailsId !== undefined && - (await util.codeQlVersionAbove(this, CODEQL_VERSION_SARIF_GROUP)) - ) { + if (automationDetailsId !== undefined) { codeqlArgs.push("--sarif-category", automationDetailsId); } if ( @@ -1176,8 +1162,8 @@ async function getCodeQLForCmd( await new toolrunner.ToolRunner(cmd, args).exec(); }, }; - // To ensure that status reports include the CodeQL CLI version whereever - // possbile, we want to call getVersion(), which populates the version value + // To ensure that status reports include the CodeQL CLI version wherever + // possible, we want to call getVersion(), which populates the version value // used by status reporting, at the earliest opportunity. But invoking // getVersion() directly here breaks tests that only pretend to create a // CodeQL object. So instead we rely on the assumption that all non-test @@ -1293,7 +1279,7 @@ async function runTool(cmd: string, args: string[] = []) { * @param config The configuration to use. * @returns the path to the generated user configuration file. */ -async function generateCodescanningConfig( +async function generateCodeScanningConfig( codeql: CodeQL, config: Config, featureEnablement: FeatureEnablement diff --git a/src/count-loc.test.ts b/src/count-loc.test.ts deleted file mode 100644 index 3a32ab6e1a..0000000000 --- a/src/count-loc.test.ts +++ /dev/null @@ -1,112 +0,0 @@ -import * as path from "path"; - -import test from "ava"; - -import { countLoc } from "./count-loc"; -import { Language } from "./languages"; -import { getRunnerLogger } from "./logging"; -import { setupTests } from "./testing-utils"; - -setupTests(test); - -test("ensure lines of code works for cpp and js", async (t) => { - const results = await countLoc( - path.join(__dirname, "../tests/multi-language-repo"), - [], - [], - [Language.cpp, Language.javascript], - getRunnerLogger(true) - ); - - t.deepEqual(results, { - cpp: 6, - javascript: 9, - }); -}); - -test("ensure lines of code works for csharp", async (t) => { - const results = await countLoc( - path.join(__dirname, "../tests/multi-language-repo"), - [], - [], - [Language.csharp], - getRunnerLogger(true) - ); - - t.deepEqual(results, { - csharp: 10, - }); -}); - -test("ensure lines of code can handle undefined language", async (t) => { - const results = await countLoc( - path.join(__dirname, "../tests/multi-language-repo"), - [], - [], - [Language.javascript, Language.python, "hucairz" as Language], - getRunnerLogger(true) - ); - - t.deepEqual(results, { - javascript: 9, - python: 5, - }); -}); - -test("ensure lines of code can handle empty languages", async (t) => { - const results = await countLoc( - path.join(__dirname, "../tests/multi-language-repo"), - [], - [], - [], - getRunnerLogger(true) - ); - - t.deepEqual(results, {}); -}); - -test("ensure lines of code can handle includes", async (t) => { - // note that "**" is always included. The includes are for extra - // directories outside the normal structure. - const results = await countLoc( - path.join(__dirname, "../tests/multi-language-repo"), - ["../../src/testdata"], - [], - [Language.javascript], - getRunnerLogger(true) - ); - - t.deepEqual(results, { - javascript: 12, - }); -}); - -test("ensure lines of code can handle empty includes", async (t) => { - // note that "**" is always included. The includes are for extra - // directories outside the normal structure. - const results = await countLoc( - path.join(__dirname, "../tests/multi-language-repo"), - ["idontexist"], - [], - [Language.javascript], - getRunnerLogger(true) - ); - - t.deepEqual(results, { - // should get no results - }); -}); - -test("ensure lines of code can handle exclude", async (t) => { - const results = await countLoc( - path.join(__dirname, "../tests/multi-language-repo"), - [], - ["**/*.py"], - [Language.javascript, Language.python], - getRunnerLogger(true) - ); - - t.deepEqual(results, { - javascript: 9, - }); -}); diff --git a/src/count-loc.ts b/src/count-loc.ts deleted file mode 100644 index a6ce43c141..0000000000 --- a/src/count-loc.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { LocDir } from "github-linguist"; - -import { Language } from "./languages"; -import { Logger } from "./logging"; - -// Map from linguist language names to language prefixes used in the action and codeql -const linguistToMetrics: Record = { - c: Language.cpp, - "c++": Language.cpp, - "c#": Language.csharp, - go: Language.go, - java: Language.java, - javascript: Language.javascript, - python: Language.python, - ruby: Language.ruby, - swift: Language.swift, - typescript: Language.javascript, -}; - -const nameToLinguist = Object.entries(linguistToMetrics).reduce( - (obj, [key, name]) => { - if (!obj[name]) { - obj[name] = []; - } - obj[name].push(key); - return obj; - }, - {} as Record -); - -/** - * Count the lines of code of the specified language using the include - * and exclude glob paths. - * - * @param cwd the root directory to start the count from - * @param include glob patterns to include in the search for relevant files - * @param exclude glob patterns to exclude in the search for relevant files - * @param dbLanguages list of languages to include in the results - * @param logger object to log results - */ -export async function countLoc( - cwd: string, - include: string[], - exclude: string[], - dbLanguages: Language[], - logger: Logger -): Promise>> { - const result = await new LocDir({ - cwd, - include: Array.isArray(include) && include.length > 0 ? include : ["**"], - exclude, - analysisLanguages: dbLanguages.flatMap((lang) => nameToLinguist[lang]), - }).loadInfo(); - - // The analysis counts LoC in all languages. We need to - // extract the languages we care about. Also, note that - // the analysis uses slightly different names for language. - const lineCounts = Object.entries(result.languages).reduce( - (obj, [language, { code }]) => { - const metricsLanguage = linguistToMetrics[language]; - if (metricsLanguage && dbLanguages.includes(metricsLanguage)) { - obj[metricsLanguage] = code + (obj[metricsLanguage] || 0); - } - return obj; - }, - {} as Record - ); - - if (Object.keys(lineCounts).length) { - logger.debug("Lines of code count:"); - for (const [language, count] of Object.entries(lineCounts)) { - logger.debug(` ${language}: ${count}`); - } - } else { - logger.info( - "Could not determine the baseline lines of code count in this repository. " + - "Because of this, it will not be possible to compare the lines " + - "of code analyzed by code scanning with the baseline. This will not affect " + - "the results produced by code scanning. If you have any questions, you can " + - "raise an issue at https://github.com/github/codeql-action/issues. Please " + - "include a link to the repository if public, or otherwise information about " + - "the code scanning workflow you are using." - ); - } - - return lineCounts; -}