diff --git a/.github/workflows/ci-npmcli-docs.yml b/.github/workflows/ci-npmcli-docs.yml index 30b17e284ee92..508073b6147f7 100644 --- a/.github/workflows/ci-npmcli-docs.yml +++ b/.github/workflows/ci-npmcli-docs.yml @@ -87,3 +87,45 @@ jobs: - name: Check Git Status if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js + + compare-docs: + name: Compare Docs + if: github.repository_owner == 'npm' && github.event_name == 'pull_request' + runs-on: ubuntu-latest + defaults: + run: + shell: bash + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Git User + run: | + git config --global user.email "npm-cli+bot@github.com" + git config --global user.name "npm CLI robot" + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: npm + - name: Reset Deps + run: node . run resetdeps + - name: Build Docs + run: | + node . run build -w docs + mv man/ man-update/ + mv docs/output/ docs/output-update/ + mv docs/content/ docs/content-update/ + - name: Get Current Docs + run: | + git clean -fd + git checkout ${{ github.event.pull_request.base.ref }} + node . run resetdeps + node . run build -w docs + - name: Diff Man + run: diff -r --color=always man/ man-update/ || true + - name: Diff HTML + run: diff -r --color=always docs/output/ docs/output-update/ || true + - name: Diff Markdown + run: diff -r --color=always docs/content/ docs/content-update/ || true diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 5fc347774d2da..0f68cac170deb 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -282,6 +282,8 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Pack + env: + SMOKE_PUBLISH_NPM: 1 run: | NPM_VERSION="$(node . --version)-$GITHUB_SHA.0" node . version $NPM_VERSION --ignore-scripts @@ -291,7 +293,7 @@ jobs: node scripts/remove-files.js # call installed npm instead of local source since we are testing # the packed tarball that we just installed globally - SMOKE_PUBLISH_NPM=1 npm test -w smoke-tests --ignore-scripts + npm test -w smoke-tests --ignore-scripts - name: Conclude Check uses: LouisBrunner/checks-action@v1.3.1 if: steps.check.outputs.check_id && always() diff --git a/.github/workflows/node-integration.yml b/.github/workflows/node-integration.yml new file mode 100644 index 0000000000000..f992a17b0f77b --- /dev/null +++ b/.github/workflows/node-integration.yml @@ -0,0 +1,494 @@ +# This file is automatically added by @npmcli/template-oss. Do not edit. + +name: nodejs integration + +on: + workflow_call: + inputs: + nodeVersion: + description: 'nodejs version' + required: true + type: string + default: nightly + npmVersion: + description: 'npm version' + required: true + type: string + default: git + installFlags: + description: 'extra flags to pass to npm install' + required: false + type: string + default: '' + + workflow_dispatch: + inputs: + nodeVersion: + description: 'nodejs version' + required: true + type: string + default: nightly + npmVersion: + description: 'npm version' + required: true + type: string + default: git + installFlags: + description: 'extra flags to pass to npm install' + required: false + type: string + default: '' + +jobs: + build-nodejs: + name: build nodejs@${{ inputs.nodeVersion }} npm@${{ inputs.npmVersion }} + runs-on: ubuntu-latest + outputs: + nodeVersion: ${{ steps.build-nodejs.outputs.nodeVersion }} + steps: + - name: setup ccache + uses: Chocobo1/setup-ccache-action@v1 + with: + override_cache_key: nodejs-${{ inputs.nodeVersion }} + - name: build nodejs + id: build-nodejs + run: | + echo "::group::setup" + set -eo pipefail + npmDir="${RUNNER_TEMP}/npm" + sourceDir="${RUNNER_TEMP}/src" + targetDir="${RUNNER_TEMP}/build" + npmFile="${RUNNER_TEMP}/npm.tgz" + sourceFile="${RUNNER_TEMP}/source.tgz" + targetFile="${RUNNER_TEMP}/build.tgz" + echo "::endgroup::" + + echo "::group::finding nodejs version matching ${{ inputs.nodeVersion }}" + if [[ "${{ inputs.nodeVersion }}" == "nightly" ]]; then + nodeVersion=$(curl -sSL https://nodejs.org/download/nightly/index.json | jq -r .[0].version) + nodeUrl="https://nodejs.org/download/nightly/${nodeVersion}/node-${nodeVersion}.tar.gz" + else + nodeVersion=$(curl -sSL https://nodejs.org/download/release/index.json | jq -r 'map(select(.version | test("^v${{ inputs.nodeVersion }}"))) | .[0].version') + if [[ -z "$nodeVersion" ]]; then + echo "::error ::unable to find released nodejs version matching: ${{ inputs.nodeVersion }}" + exit 1 + fi + nodeUrl="https://nodejs.org/download/release/${nodeVersion}/node-${nodeVersion}.tar.gz" + fi + echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT + echo "::endgroup::" + + echo "::group::extracting source from $nodeUrl" + mkdir -p "$sourceDir" + curl -sSL "$nodeUrl" | tar xz -C "$sourceDir" --strip=1 + echo "::endgroup::" + + echo "::group::cloning npm" + mkdir -p "$npmDir" + git clone https://github.com/npm/cli.git "$npmDir" + npmVersion=$(cat "${npmDir}/package.json" | jq -r '"\(.version)-git"') + echo "::endgroup::" + + if [[ "${{ inputs.npmVersion }}" != "git" ]]; then + npmVersion="${{ inputs.npmVersion }}" + npmVersion="${npmVersion#v}" + echo "::group::checking out npm@${npmVersion}" + pushd "$npmDir" >/dev/null + taggedSha=$(git show-ref --tags "v${npmVersion}" | cut -d' ' -f1) + git reset --hard "$taggedSha" + publishedSha=$(curl -sSL https://registry.npmjs.org/npm | jq -r --arg ver "$npmVersion" '.versions[$ver].gitHead') + if [[ "$taggedSha" != "$publishedSha" ]]; then + echo "::warning ::git tag ($taggedSha) differs from published tag ($publishedSha)" + fi + popd >/dev/null + echo "::endgroup::" + fi + + echo "::group::packing npm release $npmVersion" + pushd "$npmDir" >/dev/null + node . run resetdeps + npmtarball="$(node . pack --loglevel=silent --json | jq -r .[0].filename)" + tar czf "$npmFile" -C "$npmDir" . + popd >/dev/null + echo "npm=$npmFile" >> $GITHUB_OUTPUT + echo "::endgroup::" + + echo "::group::updating nodejs bundled npm" + rm -rf "${sourceDir}/deps/npm" + mkdir -p "${sourceDir}/deps/npm" + tar xfz "${npmDir}/${npmtarball}" -C "${sourceDir}/deps/npm" --strip=1 + echo "::endgroup::" + + echo "::group::packing nodejs source" + tar cfz "$sourceFile" -C "$sourceDir" . + echo "source=$sourceFile" >> $GITHUB_OUTPUT + echo "::endgroup::" + + echo "::group::building nodejs" + mkdir -p "$targetDir" + pushd "$sourceDir" >/dev/null + ./configure --prefix="$targetDir" + make -j4 install + popd >/dev/null + echo "::endgroup::" + + echo "::group::packing nodejs build" + tar cfz "$targetFile" -C "$targetDir" . + echo "build=$targetFile" >> $GITHUB_OUTPUT + echo "::endgroup::" + - name: upload artifacts + uses: actions/upload-artifact@v3 + with: + name: nodejs-${{ steps.build-nodejs.outputs.nodeVersion }} + path: | + ${{ steps.build-nodejs.outputs.source }} + ${{ steps.build-nodejs.outputs.build }} + ${{ steps.build-nodejs.outputs.npm }} + + test-nodejs: + name: test nodejs + runs-on: ubuntu-latest + needs: + - build-nodejs + steps: + - name: setup ccache + uses: Chocobo1/setup-ccache-action@v1 + with: + override_cache_key: nodejs-${{ inputs.nodeVersion }} + - name: download artifacts + uses: actions/download-artifact@v3 + with: + name: nodejs-${{ needs.build-nodejs.outputs.nodeVersion }} + - name: test nodejs + run: | + set -e + tar xf source.tgz + ./configure + make -j4 test-only + + test-npm: + name: test npm + runs-on: ubuntu-latest + needs: + - build-nodejs + steps: + - name: download artifacts + uses: actions/download-artifact@v3 + with: + name: nodejs-${{ needs.build-nodejs.outputs.nodeVersion }} + path: ${{ runner.temp }} + - name: install nodejs ${{ needs.build-nodejs.outputs.nodeVersion }} + id: install + run: | + set -e + mkdir -p "${RUNNER_TEMP}/node" + tar xf "${RUNNER_TEMP}/build.tgz" -C "${RUNNER_TEMP}/node" + + mkdir -p "${RUNNER_TEMP}/npm" + tar xf "${RUNNER_TEMP}/npm.tgz" -C "${RUNNER_TEMP}/npm" + + echo "${RUNNER_TEMP}/node/bin" >> $GITHUB_PATH + echo "cache=$(npm config get cache)" >> $GITHUB_OUTPUT + - name: setup npm cache + uses: actions/cache@v3 + with: + path: ${{ steps.install.outputs.cache }} + key: npm-tests + - run: node --version + - run: npm --version + - name: test npm + run: | + echo "::group::setup" + set -e + cd "${RUNNER_TEMP}/npm" + echo "::endgroup::" + + echo "::group::npm run resetdeps" + node . run resetdeps + echo "::endgroup::" + + echo "::group::npm link" + node . link + echo "::endgroup::" + + STEPEXIT=0 + FINALEXIT=0 + + set +e + echo "::group::npm test" + node . test --ignore-scripts + STEPEXIT=$? + if [[ $STEPEXIT -ne 0 ]]; then + echo "::warning ::npm test failed, exit: $STEPEXIT" + FINALEXIT=STEPEXIT + fi + echo "::endgroup::" + + for workspace in $(npm query .workspace | jq -r .[].name); do + echo "::group::npm test -w $workspace" + node . test -w $workspace --if-present --ignore-scripts + STEPEXIT=$? + if [[ $STEPEXIT -ne 0 ]]; then + echo "::warning ::npm test -w $workspace failed, exit: $STEPEXIT" + FINALEXIT=STEPEXIT + fi + echo "::endgroup::" + done + + exit $FINALEXIT + + generate-matrix: + name: generate matrix + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.generate-matrix.outputs.matrix }} + steps: + - name: install dependencies + run: | + npm install --no-save --no-audit --no-fund citgm npm-package-arg + - name: generate matrix + id: generate-matrix + uses: actions/github-script@v6 + env: + NODE_VERSION: "${{ inputs.nodeVersion }}" + INSTALL_FLAGS: "${{ inputs.installFlags }}" + with: + script: | + const { NODE_VERSION, INSTALL_FLAGS } = process.env + + const { execSync } = require('child_process') + const npa = require('npm-package-arg') + + const lookup = require('./node_modules/citgm/lib/lookup.json') + + const matchesKeyword = (value) => { + const keywords = ['ubuntu', 'debian', 'linux', 'x86', '>=11', '>=12', '>=16', '>=17'] + if (value === true || + (typeof value === 'string' && keywords.includes(value)) || + (Array.isArray(value) && keywords.some((keyword) => value.includes(keyword) || value.includes(true)))) { + return true + } + + return false + } + + // this is a manually updated list of packages that we know currently fail + const knownFailures = [ + 'body-parser', // json parsing error difference + 'clinic', // unknown, lots of failures + 'ember-cli', // timeout in nodejs ci, one failing test for us that timed out + 'express', // body-parser is what actually fails, it's used in a test + 'https-proxy-agent', // looks ssl related + 'node-gyp', // one test consistently times out + 'resolve', // compares results to require.resolve and fails, also missing inspector/promises + 'uuid', // tests that crypto.getRandomValues throws but it doesn't + 'weak', // doesn't seem to build in node >12 + 'mkdirp', // failing actions in own repo + 'undici', // test failure in node >=18, unable to root cause + ] + + if (NODE_VERSION === '18') { + knownFailures.push('multer') + } else if (NODE_VERSION === '19') { + // empty block + } else if (NODE_VERSION === 'nightly') { + // fails in node 20, looks like a streams issue + knownFailures.push('fastify') + // esbuild barfs on node 20.0.0-pre + knownFailures.push('serialport') + } + + // this is a manually updated list of packages that are flaky + const supplementalFlaky = [ + 'pino', // flaky test test/transport/core.test.js:401 + 'tough-cookie', // race condition test/node_util_fallback_test.js:87 + ] + + const matrix = [] + for (const package in lookup) { + const meta = lookup[package] + + // we omit npm from the matrix because its tests are run as their own job + if (matchesKeyword(meta.skip) || meta.yarn === true || package === 'npm') { + continue + } + + const install_flags = ['--no-audit', '--no-fund'] + if (meta.install) { + install_flags.push(meta.install.slice(1)) + } + if (INSTALL_FLAGS) { + install_flags.push(INSTALL_FLAGS) + } + const context = JSON.parse(execSync(`npm show ${package} --json`)) + const test = meta.scripts ? meta.scripts.map((script) => `npm run ${script}`) : ['npm test'] + + const repo = npa(meta.repo || context.repository.url).hosted + const details = {} + if (meta.useGitClone) { + details.repo = repo.https() + } else { + if (meta.ignoreGitHead) { + details.url = repo.tarball() + } else { + details.url = repo.tarball({ committish: context.gitHead }) + } + } + + const env = { ...meta.envVar } + matrix.push({ + package, + version: context.version, + env, + install_flags: install_flags.join(' '), + commands: [...test], + flaky: matchesKeyword(meta.flaky) || supplementalFlaky.includes(package), + knownFailure: knownFailures.includes(package), + ...details, + }) + } + core.setOutput('matrix', matrix) + + citgm: + name: citgm - ${{ matrix.package }}@${{ matrix.version }} ${{ matrix.flaky && '(flaky)' || '' }} ${{ matrix.knownFailure && '(known failure)' || '' }} + runs-on: ubuntu-latest + needs: + - build-nodejs + - generate-matrix + strategy: + fail-fast: false + matrix: + include: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} + steps: + - name: download artifacts + uses: actions/download-artifact@v3 + with: + name: nodejs-${{ needs.build-nodejs.outputs.nodeVersion }} + path: ${{ runner.temp }} + - name: install nodejs ${{ needs.build-nodejs.outputs.nodeVersion }} + id: install + run: | + set -e + mkdir -p "${RUNNER_TEMP}/node" + tar xf "${RUNNER_TEMP}/build.tgz" -C "${RUNNER_TEMP}/node" + echo "nodedir=${RUNNER_TEMP}/node" >> $GITHUB_OUTPUT + + echo "${RUNNER_TEMP}/node/bin" >> $GITHUB_PATH + echo "cache=$(npm config get cache)" >> $GITHUB_OUTPUT + - name: setup npm cache + uses: actions/cache@v3 + with: + path: ${{ steps.install.outputs.cache }} + key: npm-${{ matrix.package }} + - run: node --version + - run: npm --version + - name: download source + id: download + run: | + set -eo pipefail + TARGET_DIR="${RUNNER_TEMP}/${{ matrix.package }}" + mkdir -p "$TARGET_DIR" + echo "target=$TARGET_DIR" >> $GITHUB_OUTPUT + + if [[ -n "${{ matrix.repo }}" ]]; then + export GIT_TERMINAL_PROMPT=0 + export GIT_SSH_COMMAND="ssh -oBatchMode=yes" + git clone --recurse-submodules "${{ matrix.repo }}" "$TARGET_DIR" + elif [[ -n "${{ matrix.url }}" ]]; then + curl -sSL "${{ matrix.url }}" | tar xz -C "$TARGET_DIR" --strip=1 + fi + + if [[ -f "${TARGET_DIR}/package-lock.json" ]]; then + lockfileVersion=$(cat "${TARGET_DIR}/package-lock.json" | jq .lockfileVersion) + echo "lockfileVersion=$lockfileVersion" >> $GITHUB_OUTPUT + fi + - name: npm install ${{ matrix.install_flags }} + id: npm-install + working-directory: ${{ steps.download.outputs.target }} + run: | + set +e + npm install --nodedir="${{steps.install.outputs.nodedir }}" ${{ matrix.install_flags }} + exitcode=$? + if [[ $exitcode -ne 0 && "${{ matrix.knownFailure }}" == "true" ]]; then + echo "::warning ::npm install failed, exit $exitcode" + echo "failed=true" >> $GITHUB_OUTPUT + exit 0 + fi + exit $exitcode + - name: verify lockfileVersion unchanged + working-directory: ${{ steps.download.outputs.target }} + if: ${{ steps.download.outputs.lockfileVersion && steps.npm-install.outputs.failed != 'true' }} + run: | + if [[ -f "package-lock.json" ]]; then + newLockfileVersion=$(cat "package-lock.json" | jq .lockfileVersion) + if [[ "$newLockfileVersion" -ne "${{ steps.download.outputs.lockfileVersion }}" ]]; then + if [[ "${{ steps.download.outputs.lockfileVersion }}" -ne 1 ]]; then + echo "::error ::lockfileVersion changed from ${{ steps.download.outputs.lockfileVersion }} to $newLockfileVersion" + exit 1 + fi + fi + fi + - name: npm ls + working-directory: ${{ steps.download.outputs.target }} + if: ${{ steps.npm-install.outputs.failed != 'true' }} + run: | + npm ls + - name: ${{ join(matrix.commands, ' && ') }} + id: command + continue-on-error: true + timeout-minutes: 10 + env: ${{ matrix.env }} + working-directory: ${{ steps.download.outputs.target }} + if: ${{ steps.npm-install.outputs.failed != 'true' }} + run: | + set +e + FINALEXIT=0 + STEPEXIT=0 + + export npm_config_nodedir="${{ steps.install.outputs.nodedir }}" + + # inlining some patches to make tests run + if [[ "${{ matrix.package }}" == "undici" ]]; then + sed -i.bak 's/--experimental-wasm-simd //' package.json + rm -f package.json.bak + sed -i.bak 's/--experimental-wasm-simd//' .taprc + rm -f .taprc.bak + fi + + commandCount=$(echo '${{ toJSON(matrix.commands) }}' | jq -r 'length') + if [[ $commandCount -eq 1 ]]; then + COMMAND=$(echo '${{ toJSON(matrix.commands) }}' | jq -r '.[0]') + $COMMAND + STEPEXIT=$? + if [[ $STEPEXIT -ne 0 ]]; then + if [[ "${{ matrix.flaky }}" == "true" || "${{ matrix.knownFailure }}" == "true" ]]; then + echo "::warning ::$COMMAND failed, exit $STEPEXIT" + exit 0 + fi + fi + exit $STEPEXIT + fi + + for row in $(echo '${{ toJSON(matrix.commands) }}' | jq -r '.[] | @base64'); do + COMMAND=$(echo "$row" | base64 --decode) + echo "::group::$COMMAND" + $COMMAND + STEPEXIT=$? + if [[ $STEPEXIT -ne 0 ]]; then + if [[ "${{ matrix.flaky }}" == "true" || "${{ matrix.knownFailure }}" == "true" ]]; then + echo "::warning ::$COMMAND failed, exit: $STEPEXIT" + else + FINALEXIT=$STEPEXIT + echo "::error ::$COMMAND failed, exit: $STEPEXIT" + fi + fi + echo "::endgroup::" + done + exit $FINALEXIT + - name: Set conclusion + run: | + EXIT=1 + if [[ "${{ steps.command.outcome }}" == "success" || "${{ matrix.flaky }}" == "true" || "${{ matrix.knownFailure }}" == "true" ]]; then + EXIT=0 + fi + exit $EXIT diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33c44a3495c81..1e1c0597dbd61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -310,41 +310,17 @@ jobs: needs: release name: Release Integration if: needs.release.outputs.release - runs-on: ubuntu-latest - defaults: - run: - shell: bash - steps: - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 16.x - - name: View in Registry - run: | - EXIT_CODE=0 - - function is_published { - if npm view "$@" --loglevel=error > /dev/null; then - echo 0 - else - echo 1 - fi - } - - for release in $(echo '${{ needs.release.outputs.releases }}' | jq -r '.[] | @base64'); do - name=$(echo "$release" | base64 --decode | jq -r .pkgName) - version=$(echo "$release" | base64 --decode | jq -r .version) - spec="$name@$version" - status=$(is_published "$spec") - if [[ "$status" -eq 1 ]]; then - echo "$spec ERROR" - EXIT_CODE=$status - else - echo "$spec OK" - fi - done - - exit $EXIT_CODE + strategy: + fail-fast: false + matrix: + nodeVersion: + - 18 + - 19 + - nightly + uses: ./.github/workflows/node-integration.yml + with: + nodeVersion: ${{ matrix.nodeVersion }} + npmVersion: ${{ fromJSON(needs.release.outputs.release).version }} post-release-integration: needs: [ release, release-integration ] diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index ac0dba34d72f5..5fde4e9bf74c9 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -196,8 +196,8 @@ graph LR; npmcli-config-->semver; npmcli-docs-->ignore-walk; npmcli-docs-->npmcli-eslint-config["@npmcli/eslint-config"]; - npmcli-docs-->npmcli-fs["@npmcli/fs"]; npmcli-docs-->npmcli-template-oss["@npmcli/template-oss"]; + npmcli-docs-->semver; npmcli-fs-->semver; npmcli-git-->npm-pick-manifest; npmcli-git-->npmcli-promise-spawn["@npmcli/promise-spawn"]; @@ -266,6 +266,7 @@ graph LR; bin-links-->rimraf; bin-links-->write-file-atomic; brace-expansion-->balanced-match; + brace-expansion-->concat-map; builtins-->semver; cacache-->chownr; cacache-->fs-minipass; @@ -645,17 +646,20 @@ graph LR; npmcli-config-->semver; npmcli-config-->walk-up-path; npmcli-disparity-colors-->ansi-styles; - npmcli-docs-->cmark-gfm; npmcli-docs-->front-matter; npmcli-docs-->ignore-walk; npmcli-docs-->isaacs-string-locale-compare["@isaacs/string-locale-compare"]; npmcli-docs-->jsdom; - npmcli-docs-->marked-man; - npmcli-docs-->mkdirp; npmcli-docs-->npmcli-eslint-config["@npmcli/eslint-config"]; - npmcli-docs-->npmcli-fs["@npmcli/fs"]; npmcli-docs-->npmcli-template-oss["@npmcli/template-oss"]; + npmcli-docs-->rehype-stringify; + npmcli-docs-->remark-gfm; + npmcli-docs-->remark-man; + npmcli-docs-->remark-parse; + npmcli-docs-->remark-rehype; + npmcli-docs-->semver; npmcli-docs-->tap; + npmcli-docs-->unified; npmcli-docs-->yaml; npmcli-fs-->gar-promisify["@gar/promisify"]; npmcli-fs-->semver; @@ -795,6 +799,6 @@ packages higher up the chain. - pacote, libnpmaccess, libnpmhook, libnpmorg, libnpmsearch, libnpmteam, npm-profile - npm-registry-fetch, libnpmversion - @npmcli/git, make-fetch-happen, @npmcli/config, init-package-json - - @npmcli/docs, @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, @npmcli/run-script, npm-packlist, read-package-json, @npmcli/query, readdir-scoped-modules, promzard - - @npmcli/fs, npm-bundled, read-package-json-fast, unique-filename, @npmcli/promise-spawn, npm-install-checks, npm-package-arg, normalize-package-data, @npmcli/package-json, bin-links, nopt, npmlog, parse-conflict-json, dezalgo, read - - @npmcli/eslint-config, semver, @npmcli/template-oss, ignore-walk, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, @npmcli/move-file, fs-minipass, infer-owner, ssri, unique-slug, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, wrappy, treeverse, minify-registry-metadata, @npmcli/disparity-colors, @npmcli/ci-detect, mute-stream, ini, npm-audit-report, npm-user-validate + - @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, @npmcli/run-script, npm-packlist, read-package-json, @npmcli/query, readdir-scoped-modules, promzard + - @npmcli/docs, npm-bundled, read-package-json-fast, @npmcli/fs, unique-filename, @npmcli/promise-spawn, npm-install-checks, npm-package-arg, normalize-package-data, @npmcli/package-json, bin-links, nopt, npmlog, parse-conflict-json, dezalgo, read + - @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, @npmcli/move-file, fs-minipass, infer-owner, ssri, unique-slug, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, wrappy, treeverse, minify-registry-metadata, @npmcli/disparity-colors, @npmcli/ci-detect, mute-stream, ini, npm-audit-report, npm-user-validate diff --git a/docs/bin/build.js b/docs/bin/build.js index 6832274fde2e6..b94a85cf6f9bc 100644 --- a/docs/bin/build.js +++ b/docs/bin/build.js @@ -1,3 +1,17 @@ +if ( + process.env.SMOKE_PUBLISH_NPM && + !require('semver').satisfies(process.version, require('../package.json').engines.node) +) { + // The docs tooling is kept in sync between releases and dependencies that are not compatible + // with the lower bound of npm@8 engines are used. When we run the SMOKE_PUBLISH_NPM we are + // testing that npm is able to pack and install itself locally and then run its own smoke tests. + // Packing will run this script automatically so in the cases where the node version is + // not compatible, it is ok to bail on this script since the generated docs are not used in + // the smoke tests. + console.log(`Skipping docs build due to SMOKE_PUBLISH_NPM and ${process.version}`) + return +} + const run = require('../lib/build.js') const { paths } = require('../lib/index') diff --git a/docs/lib/build.js b/docs/lib/build.js index bcfb2f11eea22..563b4064277f1 100644 --- a/docs/lib/build.js +++ b/docs/lib/build.js @@ -1,5 +1,5 @@ const { join, dirname, basename, extname, sep, posix } = require('path') -const fs = require('@npmcli/fs') +const fs = require('fs/promises') const ignoreWalk = require('ignore-walk') const yaml = require('yaml') const parseFrontMatter = require('front-matter') @@ -19,12 +19,31 @@ const readHtml = (path) => fs.readFile(path, 'utf-8') const readYaml = (path) => fs.readFile(path, 'utf-8').then(yaml.parse) const makeTransforms = (...args) => (src, trs) => trs.reduce((acc, tr) => tr(acc, ...args), src) +const pAll = async (obj) => { + const entries = Object.entries(obj) + const results = await Promise.all(entries.map(e => e[1])) + return results.reduce((acc, res, index) => { + acc[entries[index][0]] = res + return acc + }, {}) +} + const run = async ({ content, template, nav, man, html, md }) => { - const [contentPaths, templateFile, navFile] = await Promise.all([ + await rmAll(man, html, md) + const [contentPaths, navFile, options] = await Promise.all([ readDocs(content), - readHtml(template), readYaml(nav), - rmAll(man, html, md), + pAll({ + template: readHtml(template), + // these deps are esm only so we have to import them once we + // are inside our main async function + unified: import('unified').then(r => r.unified), + remarkParse: import('remark-parse').then(r => r.default), + remarkGfm: import('remark-gfm').then(r => r.default), + remarkRehype: import('remark-rehype').then(r => r.default), + rehypeStringify: import('rehype-stringify').then(r => r.default), + remarkMan: import('remark-man').then(r => r.default), + }), ]) const sources = await Promise.all(contentPaths.map(async (childPath) => { @@ -61,7 +80,7 @@ const run = async ({ content, template, nav, man, html, md }) => { github_path: 'docs/content', }, frontmatter, - template: templateFile, + ...options, }) const transformedSrc = applyTransforms(body, [ diff --git a/docs/lib/index.js b/docs/lib/index.js index a3270f00a87cb..fce78d7a14fbc 100644 --- a/docs/lib/index.js +++ b/docs/lib/index.js @@ -1,4 +1,3 @@ -const marked = require('marked-man') const localeCompare = require('@isaacs/string-locale-compare')('en') const { join, basename, resolve } = require('path') const transformHTML = require('./transform-html.js') @@ -41,11 +40,12 @@ const getCommandByDoc = (docFile, docExt) => { // `npx` is not technically a command in and of itself, // so it just needs the usage of npm exex const srcName = name === 'npx' ? 'exec' : name - const { params, usage = [''] } = require(`../../lib/commands/${srcName}`) + const { params, usage = [''], workspaces } = require(`../../lib/commands/${srcName}`) const usagePrefix = name === 'npx' ? 'npx' : `npm ${name}` return { name, + workspaces, params: name === 'npx' ? null : params, usage: usage.map(u => `${usagePrefix} ${u}`.trim()).join('\n'), } @@ -67,11 +67,9 @@ const replaceUsage = (src, { path }) => { }, []) if (cmdAliases.length === 1) { - synopsis.push('') - synopsis.push(`alias: ${cmdAliases[0]}`) + synopsis.push('', `alias: ${cmdAliases[0]}`) } else if (cmdAliases.length > 1) { - synopsis.push('') - synopsis.push(`aliases: ${cmdAliases.join(', ')}`) + synopsis.push('', `aliases: ${cmdAliases.join(', ')}`) } synopsis.push('```') @@ -142,8 +140,11 @@ const replaceHelpLinks = (src) => { ) } -const transformMan = (src, { data }) => - marked(`# ${data.title}(${data.section}) - ${data.description}\n\n${src}`) +const transformMan = (src, { data, unified, remarkParse, remarkMan }) => unified() + .use(remarkParse) + .use(remarkMan) + .processSync(`# ${data.title}(${data.section}) - ${data.description}\n\n${src}`) + .toString() const manPath = (name, { data }) => join(`man${data.section}`, `${name}.${data.section}`) diff --git a/docs/lib/transform-html.js b/docs/lib/transform-html.js index 8d13968a40fbd..c587d75e994f8 100644 --- a/docs/lib/transform-html.js +++ b/docs/lib/transform-html.js @@ -1,22 +1,18 @@ -const cmark = require('cmark-gfm') const jsdom = require('jsdom') -function transformHTML (src, { path, template, data }) { - // Render the markdown into an HTML snippet using a GFM renderer. - // This has to use the sync API due to a bug where the promise method - // doesn't properly apply the extensions so links dont get autolinked. - const content = cmark.renderHtmlSync(src, { - smart: false, - githubPreLang: true, - strikethroughDoubleTilde: true, - unsafe: false, - extensions: { - table: true, - strikethrough: true, - tagfilter: true, - autolink: true, - }, - }) +function transformHTML ( + src, + { path, template, data, unified, remarkParse, remarkGfm, remarkRehype, rehypeStringify } +) { + const content = unified() + .use(remarkParse) + .use(remarkGfm, { + singleTilde: false, + }) + .use(remarkRehype) + .use(rehypeStringify) + .processSync(src) + .toString() // Inject this data into the template, using a mustache-like // replacement scheme. diff --git a/docs/package.json b/docs/package.json index f5070578390cb..8a40feef3749f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -11,11 +11,8 @@ "lintfix": "node .. run lint -- --fix", "snap": "tap", "test": "tap", - "pretest": "node .. run rebuild-cmark", "posttest": "node .. run lint", - "build": "node bin/build.js", - "prebuild": "node .. run rebuild-cmark", - "rebuild-cmark": "node ../scripts/rebuild.js cmark-gfm" + "build": "node bin/build.js" }, "repository": { "type": "git", @@ -25,16 +22,19 @@ "devDependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/eslint-config": "^3.1.0", - "@npmcli/fs": "^2.1.0", "@npmcli/template-oss": "4.11.4", - "cmark-gfm": "^0.9.0", "front-matter": "^4.0.2", "ignore-walk": "^5.0.1", "jsdom": "^18.1.0", - "marked-man": "^0.7.0", - "mkdirp": "^1.0.4", - "tap": "^16.0.1", - "yaml": "^1.10.2" + "rehype-stringify": "^9.0.3", + "remark-gfm": "^3.0.1", + "remark-man": "^8.0.1", + "remark-parse": "^10.0.1", + "remark-rehype": "^10.1.0", + "semver": "^7.3.8", + "tap": "^16.3.4", + "unified": "^10.1.2", + "yaml": "^2.2.1" }, "author": "GitHub Inc.", "license": "ISC", @@ -43,7 +43,7 @@ "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "tap": { "timeout": 600, @@ -55,8 +55,13 @@ "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "ciVersions": "latest", - "engines": "^12.13.0 || ^14.15.0 || >=16.0.0", + "engines": "^14.17.0 || ^16.13.0 || >=18.0.0", "version": "4.11.4", - "content": "../scripts/template-oss/index.js" + "content": "../scripts/template-oss/index.js", + "workspaceRepo": { + "add": { + ".github/workflows/ci-{{ pkgNameFs }}.yml": "ci-npmcli-docs.yml" + } + } } } diff --git a/package-lock.json b/package-lock.json index 412e8dbfe5875..7906ac7eadb15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -193,19 +193,205 @@ "devDependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/eslint-config": "^3.1.0", - "@npmcli/fs": "^2.1.0", "@npmcli/template-oss": "4.11.4", - "cmark-gfm": "^0.9.0", "front-matter": "^4.0.2", "ignore-walk": "^5.0.1", "jsdom": "^18.1.0", - "marked-man": "^0.7.0", - "mkdirp": "^1.0.4", - "tap": "^16.0.1", - "yaml": "^1.10.2" + "rehype-stringify": "^9.0.3", + "remark-gfm": "^3.0.1", + "remark-man": "^8.0.1", + "remark-parse": "^10.0.1", + "remark-rehype": "^10.1.0", + "semver": "^7.3.8", + "tap": "^16.3.4", + "unified": "^10.1.2", + "yaml": "^2.2.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "docs/node_modules/acorn-globals": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "dev": true, + "dependencies": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + } + }, + "docs/node_modules/acorn-globals/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "docs/node_modules/acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "docs/node_modules/ignore-walk": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.1.tgz", + "integrity": "sha512-/c8MxUAqpRccq+LyDOecwF+9KqajueJHh8fz7g3YqjMZt+NSfJzx05zrKiXwa2sKwFCzaiZ5qUVfRj0pmxixEA==", + "dev": true, + "dependencies": { + "minimatch": "^6.1.6" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "docs/node_modules/jsdom": { + "version": "18.1.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-18.1.1.tgz", + "integrity": "sha512-NmJQbjQ/gpS/1at/ce3nCx89HbXL/f5OcenBe8wU1Eik0ROhyUc3LtmG3567dEHAGXkN8rmILW/qtCOPxPHQJw==", + "dev": true, + "dependencies": { + "abab": "^2.0.5", + "acorn": "^8.5.0", + "acorn-globals": "^6.0.0", + "cssom": "^0.5.0", + "cssstyle": "^2.3.0", + "data-urls": "^3.0.1", + "decimal.js": "^10.3.1", + "domexception": "^4.0.0", + "escodegen": "^2.0.0", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^3.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^10.0.0", + "ws": "^8.2.3", + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "docs/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "docs/node_modules/minimatch": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.2.0.tgz", + "integrity": "sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "docs/node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "docs/node_modules/saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dev": true, + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=10" + } + }, + "docs/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "docs/node_modules/w3c-xmlserializer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz", + "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==", + "dev": true, + "dependencies": { + "xml-name-validator": "^4.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "docs/node_modules/whatwg-url": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", + "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", + "dev": true, + "dependencies": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "docs/node_modules/yaml": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.1.tgz", + "integrity": "sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==", + "dev": true, + "engines": { + "node": ">= 14" } }, "node_modules/@actions/core": { @@ -3185,6 +3371,15 @@ "@types/ms": "*" } }, + "node_modules/@types/hast": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz", + "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -3237,6 +3432,12 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, + "node_modules/@types/parse5": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", + "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==", + "dev": true + }, "node_modules/@types/unist": { "version": "2.0.6", "dev": true, @@ -3267,9 +3468,10 @@ } }, "node_modules/abab": { - "version": "2.0.5", - "dev": true, - "license": "BSD-3-Clause" + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "dev": true }, "node_modules/abbrev": { "version": "1.1.1", @@ -3289,9 +3491,10 @@ } }, "node_modules/acorn": { - "version": "7.4.1", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -3299,15 +3502,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-globals": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" - } - }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -3319,9 +3513,10 @@ } }, "node_modules/acorn-walk": { - "version": "7.2.0", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -3695,24 +3890,6 @@ "node": ">=10" } }, - "node_modules/bindings": { - "version": "1.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -3741,31 +3918,9 @@ }, "node_modules/browser-process-hrtime": { "version": "1.0.0", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/buffer": { - "version": "5.7.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true }, "node_modules/buffer-from": { "version": "1.1.1", @@ -3937,6 +4092,26 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chokidar": { "version": "3.5.1", "dev": true, @@ -4029,20 +4204,6 @@ "node": ">=0.8" } }, - "node_modules/cmark-gfm": { - "version": "0.9.0", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "bindings": "^1.5.0", - "node-addon-api": "^3.0.0", - "prebuild-install": "^6.0.0" - }, - "engines": { - "node": ">= 12" - } - }, "node_modules/cmd-shim": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-5.0.0.tgz", @@ -4208,6 +4369,16 @@ "node": ">= 0.8" } }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/common-ancestor-path": { "version": "1.0.1", "license": "ISC" @@ -4510,13 +4681,14 @@ } }, "node_modules/data-urls": { - "version": "3.0.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", + "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", "dev": true, - "license": "MIT", "dependencies": { - "abab": "^2.0.3", + "abab": "^2.0.6", "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^10.0.0" + "whatwg-url": "^11.0.0" }, "engines": { "node": ">=12" @@ -4591,9 +4763,10 @@ } }, "node_modules/decimal.js": { - "version": "10.3.1", - "dev": true, - "license": "MIT" + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true }, "node_modules/decode-named-character-reference": { "version": "1.0.2", @@ -4608,27 +4781,8 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/decompress-response": { - "version": "4.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-response": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", + "node_modules/deep-is": { + "version": "0.1.4", "dev": true, "license": "MIT" }, @@ -4721,17 +4875,6 @@ "node": ">=8" } }, - "node_modules/detect-libc": { - "version": "1.0.3", - "dev": true, - "license": "Apache-2.0", - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/dezalgo": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", @@ -4878,14 +5021,6 @@ "iconv-lite": "^0.6.2" } }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "dev": true, - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -5521,19 +5656,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/espree/node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, - "peer": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/esprima": { "version": "4.0.1", "dev": true, @@ -5638,14 +5760,6 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/expand-template": { - "version": "2.0.3", - "dev": true, - "license": "(MIT OR WTFPL)", - "engines": { - "node": ">=6" - } - }, "node_modules/extend": { "version": "3.0.2", "dev": true, @@ -5718,11 +5832,6 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/fill-range": { "version": "7.0.1", "dev": true, @@ -5965,11 +6074,6 @@ "node": ">=0.10.0" } }, - "node_modules/fs-constants": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/fs-exists-cached": { "version": "1.0.0", "dev": true, @@ -6186,10 +6290,11 @@ "node": ">=10" } }, - "node_modules/github-from-package": { - "version": "0.0.0", - "dev": true, - "license": "MIT" + "node_modules/github-slugger": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.5.0.tgz", + "integrity": "sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==", + "dev": true }, "node_modules/glob": { "version": "8.0.3", @@ -6253,6 +6358,16 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "inBundle": true }, + "node_modules/groff-escape": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/groff-escape/-/groff-escape-2.0.1.tgz", + "integrity": "sha512-S0nG+mLFTu1buDKQsRlBtIxZU/dMvrdCURJg/zSLKpL333yi1Fs5bLUYk+v3pRYlc+qmHtukMAM2slB0AKFKAw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/handlebars": { "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", @@ -6405,6 +6520,174 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/hast-util-from-parse5": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-7.1.1.tgz", + "integrity": "sha512-R6PoNcUs89ZxLJmMWsVbwSWuz95/9OriyQZ3e2ybwqGsRXzhA6gv49rgGmQvLbZuSNDv9fCg7vV7gXUsvtUFaA==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "hastscript": "^7.0.0", + "property-information": "^6.0.0", + "vfile": "^5.0.0", + "vfile-location": "^4.0.0", + "web-namespaces": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-parse-selector": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz", + "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-7.2.3.tgz", + "integrity": "sha512-RujVQfVsOrxzPOPSzZFiwofMArbQke6DJjnFfceiEbFh7S05CbPt0cYN+A5YeD3pso0JQk6O1aHBnx9+Pm2uqg==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0", + "@types/parse5": "^6.0.0", + "hast-util-from-parse5": "^7.0.0", + "hast-util-to-parse5": "^7.0.0", + "html-void-elements": "^2.0.0", + "parse5": "^6.0.0", + "unist-util-position": "^4.0.0", + "unist-util-visit": "^4.0.0", + "vfile": "^5.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw/node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "node_modules/hast-util-raw/node_modules/unist-util-is": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.0.tgz", + "integrity": "sha512-Glt17jWwZeyqrFqOK0pF1Ded5U3yzJnFr8CG1GMjCWTp9zDo2p+cmD6pWbZU8AgM5WU3IzRv6+rBwhzsGh6hBQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-html": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-8.0.4.tgz", + "integrity": "sha512-4tpQTUOr9BMjtYyNlt0P50mH7xj0Ks2xpo8M943Vykljf99HW6EzulIoJP1N3eKOSScEHzyzi9dm7/cn0RfGwA==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0", + "@types/unist": "^2.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-raw": "^7.0.0", + "hast-util-whitespace": "^2.0.0", + "html-void-elements": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-parse5": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-7.1.0.tgz", + "integrity": "sha512-YNRgAJkH2Jky5ySkIqFXTQiaqcAtJyVE+D5lkN6CdtOqrnkLfGYYrEcKuHOJZlp+MwjSwuD3fZuawI+sic/RBw==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz", + "integrity": "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz", + "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^3.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -6442,6 +6725,16 @@ "dev": true, "license": "MIT" }, + "node_modules/html-void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz", + "integrity": "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -7055,17 +7348,17 @@ } }, "node_modules/istanbul-lib-processinfo": { - "version": "2.0.2", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", + "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", "dev": true, - "license": "ISC", "dependencies": { "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", + "cross-spawn": "^7.0.3", + "istanbul-lib-coverage": "^3.2.0", "p-map": "^3.0.0", "rimraf": "^3.0.0", - "uuid": "^3.3.3" + "uuid": "^8.3.2" }, "engines": { "node": ">=8" @@ -7082,6 +7375,15 @@ "node": ">=8" } }, + "node_modules/istanbul-lib-processinfo/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/istanbul-lib-report": { "version": "3.0.0", "dev": true, @@ -7129,9 +7431,10 @@ } }, "node_modules/jackspeak": { - "version": "1.4.1", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-1.4.2.tgz", + "integrity": "sha512-GHeGTmnuaHnvS+ZctRB01bfxARuu9wW83ENbuiweu07SFcVlZrJpcshSre/keGT7YGBhLHg/+rXCNSrsEHKU4Q==", "dev": true, - "license": "ISC", "dependencies": { "cliui": "^7.0.4" }, @@ -7163,62 +7466,6 @@ "optional": true, "peer": true }, - "node_modules/jsdom": { - "version": "18.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.5.0", - "acorn-globals": "^6.0.0", - "cssom": "^0.5.0", - "cssstyle": "^2.3.0", - "data-urls": "^3.0.1", - "decimal.js": "^10.3.1", - "domexception": "^4.0.0", - "escodegen": "^2.0.0", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^3.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^10.0.0", - "ws": "^8.2.3", - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jsdom/node_modules/acorn": { - "version": "8.7.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/jsesc": { "version": "2.5.2", "dev": true, @@ -7709,27 +7956,58 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/marked": { - "version": "0.7.0", + "node_modules/mdast-util-definitions": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz", + "integrity": "sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==", "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "marked": "bin/marked" + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "unist-util-visit": "^4.0.0" }, - "engines": { - "node": ">=0.10.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/marked-man": { - "version": "0.7.0", + "node_modules/mdast-util-definitions/node_modules/unist-util-is": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.0.tgz", + "integrity": "sha512-Glt17jWwZeyqrFqOK0pF1Ded5U3yzJnFr8CG1GMjCWTp9zDo2p+cmD6pWbZU8AgM5WU3IzRv6+rBwhzsGh6hBQ==", "dev": true, - "license": "MIT", - "bin": { - "marked-man": "bin/marked-man" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-definitions/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" }, - "peerDependencies": { - "marked": "^0.7.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/mdast-util-find-and-replace": { @@ -7901,6 +8179,65 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/mdast-util-to-hast": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-12.3.0.tgz", + "integrity": "sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0", + "@types/mdast": "^3.0.0", + "mdast-util-definitions": "^5.0.0", + "micromark-util-sanitize-uri": "^1.1.0", + "trim-lines": "^3.0.0", + "unist-util-generated": "^2.0.0", + "unist-util-position": "^4.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast/node_modules/unist-util-is": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.0.tgz", + "integrity": "sha512-Glt17jWwZeyqrFqOK0pF1Ded5U3yzJnFr8CG1GMjCWTp9zDo2p+cmD6pWbZU8AgM5WU3IzRv6+rBwhzsGh6hBQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-to-markdown": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-1.3.0.tgz", @@ -8653,17 +8990,6 @@ "node": ">=6" } }, - "node_modules/mimic-response": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -8825,11 +9151,6 @@ "node": ">=10" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "dev": true, - "license": "MIT" - }, "node_modules/mkdirp-infer-owner": { "version": "2.0.0", "inBundle": true, @@ -8852,6 +9173,15 @@ "node": ">=0.10.0" } }, + "node_modules/months": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/months/-/months-2.1.0.tgz", + "integrity": "sha512-2M9gdDB/uVt304/hJ3k2UIquJhOV5dRjp9BovHmZSINaRp7pdJuHXxOcuSjmJaKNomFyYyu0y3LBigdWiAUEmQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -8871,11 +9201,6 @@ "inBundle": true, "license": "ISC" }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, "node_modules/natural-compare": { "version": "1.4.0", "dev": true, @@ -8911,27 +9236,6 @@ "node": ">= 10.13" } }, - "node_modules/node-abi": { - "version": "2.30.1", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^5.4.1" - } - }, - "node_modules/node-abi/node_modules/semver": { - "version": "5.7.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/node-addon-api": { - "version": "3.2.1", - "dev": true, - "license": "MIT" - }, "node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -9336,9 +9640,10 @@ } }, "node_modules/nwsapi": { - "version": "2.2.0", - "dev": true, - "license": "MIT" + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.2.tgz", + "integrity": "sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==", + "dev": true }, "node_modules/nyc": { "version": "15.1.0", @@ -9832,11 +10137,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse5": { - "version": "6.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -9934,142 +10234,6 @@ "node": ">=4" } }, - "node_modules/prebuild-install": { - "version": "6.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^1.0.3", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^2.21.0", - "npmlog": "^4.0.1", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^3.0.3", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/prebuild-install/node_modules/ansi-regex": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prebuild-install/node_modules/aproba": { - "version": "1.2.0", - "dev": true, - "license": "ISC" - }, - "node_modules/prebuild-install/node_modules/are-we-there-yet": { - "version": "1.1.7", - "dev": true, - "license": "ISC", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "node_modules/prebuild-install/node_modules/gauge": { - "version": "2.7.4", - "dev": true, - "license": "ISC", - "dependencies": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "node_modules/prebuild-install/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prebuild-install/node_modules/npmlog": { - "version": "4.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "node_modules/prebuild-install/node_modules/readable-stream": { - "version": "2.3.7", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/prebuild-install/node_modules/safe-buffer": { - "version": "5.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/prebuild-install/node_modules/string_decoder": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/prebuild-install/node_modules/string-width": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prebuild-install/node_modules/strip-ansi": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "dev": true, @@ -10160,20 +10324,21 @@ "node": ">= 8" } }, + "node_modules/property-information": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.2.0.tgz", + "integrity": "sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/psl": { "version": "1.8.0", "dev": true, "license": "MIT" }, - "node_modules/pump": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "node_modules/punycode": { "version": "2.1.1", "dev": true, @@ -10209,6 +10374,12 @@ "node": ">=0.6" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "node_modules/quick-lru": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", @@ -10218,33 +10389,6 @@ "node": ">=8" } }, - "node_modules/rc": { - "version": "1.2.8", - "dev": true, - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/ini": { - "version": "1.3.8", - "dev": true, - "license": "ISC" - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/read": { "version": "1.0.7", "inBundle": true, @@ -10516,6 +10660,21 @@ "url": "https://github.com/sponsors/mysticatea" } }, + "node_modules/rehype-stringify": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/rehype-stringify/-/rehype-stringify-9.0.3.tgz", + "integrity": "sha512-kWiZ1bgyWlgOxpqD5HnxShKAdXtb2IUljn3hQAhySeak6IOQPPt6DeGnsIh4ixm7yKJWzm8TXFuC/lPfcWHJqw==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0", + "hast-util-to-html": "^8.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/release-please": { "name": "@npmcli/release-please", "version": "14.2.6", @@ -10742,6 +10901,67 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-man": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/remark-man/-/remark-man-8.0.1.tgz", + "integrity": "sha512-F/BbNaEF/QiZXoMiC43/qb8kAgGBKIS3yA+Br4CObgyoD+9Bioq1v+LmrLVbkwy9BErircQQ4J8yR2vFD34fBA==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "github-slugger": "^1.0.0", + "groff-escape": "^2.0.0", + "mdast-util-definitions": "^5.0.0", + "mdast-util-to-string": "^3.0.0", + "months": "^2.0.0", + "unified": "^10.0.0", + "unist-util-visit": "^4.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-man/node_modules/unist-util-is": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.0.tgz", + "integrity": "sha512-Glt17jWwZeyqrFqOK0pF1Ded5U3yzJnFr8CG1GMjCWTp9zDo2p+cmD6pWbZU8AgM5WU3IzRv6+rBwhzsGh6hBQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-man/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-man/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-parse": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.1.tgz", @@ -10757,6 +10977,22 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-rehype": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-10.1.0.tgz", + "integrity": "sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw==", + "dev": true, + "dependencies": { + "@types/hast": "^2.0.0", + "@types/mdast": "^3.0.0", + "mdast-util-to-hast": "^12.1.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-stringify": { "version": "10.0.2", "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-10.0.2.tgz", @@ -10863,6 +11099,12 @@ "dev": true, "license": "ISC" }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "node_modules/resolve": { "version": "1.22.0", "dev": true, @@ -11002,17 +11244,6 @@ "inBundle": true, "license": "MIT" }, - "node_modules/saxes": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/semver": { "version": "7.3.7", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", @@ -11083,35 +11314,6 @@ "inBundle": true, "license": "ISC" }, - "node_modules/simple-concat": { - "version": "1.0.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/simple-get": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -11209,6 +11411,16 @@ "node": ">=0.10.0" } }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/spawk": { "version": "1.7.1", "dev": true, @@ -11535,6 +11747,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/stringify-entities": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.3.tgz", + "integrity": "sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==", + "dev": true, + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "inBundle": true, @@ -11635,9 +11861,9 @@ "license": "MIT" }, "node_modules/tap": { - "version": "16.3.0", - "resolved": "https://registry.npmjs.org/tap/-/tap-16.3.0.tgz", - "integrity": "sha512-J9GffPUAbX6FnWbQ/jj7ktzd9nnDFP1fH44OzidqOmxUfZ1hPLMOvpS99LnDiP0H2mO8GY3kGN5XoY0xIKbNFA==", + "version": "16.3.4", + "resolved": "https://registry.npmjs.org/tap/-/tap-16.3.4.tgz", + "integrity": "sha512-SAexdt2ZF4XBgye6TPucFI2y7VE0qeFXlXucJIV1XDPCs+iJodk0MYacr1zR6Ycltzz7PYg8zrblDXKbAZM2LQ==", "bundleDependencies": [ "ink", "treport", @@ -11648,18 +11874,18 @@ "dev": true, "dependencies": { "@isaacs/import-jsx": "^4.0.1", - "@types/react": "^17", + "@types/react": "^17.0.52", "chokidar": "^3.3.0", "findit": "^2.0.0", "foreground-child": "^2.0.0", "fs-exists-cached": "^1.0.0", - "glob": "^7.1.6", + "glob": "^7.2.3", "ink": "^3.2.0", "isexe": "^2.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "jackspeak": "^1.4.1", + "istanbul-lib-processinfo": "^2.0.3", + "jackspeak": "^1.4.2", "libtap": "^1.4.0", - "minipass": "^3.1.1", + "minipass": "^3.3.4", "mkdirp": "^1.0.4", "nyc": "^15.1.0", "opener": "^1.5.1", @@ -11668,10 +11894,10 @@ "signal-exit": "^3.0.6", "source-map-support": "^0.5.16", "tap-mocha-reporter": "^5.0.3", - "tap-parser": "^11.0.1", - "tap-yaml": "^1.0.0", + "tap-parser": "^11.0.2", + "tap-yaml": "^1.0.2", "tcompare": "^5.0.7", - "treport": "^3.0.3", + "treport": "^3.0.4", "which": "^2.0.2" }, "bin": { @@ -11784,9 +12010,10 @@ } }, "node_modules/tap-parser": { - "version": "11.0.1", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-11.0.2.tgz", + "integrity": "sha512-6qGlC956rcORw+fg7Fv1iCRAY8/bU9UabUAhs3mXRH6eRmVZcNPLheSXCYaVaYeSwx5xa/1HXZb1537YSvwDZg==", "dev": true, - "license": "MIT", "dependencies": { "events-to-array": "^1.0.1", "minipass": "^3.1.6", @@ -11800,11 +12027,12 @@ } }, "node_modules/tap-yaml": { - "version": "1.0.0", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-1.0.2.tgz", + "integrity": "sha512-GegASpuqBnRNdT1U+yuUPZ8rEU64pL35WPBpCISWwff4dErS2/438barz7WFJl4Nzh3Y05tfPidZnH+GaV1wMg==", "dev": true, - "license": "ISC", "dependencies": { - "yaml": "^1.5.0" + "yaml": "^1.10.2" } }, "node_modules/tap/node_modules/@ampproject/remapping": { @@ -12281,7 +12509,7 @@ "license": "MIT" }, "node_modules/tap/node_modules/@types/react": { - "version": "17.0.41", + "version": "17.0.52", "dev": true, "inBundle": true, "license": "MIT", @@ -12720,7 +12948,7 @@ } }, "node_modules/tap/node_modules/glob": { - "version": "7.2.0", + "version": "7.2.3", "dev": true, "inBundle": true, "license": "ISC", @@ -12728,7 +12956,7 @@ "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -12935,7 +13163,7 @@ } }, "node_modules/tap/node_modules/json5": { - "version": "2.2.1", + "version": "2.2.3", "dev": true, "inBundle": true, "license": "MIT", @@ -13013,7 +13241,7 @@ } }, "node_modules/tap/node_modules/minipass": { - "version": "3.1.6", + "version": "3.3.4", "dev": true, "inBundle": true, "license": "ISC", @@ -13398,7 +13626,7 @@ } }, "node_modules/tap/node_modules/tap-parser": { - "version": "11.0.1", + "version": "11.0.2", "dev": true, "inBundle": true, "license": "MIT", @@ -13415,12 +13643,12 @@ } }, "node_modules/tap/node_modules/tap-yaml": { - "version": "1.0.0", + "version": "1.0.2", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "yaml": "^1.5.0" + "yaml": "^1.10.2" } }, "node_modules/tap/node_modules/to-fast-properties": { @@ -13433,7 +13661,7 @@ } }, "node_modules/tap/node_modules/treport": { - "version": "3.0.3", + "version": "3.0.4", "dev": true, "inBundle": true, "license": "ISC", @@ -13444,6 +13672,7 @@ "ink": "^3.2.0", "ms": "^2.1.2", "tap-parser": "^11.0.0", + "tap-yaml": "^1.0.0", "unicode-length": "^2.0.2" }, "peerDependencies": { @@ -13689,37 +13918,6 @@ "node": ">= 10" } }, - "node_modules/tar-fs": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-fs/node_modules/chownr": { - "version": "1.1.4", - "dev": true, - "license": "ISC" - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/tcompare": { "version": "5.0.7", "dev": true, @@ -13848,13 +14046,15 @@ } }, "node_modules/tough-cookie": { - "version": "4.0.0", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", + "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "engines": { "node": ">=6" @@ -13862,8 +14062,9 @@ }, "node_modules/tr46": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", "dev": true, - "license": "MIT", "dependencies": { "punycode": "^2.1.1" }, @@ -13880,6 +14081,16 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", @@ -13948,27 +14159,6 @@ } } }, - "node_modules/ts-node/node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ts-node/node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ts-node/node_modules/diff": { "version": "4.0.2", "dev": true, @@ -14016,6 +14206,8 @@ "version": "0.6.0", "dev": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "dependencies": { "safe-buffer": "^5.0.1" }, @@ -14169,6 +14361,16 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/unist-util-generated": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.1.tgz", + "integrity": "sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/unist-util-is": { "version": "4.1.0", "dev": true, @@ -14178,6 +14380,19 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/unist-util-position": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz", + "integrity": "sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/unist-util-stringify-position": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.2.tgz", @@ -14225,9 +14440,10 @@ "dev": true }, "node_modules/universalify": { - "version": "0.1.2", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4.0.0" } @@ -14240,6 +14456,16 @@ "punycode": "^2.1.0" } }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "inBundle": true, @@ -14249,6 +14475,8 @@ "version": "3.4.0", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "bin": { "uuid": "bin/uuid" } @@ -14335,6 +14563,20 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/vfile-location": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-4.1.0.tgz", + "integrity": "sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/vfile-message": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.2.tgz", @@ -14358,23 +14600,14 @@ }, "node_modules/w3c-hr-time": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "deprecated": "Use your platform's native performance.now() and performance.timeOrigin.", "dev": true, - "license": "MIT", "dependencies": { "browser-process-hrtime": "^1.0.0" } }, - "node_modules/w3c-xmlserializer": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/walk-up-path": { "version": "1.0.0", "inBundle": true, @@ -14388,6 +14621,16 @@ "defaults": "^1.0.3" } }, + "node_modules/web-namespaces": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", + "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/webidl-conversions": { "version": "7.0.0", "dev": true, @@ -14409,16 +14652,18 @@ }, "node_modules/whatwg-mimetype": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" } }, "node_modules/whatwg-url": { - "version": "10.0.0", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", "dev": true, - "license": "MIT", "dependencies": { "tr46": "^3.0.0", "webidl-conversions": "^7.0.0" @@ -14603,15 +14848,16 @@ } }, "node_modules/ws": { - "version": "8.5.0", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.12.1.tgz", + "integrity": "sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew==", "dev": true, - "license": "MIT", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -14624,16 +14870,18 @@ }, "node_modules/xml-name-validator": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=12" } }, "node_modules/xmlchars": { "version": "2.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true }, "node_modules/xpath": { "version": "0.0.32", @@ -14803,9 +15051,9 @@ } }, "node_modules/zwitch": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.2.tgz", - "integrity": "sha512-JZxotl7SxAJH0j7dN4pxsTV6ZLXoLdGME+PsjkL/DaBrVryK9kTGq06GfKrwcSOqypP+fdXGoCHE36b99fWVoA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", "dev": true, "funding": { "type": "github", diff --git a/scripts/bundle-and-gitignore-deps.js b/scripts/bundle-and-gitignore-deps.js index 6dd1b93f08d66..6057e8bc15e16 100644 --- a/scripts/bundle-and-gitignore-deps.js +++ b/scripts/bundle-and-gitignore-deps.js @@ -4,6 +4,7 @@ const { join, relative } = require('path') const localeCompare = require('@isaacs/string-locale-compare')('en') const PackageJson = require('@npmcli/package-json') const { run, CWD, git, fs } = require('./util') +const npmGit = require('@npmcli/git') const ALWAYS_IGNORE = ` .bin/ @@ -227,6 +228,12 @@ const main = async () => { const NODE_MODULES = join(CWD, 'node_modules') const res = await fs.writeFile(join(NODE_MODULES, '.gitignore'), ignoreFile.join('\n')) + if (!await npmGit.is({ cwd: CWD })) { + // if we are not running in a git repo then write the files but we do not + // need to run any git commands to check if we have unmatched files in source + return res + } + // After we write the file we have to check if any of the paths already checked in // inside node_modules are now going to be ignored. If we find any then fail with // a list of the paths remaining. We already attempted to `git rm` them so just diff --git a/scripts/create-node-pr.js b/scripts/create-node-pr.js index 8997966489204..712f71b7ccaef 100644 --- a/scripts/create-node-pr.js +++ b/scripts/create-node-pr.js @@ -1,11 +1,11 @@ const { join, basename } = require('path') +const fsp = require('fs/promises') const hgi = require('hosted-git-info') const semver = require('semver') const pacote = require('pacote') const log = require('proc-log') const tar = require('tar') -const fsp = require('fs/promises') -const { cp, withTempDir, access, constants } = require('@npmcli/fs') +const { cp, withTempDir } = require('@npmcli/fs') const { CWD, run, spawn, git, fs, gh } = require('./util.js') const NODE_FORK = 'npm/node' @@ -133,7 +133,7 @@ const main = async (spec, branch = 'main', opts) => withTempDir(CWD, async (tmpD throw new Error(`process.env.GITHUB_TOKEN is required`) } - await access(NODE_DIR, constants.F_OK).catch(() => { + await fsp.access(NODE_DIR, fsp.constants.F_OK).catch(() => { throw new Error(`node repo must be checked out to \`${NODE_DIR}\` to continue`) }) diff --git a/scripts/install.sh b/scripts/install.sh deleted file mode 100755 index cd6ea391cea5d..0000000000000 --- a/scripts/install.sh +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/sh - -# A word about this shell script: -# -# It must work everywhere, including on systems that lack -# a /bin/bash, map 'sh' to ksh, ksh97, bash, ash, or zsh, -# and potentially have either a posix shell or bourne -# shell living at /bin/sh. -# -# See this helpful document on writing portable shell scripts: -# http://www.gnu.org/s/hello/manual/autoconf/Portable-Shell.html -# -# The only shell it won't ever work on is cmd.exe. - -if [ "x$0" = "xsh" ]; then - # run as curl | sh - # on some systems, you can just do cat>npm-install.sh - # which is a bit cuter. But on others, &1 is already closed, - # so catting to another script file won't do anything. - # Follow Location: headers, and fail on errors - curl -q -f -L -s https://www.npmjs.org/install.sh > npm-install-$$.sh - ret=$? - if [ $ret -eq 0 ]; then - (exit 0) - else - rm npm-install-$$.sh - echo "failed to download script" >&2 - exit $ret - fi - sh npm-install-$$.sh - ret=$? - rm npm-install-$$.sh - exit $ret -fi - -debug=0 -npm_config_loglevel="error" -if [ "x$npm_debug" = "x" ]; then - (exit 0) -else - echo "running in debug mode." - echo "note that this requires bash or zsh." - set -o xtrace - set -o pipefail - npm_config_loglevel="verbose" - debug=1 -fi -export npm_config_loglevel - -# make sure that node exists -node=`which node 2>&1` -ret=$? -# if not found, try "nodejs" as it is the case on debian -if [ $ret -ne 0 ]; then - node=`which nodejs 2>&1` - ret=$? -fi -if [ $ret -eq 0 ] && [ -x "$node" ]; then - if [ $debug -eq 1 ]; then - echo "found 'node' at: $node" - echo -n "version: " - $node --version - echo "" - fi - (exit 0) -else - echo "npm cannot be installed without node.js." >&2 - echo "install node first, and then try again." >&2 - echo "" >&2 - exit $ret -fi - -ret=0 -tar="${TAR}" -if [ -z "$tar" ]; then - tar="${npm_config_tar}" -fi -if [ -z "$tar" ]; then - tar=`which tar 2>&1` - ret=$? -fi - -if [ $ret -eq 0 ] && [ -x "$tar" ]; then - if [ $debug -eq 1 ]; then - echo "found 'tar' at: $tar" - echo -n "version: " - $tar --version - echo "" - fi - ret=$? -fi - -if [ $ret -eq 0 ]; then - (exit 0) -else - echo "this script requires 'tar', please install it and try again." - exit 1 -fi - -curl=`which curl 2>&1` -ret=$? -if [ $ret -eq 0 ]; then - if [ $debug -eq 1 ]; then - echo "found 'curl' at: $curl" - echo -n "version: " - $curl --version | head -n 1 - echo "" - fi - (exit 0) -else - echo "this script requires 'curl', please install it and try again." - exit 1 -fi - -# set the temp dir -TMP="${TMPDIR}" -if [ "x$TMP" = "x" ]; then - TMP="/tmp" -fi -TMP="${TMP}/npm.$$" -rm -rf "$TMP" || true -mkdir "$TMP" -if [ $? -ne 0 ]; then - echo "failed to mkdir $TMP" >&2 - exit 1 -fi - -BACK="$PWD" - -t="${npm_install}" -if [ -z "$t" ]; then - t="latest" -fi - -# need to echo "" after, because Posix sed doesn't treat EOF -# as an implied end of line. -url=`(curl -qSsL https://registry.npmjs.org/npm/$t; echo "") \ - | sed -e 's/^.*tarball":"//' \ - | sed -e 's/".*$//'` - -ret=$? -if [ "x$url" = "x" ]; then - ret=125 - # try without the -e arg to sed. - url=`(curl -qSsL https://registry.npmjs.org/npm/$t; echo "") \ - | sed 's/^.*tarball":"//' \ - | sed 's/".*$//'` - ret=$? - if [ "x$url" = "x" ]; then - ret=125 - fi -fi -if [ $ret -ne 0 ]; then - echo "failed to get tarball url for npm/$t" >&2 - exit $ret -fi - - -echo "fetching: $url" >&2 - -cd "$TMP" \ - && curl -qSsL -o npm.tgz "$url" \ - && $tar -xzf npm.tgz \ - && cd "$TMP"/package \ - && echo "installing npm@$t" \ - && "$node" bin/npm-cli.js install -gf ../npm.tgz \ - && cd "$BACK" \ - && rm -rf "$TMP" \ - && echo "successfully installed npm@$t" - -ret=$? -if [ $ret -ne 0 ]; then - echo "failed!" >&2 -fi -exit $ret diff --git a/scripts/publish.js b/scripts/publish.js index eb195f58f2769..62f2217b752bf 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -7,12 +7,10 @@ const resetdeps = () => npm('run', 'resetdeps') const op = () => spawn('op', 'item', 'get', 'npm', '--otp', { out: true, ok: true }) -const missingVersion = async ({ name, version }) => { - const mani = await pacote.manifest(`${name}@${version}`, { preferOnline: true }) - .catch(() => null) - return !mani +const getVersion = async (s) => { + const mani = await pacote.manifest(s, { preferOnline: true }) + return mani.version } - const getLatest = async (s) => { const pack = await pacote.packument(s, { preferOnline: true }) return pack['dist-tags'].latest @@ -37,8 +35,9 @@ const needsPublish = async ({ private, name, version }, { force, getTag }) => { return } - if (force || await missingVersion({ name, version })) { - return getTag({ name, version }) + const tag = await getTag({ name, version }) + if (force || version !== await getVersion(`${name}@${tag}`)) { + return tag } } diff --git a/scripts/rebuild.js b/scripts/rebuild.js deleted file mode 100644 index f3f75090c11e4..0000000000000 --- a/scripts/rebuild.js +++ /dev/null @@ -1,20 +0,0 @@ -const { join } = require('path') -const { promisify } = require('util') -const glob = promisify(require('glob')) -const log = require('proc-log') -const { npm, run } = require('./util') - -const main = async (pkgNames) => { - for (const name of pkgNames) { - const { path } = await npm.query(`#${name}`).then(r => r[0]) - const binding = await glob(join(path, '**', 'binding.node')) - log.info(name, binding) - if (!binding.length) { - await npm('rebuild', name) - } else { - log.info(`skipping ${name}, already built`) - } - } -} - -run(({ argv }) => main(argv.remain)) diff --git a/scripts/resetdeps.js b/scripts/resetdeps.js index f0aad975386f0..95899ff2a2c45 100644 --- a/scripts/resetdeps.js +++ b/scripts/resetdeps.js @@ -1,6 +1,6 @@ const { join } = require('path') -const { CWD, run, pkg, fs, spawn, git, npm } = require('./util.js') +const { CWD, run, pkg, fs, git, npm } = require('./util.js') const checkout = () => git('checkout', 'node_modules/') @@ -14,12 +14,6 @@ const main = async ({ packageLock }) => { await npm('i', '--ignore-scripts', '--no-audit', '--no-fund', packageLock && '--package-lock') await npm('rebuild', '--ignore-scripts') await npm('run', 'dependencies', '--ignore-scripts') - if (process.env.CI) { - // this script can take awhile to rebuild the cmark-gfm bindings - // so we only run it in CI. locally this is handled by pretest and - // prebuild scripts, which don't run in CI due to --ignore-scripts - await spawn('node', join('scripts', 'rebuild.js'), 'cmark-gfm') - } } run(main).catch(checkout) diff --git a/scripts/template-oss/_job-release-integration.yml b/scripts/template-oss/_job-release-integration.yml new file mode 100644 index 0000000000000..3c10d74525bce --- /dev/null +++ b/scripts/template-oss/_job-release-integration.yml @@ -0,0 +1,11 @@ +strategy: + fail-fast: false + matrix: + nodeVersion: + - 18 + - 19 + - nightly +uses: ./.github/workflows/node-integration.yml +with: + nodeVersion: $\{{ matrix.nodeVersion }} + npmVersion: $\{{ fromJSON(needs.release.outputs.release).version }} diff --git a/scripts/template-oss/branch-specific-config.js b/scripts/template-oss/branch-specific-config.js index edebcd9de4129..c5acd28cc2cc7 100644 --- a/scripts/template-oss/branch-specific-config.js +++ b/scripts/template-oss/branch-specific-config.js @@ -17,5 +17,7 @@ module.exports = { // engines mismatched. node-gyp uses ^12.22 || ^14.13 || >=16 and the CLI // ^12.13.0 || ^14.15.0 || >=16.0.0 'node-gyp', + 'docs', + '@npmcli/docs', ], } diff --git a/scripts/template-oss/ci-npmcli-docs.yml b/scripts/template-oss/ci-npmcli-docs.yml new file mode 100644 index 0000000000000..1e3cd054262d3 --- /dev/null +++ b/scripts/template-oss/ci-npmcli-docs.yml @@ -0,0 +1,22 @@ +{{> ci }} + + compare-docs: + {{> job jobName="Compare Docs" jobCheckout=(obj fetch-depth=0) jobIf="github.event_name == 'pull_request'" }} + - name: Build Docs + run: | + node . run build -w docs + mv man/ man-update/ + mv docs/output/ docs/output-update/ + mv docs/content/ docs/content-update/ + - name: Get Current Docs + run: | + git clean -fd + git checkout $\{{ github.event.pull_request.base.ref }} + node . run resetdeps + node . run build -w docs + - name: Diff Man + run: diff -r --color=always man/ man-update/ || true + - name: Diff HTML + run: diff -r --color=always docs/output/ docs/output-update/ || true + - name: Diff Markdown + run: diff -r --color=always docs/content/ docs/content-update/ || true diff --git a/scripts/template-oss/ci-release.yml b/scripts/template-oss/ci-release.yml index 9482c31dec7b7..44b184db8ae81 100644 --- a/scripts/template-oss/ci-release.yml +++ b/scripts/template-oss/ci-release.yml @@ -8,6 +8,8 @@ windowsCI=false }} - name: Pack + env: + SMOKE_PUBLISH_NPM: 1 run: | NPM_VERSION="$({{ rootNpmPath }} --version)-$GITHUB_SHA.0" {{ rootNpmPath }} version $NPM_VERSION --ignore-scripts @@ -17,5 +19,5 @@ node scripts/remove-files.js # call installed npm instead of local source since we are testing # the packed tarball that we just installed globally - SMOKE_PUBLISH_NPM=1 npm test -w smoke-tests --ignore-scripts + npm test -w smoke-tests --ignore-scripts {{> stepChecks jobCheck=true }} diff --git a/scripts/template-oss/ci.yml b/scripts/template-oss/ci.yml index f1dcc1a4b427a..ec8e9540d648d 100644 --- a/scripts/template-oss/ci.yml +++ b/scripts/template-oss/ci.yml @@ -10,4 +10,4 @@ - name: Run Smoke Tests run: {{rootNpmPath}} test -w smoke-tests --ignore-scripts - name: Check Git Status - run: node scripts/git-dirty.js \ No newline at end of file + run: node scripts/git-dirty.js diff --git a/scripts/template-oss/node-integration.yml b/scripts/template-oss/node-integration.yml new file mode 100644 index 0000000000000..e5224fc89757e --- /dev/null +++ b/scripts/template-oss/node-integration.yml @@ -0,0 +1,492 @@ +name: nodejs integration + +on: + workflow_call: + inputs: + nodeVersion: + description: 'nodejs version' + required: true + type: string + default: nightly + npmVersion: + description: 'npm version' + required: true + type: string + default: git + installFlags: + description: 'extra flags to pass to npm install' + required: false + type: string + default: '' + + workflow_dispatch: + inputs: + nodeVersion: + description: 'nodejs version' + required: true + type: string + default: nightly + npmVersion: + description: 'npm version' + required: true + type: string + default: git + installFlags: + description: 'extra flags to pass to npm install' + required: false + type: string + default: '' + +jobs: + build-nodejs: + name: build nodejs@$\{{ inputs.nodeVersion }} npm@$\{{ inputs.npmVersion }} + runs-on: ubuntu-latest + outputs: + nodeVersion: $\{{ steps.build-nodejs.outputs.nodeVersion }} + steps: + - name: setup ccache + uses: Chocobo1/setup-ccache-action@v1 + with: + override_cache_key: nodejs-$\{{ inputs.nodeVersion }} + - name: build nodejs + id: build-nodejs + run: | + echo "::group::setup" + set -eo pipefail + npmDir="${RUNNER_TEMP}/npm" + sourceDir="${RUNNER_TEMP}/src" + targetDir="${RUNNER_TEMP}/build" + npmFile="${RUNNER_TEMP}/npm.tgz" + sourceFile="${RUNNER_TEMP}/source.tgz" + targetFile="${RUNNER_TEMP}/build.tgz" + echo "::endgroup::" + + echo "::group::finding nodejs version matching $\{{ inputs.nodeVersion }}" + if [[ "$\{{ inputs.nodeVersion }}" == "nightly" ]]; then + nodeVersion=$(curl -sSL https://nodejs.org/download/nightly/index.json | jq -r .[0].version) + nodeUrl="https://nodejs.org/download/nightly/${nodeVersion}/node-${nodeVersion}.tar.gz" + else + nodeVersion=$(curl -sSL https://nodejs.org/download/release/index.json | jq -r 'map(select(.version | test("^v$\{{ inputs.nodeVersion }}"))) | .[0].version') + if [[ -z "$nodeVersion" ]]; then + echo "::error ::unable to find released nodejs version matching: $\{{ inputs.nodeVersion }}" + exit 1 + fi + nodeUrl="https://nodejs.org/download/release/${nodeVersion}/node-${nodeVersion}.tar.gz" + fi + echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT + echo "::endgroup::" + + echo "::group::extracting source from $nodeUrl" + mkdir -p "$sourceDir" + curl -sSL "$nodeUrl" | tar xz -C "$sourceDir" --strip=1 + echo "::endgroup::" + + echo "::group::cloning npm" + mkdir -p "$npmDir" + git clone https://github.com/npm/cli.git "$npmDir" + npmVersion=$(cat "${npmDir}/package.json" | jq -r '"\(.version)-git"') + echo "::endgroup::" + + if [[ "$\{{ inputs.npmVersion }}" != "git" ]]; then + npmVersion="$\{{ inputs.npmVersion }}" + npmVersion="${npmVersion#v}" + echo "::group::checking out npm@${npmVersion}" + pushd "$npmDir" >/dev/null + taggedSha=$(git show-ref --tags "v${npmVersion}" | cut -d' ' -f1) + git reset --hard "$taggedSha" + publishedSha=$(curl -sSL https://registry.npmjs.org/npm | jq -r --arg ver "$npmVersion" '.versions[$ver].gitHead') + if [[ "$taggedSha" != "$publishedSha" ]]; then + echo "::warning ::git tag ($taggedSha) differs from published tag ($publishedSha)" + fi + popd >/dev/null + echo "::endgroup::" + fi + + echo "::group::packing npm release $npmVersion" + pushd "$npmDir" >/dev/null + node . run resetdeps + npmtarball="$(node . pack --loglevel=silent --json | jq -r .[0].filename)" + tar czf "$npmFile" -C "$npmDir" . + popd >/dev/null + echo "npm=$npmFile" >> $GITHUB_OUTPUT + echo "::endgroup::" + + echo "::group::updating nodejs bundled npm" + rm -rf "${sourceDir}/deps/npm" + mkdir -p "${sourceDir}/deps/npm" + tar xfz "${npmDir}/${npmtarball}" -C "${sourceDir}/deps/npm" --strip=1 + echo "::endgroup::" + + echo "::group::packing nodejs source" + tar cfz "$sourceFile" -C "$sourceDir" . + echo "source=$sourceFile" >> $GITHUB_OUTPUT + echo "::endgroup::" + + echo "::group::building nodejs" + mkdir -p "$targetDir" + pushd "$sourceDir" >/dev/null + ./configure --prefix="$targetDir" + make -j4 install + popd >/dev/null + echo "::endgroup::" + + echo "::group::packing nodejs build" + tar cfz "$targetFile" -C "$targetDir" . + echo "build=$targetFile" >> $GITHUB_OUTPUT + echo "::endgroup::" + - name: upload artifacts + uses: actions/upload-artifact@v3 + with: + name: nodejs-$\{{ steps.build-nodejs.outputs.nodeVersion }} + path: | + $\{{ steps.build-nodejs.outputs.source }} + $\{{ steps.build-nodejs.outputs.build }} + $\{{ steps.build-nodejs.outputs.npm }} + + test-nodejs: + name: test nodejs + runs-on: ubuntu-latest + needs: + - build-nodejs + steps: + - name: setup ccache + uses: Chocobo1/setup-ccache-action@v1 + with: + override_cache_key: nodejs-$\{{ inputs.nodeVersion }} + - name: download artifacts + uses: actions/download-artifact@v3 + with: + name: nodejs-$\{{ needs.build-nodejs.outputs.nodeVersion }} + - name: test nodejs + run: | + set -e + tar xf source.tgz + ./configure + make -j4 test-only + + test-npm: + name: test npm + runs-on: ubuntu-latest + needs: + - build-nodejs + steps: + - name: download artifacts + uses: actions/download-artifact@v3 + with: + name: nodejs-$\{{ needs.build-nodejs.outputs.nodeVersion }} + path: $\{{ runner.temp }} + - name: install nodejs $\{{ needs.build-nodejs.outputs.nodeVersion }} + id: install + run: | + set -e + mkdir -p "${RUNNER_TEMP}/node" + tar xf "${RUNNER_TEMP}/build.tgz" -C "${RUNNER_TEMP}/node" + + mkdir -p "${RUNNER_TEMP}/npm" + tar xf "${RUNNER_TEMP}/npm.tgz" -C "${RUNNER_TEMP}/npm" + + echo "${RUNNER_TEMP}/node/bin" >> $GITHUB_PATH + echo "cache=$(npm config get cache)" >> $GITHUB_OUTPUT + - name: setup npm cache + uses: actions/cache@v3 + with: + path: $\{{ steps.install.outputs.cache }} + key: npm-tests + - run: node --version + - run: npm --version + - name: test npm + run: | + echo "::group::setup" + set -e + cd "${RUNNER_TEMP}/npm" + echo "::endgroup::" + + echo "::group::npm run resetdeps" + node . run resetdeps + echo "::endgroup::" + + echo "::group::npm link" + node . link + echo "::endgroup::" + + STEPEXIT=0 + FINALEXIT=0 + + set +e + echo "::group::npm test" + node . test --ignore-scripts + STEPEXIT=$? + if [[ $STEPEXIT -ne 0 ]]; then + echo "::warning ::npm test failed, exit: $STEPEXIT" + FINALEXIT=STEPEXIT + fi + echo "::endgroup::" + + for workspace in $(npm query .workspace | jq -r .[].name); do + echo "::group::npm test -w $workspace" + node . test -w $workspace --if-present --ignore-scripts + STEPEXIT=$? + if [[ $STEPEXIT -ne 0 ]]; then + echo "::warning ::npm test -w $workspace failed, exit: $STEPEXIT" + FINALEXIT=STEPEXIT + fi + echo "::endgroup::" + done + + exit $FINALEXIT + + generate-matrix: + name: generate matrix + runs-on: ubuntu-latest + outputs: + matrix: $\{{ steps.generate-matrix.outputs.matrix }} + steps: + - name: install dependencies + run: | + npm install --no-save --no-audit --no-fund citgm npm-package-arg + - name: generate matrix + id: generate-matrix + uses: actions/github-script@v6 + env: + NODE_VERSION: "$\{{ inputs.nodeVersion }}" + INSTALL_FLAGS: "$\{{ inputs.installFlags }}" + with: + script: | + const { NODE_VERSION, INSTALL_FLAGS } = process.env + + const { execSync } = require('child_process') + const npa = require('npm-package-arg') + + const lookup = require('./node_modules/citgm/lib/lookup.json') + + const matchesKeyword = (value) => { + const keywords = ['ubuntu', 'debian', 'linux', 'x86', '>=11', '>=12', '>=16', '>=17'] + if (value === true || + (typeof value === 'string' && keywords.includes(value)) || + (Array.isArray(value) && keywords.some((keyword) => value.includes(keyword) || value.includes(true)))) { + return true + } + + return false + } + + // this is a manually updated list of packages that we know currently fail + const knownFailures = [ + 'body-parser', // json parsing error difference + 'clinic', // unknown, lots of failures + 'ember-cli', // timeout in nodejs ci, one failing test for us that timed out + 'express', // body-parser is what actually fails, it's used in a test + 'https-proxy-agent', // looks ssl related + 'node-gyp', // one test consistently times out + 'resolve', // compares results to require.resolve and fails, also missing inspector/promises + 'uuid', // tests that crypto.getRandomValues throws but it doesn't + 'weak', // doesn't seem to build in node >12 + 'mkdirp', // failing actions in own repo + 'undici', // test failure in node >=18, unable to root cause + ] + + if (NODE_VERSION === '18') { + knownFailures.push('multer') + } else if (NODE_VERSION === '19') { + // empty block + } else if (NODE_VERSION === 'nightly') { + // fails in node 20, looks like a streams issue + knownFailures.push('fastify') + // esbuild barfs on node 20.0.0-pre + knownFailures.push('serialport') + } + + // this is a manually updated list of packages that are flaky + const supplementalFlaky = [ + 'pino', // flaky test test/transport/core.test.js:401 + 'tough-cookie', // race condition test/node_util_fallback_test.js:87 + ] + + const matrix = [] + for (const package in lookup) { + const meta = lookup[package] + + // we omit npm from the matrix because its tests are run as their own job + if (matchesKeyword(meta.skip) || meta.yarn === true || package === 'npm') { + continue + } + + const install_flags = ['--no-audit', '--no-fund'] + if (meta.install) { + install_flags.push(meta.install.slice(1)) + } + if (INSTALL_FLAGS) { + install_flags.push(INSTALL_FLAGS) + } + const context = JSON.parse(execSync(`npm show ${package} --json`)) + const test = meta.scripts ? meta.scripts.map((script) => `npm run ${script}`) : ['npm test'] + + const repo = npa(meta.repo || context.repository.url).hosted + const details = {} + if (meta.useGitClone) { + details.repo = repo.https() + } else { + if (meta.ignoreGitHead) { + details.url = repo.tarball() + } else { + details.url = repo.tarball({ committish: context.gitHead }) + } + } + + const env = { ...meta.envVar } + matrix.push({ + package, + version: context.version, + env, + install_flags: install_flags.join(' '), + commands: [...test], + flaky: matchesKeyword(meta.flaky) || supplementalFlaky.includes(package), + knownFailure: knownFailures.includes(package), + ...details, + }) + } + core.setOutput('matrix', matrix) + + citgm: + name: citgm - $\{{ matrix.package }}@$\{{ matrix.version }} $\{{ matrix.flaky && '(flaky)' || '' }} $\{{ matrix.knownFailure && '(known failure)' || '' }} + runs-on: ubuntu-latest + needs: + - build-nodejs + - generate-matrix + strategy: + fail-fast: false + matrix: + include: $\{{ fromJson(needs.generate-matrix.outputs.matrix) }} + steps: + - name: download artifacts + uses: actions/download-artifact@v3 + with: + name: nodejs-$\{{ needs.build-nodejs.outputs.nodeVersion }} + path: $\{{ runner.temp }} + - name: install nodejs $\{{ needs.build-nodejs.outputs.nodeVersion }} + id: install + run: | + set -e + mkdir -p "${RUNNER_TEMP}/node" + tar xf "${RUNNER_TEMP}/build.tgz" -C "${RUNNER_TEMP}/node" + echo "nodedir=${RUNNER_TEMP}/node" >> $GITHUB_OUTPUT + + echo "${RUNNER_TEMP}/node/bin" >> $GITHUB_PATH + echo "cache=$(npm config get cache)" >> $GITHUB_OUTPUT + - name: setup npm cache + uses: actions/cache@v3 + with: + path: $\{{ steps.install.outputs.cache }} + key: npm-$\{{ matrix.package }} + - run: node --version + - run: npm --version + - name: download source + id: download + run: | + set -eo pipefail + TARGET_DIR="${RUNNER_TEMP}/$\{{ matrix.package }}" + mkdir -p "$TARGET_DIR" + echo "target=$TARGET_DIR" >> $GITHUB_OUTPUT + + if [[ -n "$\{{ matrix.repo }}" ]]; then + export GIT_TERMINAL_PROMPT=0 + export GIT_SSH_COMMAND="ssh -oBatchMode=yes" + git clone --recurse-submodules "$\{{ matrix.repo }}" "$TARGET_DIR" + elif [[ -n "$\{{ matrix.url }}" ]]; then + curl -sSL "$\{{ matrix.url }}" | tar xz -C "$TARGET_DIR" --strip=1 + fi + + if [[ -f "${TARGET_DIR}/package-lock.json" ]]; then + lockfileVersion=$(cat "${TARGET_DIR}/package-lock.json" | jq .lockfileVersion) + echo "lockfileVersion=$lockfileVersion" >> $GITHUB_OUTPUT + fi + - name: npm install $\{{ matrix.install_flags }} + id: npm-install + working-directory: $\{{ steps.download.outputs.target }} + run: | + set +e + npm install --nodedir="$\{{steps.install.outputs.nodedir }}" $\{{ matrix.install_flags }} + exitcode=$? + if [[ $exitcode -ne 0 && "$\{{ matrix.knownFailure }}" == "true" ]]; then + echo "::warning ::npm install failed, exit $exitcode" + echo "failed=true" >> $GITHUB_OUTPUT + exit 0 + fi + exit $exitcode + - name: verify lockfileVersion unchanged + working-directory: $\{{ steps.download.outputs.target }} + if: $\{{ steps.download.outputs.lockfileVersion && steps.npm-install.outputs.failed != 'true' }} + run: | + if [[ -f "package-lock.json" ]]; then + newLockfileVersion=$(cat "package-lock.json" | jq .lockfileVersion) + if [[ "$newLockfileVersion" -ne "$\{{ steps.download.outputs.lockfileVersion }}" ]]; then + if [[ "$\{{ steps.download.outputs.lockfileVersion }}" -ne 1 ]]; then + echo "::error ::lockfileVersion changed from $\{{ steps.download.outputs.lockfileVersion }} to $newLockfileVersion" + exit 1 + fi + fi + fi + - name: npm ls + working-directory: $\{{ steps.download.outputs.target }} + if: $\{{ steps.npm-install.outputs.failed != 'true' }} + run: | + npm ls + - name: $\{{ join(matrix.commands, ' && ') }} + id: command + continue-on-error: true + timeout-minutes: 10 + env: $\{{ matrix.env }} + working-directory: $\{{ steps.download.outputs.target }} + if: $\{{ steps.npm-install.outputs.failed != 'true' }} + run: | + set +e + FINALEXIT=0 + STEPEXIT=0 + + export npm_config_nodedir="$\{{ steps.install.outputs.nodedir }}" + + # inlining some patches to make tests run + if [[ "$\{{ matrix.package }}" == "undici" ]]; then + sed -i.bak 's/--experimental-wasm-simd //' package.json + rm -f package.json.bak + sed -i.bak 's/--experimental-wasm-simd//' .taprc + rm -f .taprc.bak + fi + + commandCount=$(echo '$\{{ toJSON(matrix.commands) }}' | jq -r 'length') + if [[ $commandCount -eq 1 ]]; then + COMMAND=$(echo '$\{{ toJSON(matrix.commands) }}' | jq -r '.[0]') + $COMMAND + STEPEXIT=$? + if [[ $STEPEXIT -ne 0 ]]; then + if [[ "$\{{ matrix.flaky }}" == "true" || "$\{{ matrix.knownFailure }}" == "true" ]]; then + echo "::warning ::$COMMAND failed, exit $STEPEXIT" + exit 0 + fi + fi + exit $STEPEXIT + fi + + for row in $(echo '$\{{ toJSON(matrix.commands) }}' | jq -r '.[] | @base64'); do + COMMAND=$(echo "$row" | base64 --decode) + echo "::group::$COMMAND" + $COMMAND + STEPEXIT=$? + if [[ $STEPEXIT -ne 0 ]]; then + if [[ "$\{{ matrix.flaky }}" == "true" || "$\{{ matrix.knownFailure }}" == "true" ]]; then + echo "::warning ::$COMMAND failed, exit: $STEPEXIT" + else + FINALEXIT=$STEPEXIT + echo "::error ::$COMMAND failed, exit: $STEPEXIT" + fi + fi + echo "::endgroup::" + done + exit $FINALEXIT + - name: Set conclusion + run: | + EXIT=1 + if [[ "$\{{ steps.command.outcome }}" == "success" || "$\{{ matrix.flaky }}" == "true" || "$\{{ matrix.knownFailure }}" == "true" ]]; then + EXIT=0 + fi + exit $EXIT diff --git a/scripts/template-oss/root.js b/scripts/template-oss/root.js index cb59c473ec032..8f4446ef99b46 100644 --- a/scripts/template-oss/root.js +++ b/scripts/template-oss/root.js @@ -4,6 +4,7 @@ module.exports = { '.github/workflows/ci.yml': 'ci.yml', '.github/workflows/ci-release.yml': 'ci-release.yml', '.github/workflows/create-node-pr.yml': 'create-node-pr.yml', + '.github/workflows/node-integration.yml': 'node-integration.yml', '.github/ISSUE_TEMPLATE/bug.yml': false, '.github/ISSUE_TEMPLATE/config.yml': false, '.github/dependabot.yml': false,