diff --git a/deps/npm/docs/content/commands/npm-access.md b/deps/npm/docs/content/commands/npm-access.md index 7c7e1ffdcc22e5..84421e88096180 100644 --- a/deps/npm/docs/content/commands/npm-access.md +++ b/deps/npm/docs/content/commands/npm-access.md @@ -67,8 +67,7 @@ You must have privileges to set the access of a package: * You have been given read-write privileges for a package, either as a member of a team or directly as an owner. -If you have two-factor authentication enabled then you'll be prompted to -provide an otp token, or may use the `--otp=...` option to specify it on +If you have two-factor authentication enabled then you'll be prompted to provide a second factor, or may use the `--otp=...` option to specify it on the command line. If your account is not paid, then attempts to publish scoped packages will diff --git a/deps/npm/docs/content/commands/npm-audit.md b/deps/npm/docs/content/commands/npm-audit.md index 25c733243660e9..7358d878980a88 100644 --- a/deps/npm/docs/content/commands/npm-audit.md +++ b/deps/npm/docs/content/commands/npm-audit.md @@ -408,7 +408,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm-ci.md b/deps/npm/docs/content/commands/npm-ci.md index c9b64a71ee699a..48c018e0502b87 100644 --- a/deps/npm/docs/content/commands/npm-ci.md +++ b/deps/npm/docs/content/commands/npm-ci.md @@ -310,7 +310,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm-dedupe.md b/deps/npm/docs/content/commands/npm-dedupe.md index 60ec58937ecd0d..d9c614d519eba4 100644 --- a/deps/npm/docs/content/commands/npm-dedupe.md +++ b/deps/npm/docs/content/commands/npm-dedupe.md @@ -269,7 +269,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm-dist-tag.md b/deps/npm/docs/content/commands/npm-dist-tag.md index e4a7fba665db38..609da16b6d3ab1 100644 --- a/deps/npm/docs/content/commands/npm-dist-tag.md +++ b/deps/npm/docs/content/commands/npm-dist-tag.md @@ -22,12 +22,12 @@ Add, remove, and enumerate distribution tags on a package: or the [`--tag` config](/using-npm/config#tag) if not specified. If you have two-factor authentication on auth-and-writes then you’ll need to include a one-time password on the command line with - `--otp `, or at the OTP prompt. + `--otp `, or go through a second factor flow based on your `authtype`. * rm: Clear a tag that is no longer in use from the package. If you have two-factor authentication on auth-and-writes then you’ll need to include a one-time password on the command line with `--otp `, - or at the OTP prompt. + or go through a second factor flow based on your `authtype` * ls: Show all of the dist-tags for a package, defaulting to the package in the current prefix. This is the default action if none is specified. diff --git a/deps/npm/docs/content/commands/npm-find-dupes.md b/deps/npm/docs/content/commands/npm-find-dupes.md index ffb659010f8a77..bfdff61cbb4ee7 100644 --- a/deps/npm/docs/content/commands/npm-find-dupes.md +++ b/deps/npm/docs/content/commands/npm-find-dupes.md @@ -196,7 +196,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm-install-ci-test.md b/deps/npm/docs/content/commands/npm-install-ci-test.md index f7c9b931c19498..f4db7ee0c54dca 100644 --- a/deps/npm/docs/content/commands/npm-install-ci-test.md +++ b/deps/npm/docs/content/commands/npm-install-ci-test.md @@ -256,7 +256,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm-install-test.md b/deps/npm/docs/content/commands/npm-install-test.md index e9559f52a03917..b864051ca138c1 100644 --- a/deps/npm/docs/content/commands/npm-install-test.md +++ b/deps/npm/docs/content/commands/npm-install-test.md @@ -257,7 +257,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm-install.md b/deps/npm/docs/content/commands/npm-install.md index c195152f23bebf..a2225b9f3897d2 100644 --- a/deps/npm/docs/content/commands/npm-install.md +++ b/deps/npm/docs/content/commands/npm-install.md @@ -647,7 +647,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm-link.md b/deps/npm/docs/content/commands/npm-link.md index 3a8f5b569afc3c..9c4c61a6fb04d5 100644 --- a/deps/npm/docs/content/commands/npm-link.md +++ b/deps/npm/docs/content/commands/npm-link.md @@ -336,7 +336,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md index 29e16bc9b90ac1..8fa273e8ab1c35 100644 --- a/deps/npm/docs/content/commands/npm-ls.md +++ b/deps/npm/docs/content/commands/npm-ls.md @@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For example, running `npm ls promzard` in npm's source tree will show: ```bash -npm@9.4.0 /path/to/npm +npm@9.5.0 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 ``` @@ -236,7 +236,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm-owner.md b/deps/npm/docs/content/commands/npm-owner.md index 2b04f635b1372b..2f1ca487d55aca 100644 --- a/deps/npm/docs/content/commands/npm-owner.md +++ b/deps/npm/docs/content/commands/npm-owner.md @@ -30,8 +30,8 @@ or you can't. Future versions may contain more fine-grained access levels, but that is not implemented at this time. If you have two-factor authentication enabled with `auth-and-writes` (see -[`npm-profile`](/commands/npm-profile)) then you'll need to include an otp -on the command line when changing ownership with `--otp`. +[`npm-profile`](/commands/npm-profile)) then you'll need to go through a second factor +flow when changing ownership or include an otp on the command line with `--otp`. ### Configuration diff --git a/deps/npm/docs/content/commands/npm-prune.md b/deps/npm/docs/content/commands/npm-prune.md index 0cd540f5c2d429..f0374944cc3f88 100644 --- a/deps/npm/docs/content/commands/npm-prune.md +++ b/deps/npm/docs/content/commands/npm-prune.md @@ -157,7 +157,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm-publish.md b/deps/npm/docs/content/commands/npm-publish.md index b23d9ad8a1fb2a..3d88a805fbb497 100644 --- a/deps/npm/docs/content/commands/npm-publish.md +++ b/deps/npm/docs/content/commands/npm-publish.md @@ -194,6 +194,13 @@ the specified workspaces, and not on the root project. This value is not exported to the environment for child processes. +#### `provenance` + +* Default: false +* Type: Boolean + +Indicates that a provenance statement should be generated. + ### See Also * [package spec](/using-npm/package-spec) diff --git a/deps/npm/docs/content/commands/npm-rebuild.md b/deps/npm/docs/content/commands/npm-rebuild.md index a6955ec80c7e7c..8a58a6176fa7d2 100644 --- a/deps/npm/docs/content/commands/npm-rebuild.md +++ b/deps/npm/docs/content/commands/npm-rebuild.md @@ -130,7 +130,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm-team.md b/deps/npm/docs/content/commands/npm-team.md index d4374c67c318cd..68b2192673d326 100644 --- a/deps/npm/docs/content/commands/npm-team.md +++ b/deps/npm/docs/content/commands/npm-team.md @@ -28,7 +28,8 @@ as `@org:newteam` in these commands. If you have two-factor authentication enabled in `auth-and-writes` mode, then you can provide a code from your authenticator with `[--otp ]`. -If you don't include this then you will be prompted. +If you don't include this then you will be taken through a second factor flow based +on your `authtype`. * create / destroy: Create a new team, or destroy an existing one. Note: You cannot remove the diff --git a/deps/npm/docs/content/commands/npm-uninstall.md b/deps/npm/docs/content/commands/npm-uninstall.md index c66d4a040800fa..ef12bcd64ac917 100644 --- a/deps/npm/docs/content/commands/npm-uninstall.md +++ b/deps/npm/docs/content/commands/npm-uninstall.md @@ -123,7 +123,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm-update.md b/deps/npm/docs/content/commands/npm-update.md index d94e52efe99ec8..fa9d963c4f9608 100644 --- a/deps/npm/docs/content/commands/npm-update.md +++ b/deps/npm/docs/content/commands/npm-update.md @@ -387,7 +387,7 @@ This value is not exported to the environment for child processes. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/content/commands/npm.md b/deps/npm/docs/content/commands/npm.md index a7209b8687fb62..abe229d5681939 100644 --- a/deps/npm/docs/content/commands/npm.md +++ b/deps/npm/docs/content/commands/npm.md @@ -14,7 +14,7 @@ Note: This command is unaware of workspaces. ### Version -9.4.0 +9.5.0 ### Description diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md index f2f0b0f0644376..9352491221e705 100644 --- a/deps/npm/docs/content/using-npm/config.md +++ b/deps/npm/docs/content/using-npm/config.md @@ -691,7 +691,7 @@ number, if not already set in package.json. #### `install-links` -* Default: true +* Default: false * Type: Boolean When set file: protocol dependencies will be packed and installed as regular @@ -1005,6 +1005,13 @@ operations, if `process.stderr` is a TTY. Set to `false` to suppress the progress bar. +#### `provenance` + +* Default: false +* Type: Boolean + +Indicates that a provenance statement should be generated. + #### `proxy` * Default: null diff --git a/deps/npm/docs/output/commands/npm-access.html b/deps/npm/docs/output/commands/npm-access.html index 9a0bb09a9cd966..aa89c3e0068fcf 100644 --- a/deps/npm/docs/output/commands/npm-access.html +++ b/deps/npm/docs/output/commands/npm-access.html @@ -205,8 +205,7 @@

Details

  • You have been given read-write privileges for a package, either as a member of a team or directly as an owner.
  • -

    If you have two-factor authentication enabled then you'll be prompted to -provide an otp token, or may use the --otp=... option to specify it on +

    If you have two-factor authentication enabled then you'll be prompted to provide a second factor, or may use the --otp=... option to specify it on the command line.

    If your account is not paid, then attempts to publish scoped packages will fail with an HTTP 402 status code (logically enough), unless you use diff --git a/deps/npm/docs/output/commands/npm-audit.html b/deps/npm/docs/output/commands/npm-audit.html index 1a83cbe47604ec..eda45d9bd23db3 100644 --- a/deps/npm/docs/output/commands/npm-audit.html +++ b/deps/npm/docs/output/commands/npm-audit.html @@ -454,7 +454,7 @@

    include-workspace-root

    This value is not exported to the environment for child processes.

      -
    • Default: true
    • +
    • Default: false
    • Type: Boolean

    When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm-ci.html b/deps/npm/docs/output/commands/npm-ci.html index da11f6eca9ffc6..cd2c21a3c215b6 100644 --- a/deps/npm/docs/output/commands/npm-ci.html +++ b/deps/npm/docs/output/commands/npm-ci.html @@ -399,7 +399,7 @@

    include-workspace-root

    This value is not exported to the environment for child processes.

      -
    • Default: true
    • +
    • Default: false
    • Type: Boolean

    When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm-dedupe.html b/deps/npm/docs/output/commands/npm-dedupe.html index b0dda833a965e7..d77f4a59c7de98 100644 --- a/deps/npm/docs/output/commands/npm-dedupe.html +++ b/deps/npm/docs/output/commands/npm-dedupe.html @@ -358,7 +358,7 @@

    include-workspace-root

    This value is not exported to the environment for child processes.

      -
    • Default: true
    • +
    • Default: false
    • Type: Boolean

    When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm-dist-tag.html b/deps/npm/docs/output/commands/npm-dist-tag.html index b3396d7cbb53cf..1e75f62f1fcb49 100644 --- a/deps/npm/docs/output/commands/npm-dist-tag.html +++ b/deps/npm/docs/output/commands/npm-dist-tag.html @@ -160,13 +160,13 @@

    Description

    or the --tag config if not specified. If you have two-factor authentication on auth-and-writes then you’ll need to include a one-time password on the command line with ---otp <one-time password>, or at the OTP prompt.

    +--otp <one-time password>, or go through a second factor flow based on your authtype.

  • rm: Clear a tag that is no longer in use from the package. If you have two-factor authentication on auth-and-writes then you’ll need to include a one-time password on the command line with --otp <one-time password>, -or at the OTP prompt.

    +or go through a second factor flow based on your authtype

  • ls: Show all of the dist-tags for a package, defaulting to the package in diff --git a/deps/npm/docs/output/commands/npm-find-dupes.html b/deps/npm/docs/output/commands/npm-find-dupes.html index 0e596eea43da1b..82d5eba473f1df 100644 --- a/deps/npm/docs/output/commands/npm-find-dupes.html +++ b/deps/npm/docs/output/commands/npm-find-dupes.html @@ -304,7 +304,7 @@

    include-workspace-root

    This value is not exported to the environment for child processes.

      -
    • Default: true
    • +
    • Default: false
    • Type: Boolean

    When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm-install-ci-test.html b/deps/npm/docs/output/commands/npm-install-ci-test.html index 6dc0044846d601..b2f6a3affbbafa 100644 --- a/deps/npm/docs/output/commands/npm-install-ci-test.html +++ b/deps/npm/docs/output/commands/npm-install-ci-test.html @@ -356,7 +356,7 @@

    include-workspace-root

    This value is not exported to the environment for child processes.

      -
    • Default: true
    • +
    • Default: false
    • Type: Boolean

    When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm-install-test.html b/deps/npm/docs/output/commands/npm-install-test.html index 050257b7a51a8f..27ab7c3ae5b23a 100644 --- a/deps/npm/docs/output/commands/npm-install-test.html +++ b/deps/npm/docs/output/commands/npm-install-test.html @@ -357,7 +357,7 @@

    include-workspace-root

    This value is not exported to the environment for child processes.

      -
    • Default: true
    • +
    • Default: false
    • Type: Boolean

    When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm-install.html b/deps/npm/docs/output/commands/npm-install.html index 29f847327e10fa..0c72b0c0917200 100644 --- a/deps/npm/docs/output/commands/npm-install.html +++ b/deps/npm/docs/output/commands/npm-install.html @@ -683,7 +683,7 @@

    include-workspace-root

    This value is not exported to the environment for child processes.

      -
    • Default: true
    • +
    • Default: false
    • Type: Boolean

    When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm-link.html b/deps/npm/docs/output/commands/npm-link.html index a90473c8b4020c..9686106d8b8d03 100644 --- a/deps/npm/docs/output/commands/npm-link.html +++ b/deps/npm/docs/output/commands/npm-link.html @@ -410,7 +410,7 @@

    include-workspace-root

    This value is not exported to the environment for child processes.

      -
    • Default: true
    • +
    • Default: false
    • Type: Boolean

    When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html index 18abea53a167ba..8411b221adb082 100644 --- a/deps/npm/docs/output/commands/npm-ls.html +++ b/deps/npm/docs/output/commands/npm-ls.html @@ -160,7 +160,7 @@

    Description

    the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:

    -
    npm@9.4.0 /path/to/npm
    +
    npm@9.5.0 /path/to/npm
     └─┬ init-package-json@0.0.4
       └── promzard@0.1.5
     
    @@ -333,7 +333,7 @@

    include-workspace-root

    This value is not exported to the environment for child processes.

      -
    • Default: true
    • +
    • Default: false
    • Type: Boolean

    When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm-owner.html b/deps/npm/docs/output/commands/npm-owner.html index 3566602a011109..dab34abe97c14a 100644 --- a/deps/npm/docs/output/commands/npm-owner.html +++ b/deps/npm/docs/output/commands/npm-owner.html @@ -166,8 +166,8 @@

    Description

    or you can't. Future versions may contain more fine-grained access levels, but that is not implemented at this time.

    If you have two-factor authentication enabled with auth-and-writes (see -npm-profile) then you'll need to include an otp -on the command line when changing ownership with --otp.

    +npm-profile) then you'll need to go through a second factor +flow when changing ownership or include an otp on the command line with --otp.

    Configuration

    registry

      diff --git a/deps/npm/docs/output/commands/npm-prune.html b/deps/npm/docs/output/commands/npm-prune.html index b2cbbbeddd949b..9ca44c4474052e 100644 --- a/deps/npm/docs/output/commands/npm-prune.html +++ b/deps/npm/docs/output/commands/npm-prune.html @@ -268,7 +268,7 @@

      include-workspace-root

      This value is not exported to the environment for child processes.

        -
      • Default: true
      • +
      • Default: false
      • Type: Boolean

      When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm-publish.html b/deps/npm/docs/output/commands/npm-publish.html index 80a136308a19c5..a2a4f0aad05647 100644 --- a/deps/npm/docs/output/commands/npm-publish.html +++ b/deps/npm/docs/output/commands/npm-publish.html @@ -142,7 +142,7 @@

      npm-publish

      Table of contents

      - +

      Synopsis

      @@ -306,6 +306,12 @@

      include-workspace-root

      all workspaces via the workspaces flag, will cause npm to operate only on the specified workspaces, and not on the root project.

      This value is not exported to the environment for child processes.

      +

      provenance

      +
        +
      • Default: false
      • +
      • Type: Boolean
      • +
      +

      Indicates that a provenance statement should be generated.

      See Also

      • package spec
      • diff --git a/deps/npm/docs/output/commands/npm-rebuild.html b/deps/npm/docs/output/commands/npm-rebuild.html index 51243f22324a58..4d2ce115e6a362 100644 --- a/deps/npm/docs/output/commands/npm-rebuild.html +++ b/deps/npm/docs/output/commands/npm-rebuild.html @@ -250,7 +250,7 @@

        include-workspace-root

        This value is not exported to the environment for child processes.

          -
        • Default: true
        • +
        • Default: false
        • Type: Boolean

        When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm-team.html b/deps/npm/docs/output/commands/npm-team.html index a67381f3508dab..ac8740e917cc8f 100644 --- a/deps/npm/docs/output/commands/npm-team.html +++ b/deps/npm/docs/output/commands/npm-team.html @@ -162,7 +162,8 @@

        Description

        as @org:newteam in these commands.

        If you have two-factor authentication enabled in auth-and-writes mode, then you can provide a code from your authenticator with [--otp <otpcode>]. -If you don't include this then you will be prompted.

        +If you don't include this then you will be taken through a second factor flow based +on your authtype.

        • create / destroy: diff --git a/deps/npm/docs/output/commands/npm-uninstall.html b/deps/npm/docs/output/commands/npm-uninstall.html index 4e6d43fb9dc48f..98a9f08418a14e 100644 --- a/deps/npm/docs/output/commands/npm-uninstall.html +++ b/deps/npm/docs/output/commands/npm-uninstall.html @@ -234,7 +234,7 @@

          include-workspace-root

          This value is not exported to the environment for child processes.

            -
          • Default: true
          • +
          • Default: false
          • Type: Boolean

          When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm-update.html b/deps/npm/docs/output/commands/npm-update.html index 6c7645859ba6b8..32c3da827ca805 100644 --- a/deps/npm/docs/output/commands/npm-update.html +++ b/deps/npm/docs/output/commands/npm-update.html @@ -447,7 +447,7 @@

          include-workspace-root

          This value is not exported to the environment for child processes.

            -
          • Default: true
          • +
          • Default: false
          • Type: Boolean

          When set file: protocol dependencies will be packed and installed as regular diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html index 314179262701cd..f3678c6bf9393f 100644 --- a/deps/npm/docs/output/commands/npm.html +++ b/deps/npm/docs/output/commands/npm.html @@ -150,7 +150,7 @@

          Table of contents

    Note: This command is unaware of workspaces.

    Version

    -

    9.4.0

    +

    9.5.0

    Description

    npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html index d8f54958adbc27..3887fe1a564e4f 100644 --- a/deps/npm/docs/output/using-npm/config.html +++ b/deps/npm/docs/output/using-npm/config.html @@ -142,7 +142,7 @@

    config

    Table of contents

    -
    +

    Description

    @@ -724,7 +724,7 @@

    init-version

    number, if not already set in package.json.

      -
    • Default: true
    • +
    • Default: false
    • Type: Boolean

    When set file: protocol dependencies will be packed and installed as regular @@ -989,6 +989,12 @@

    progress

    When set to true, npm will display a progress bar during time intensive operations, if process.stderr is a TTY.

    Set to false to suppress the progress bar.

    +

    provenance

    +
      +
    • Default: false
    • +
    • Type: Boolean
    • +
    +

    Indicates that a provenance statement should be generated.

    proxy

    • Default: null
    • diff --git a/deps/npm/lib/commands/audit.js b/deps/npm/lib/commands/audit.js index 13886ea6350b66..05830fff69c2ea 100644 --- a/deps/npm/lib/commands/audit.js +++ b/deps/npm/lib/commands/audit.js @@ -24,8 +24,8 @@ class VerifySignatures { this.missing = [] this.checkedPackages = new Set() this.auditedWithKeysCount = 0 - this.verifiedCount = 0 - this.output = [] + this.verifiedSignatureCount = 0 + this.verifiedAttestationCount = 0 this.exitCode = 0 } @@ -60,13 +60,13 @@ class VerifySignatures { const hasNoInvalidOrMissing = invalid.length === 0 && missing.length === 0 if (!hasNoInvalidOrMissing) { - this.exitCode = 1 + process.exitCode = 1 } if (this.npm.config.get('json')) { - this.appendOutput(JSON.stringify({ - invalid: this.makeJSON(invalid), - missing: this.makeJSON(missing), + this.npm.output(JSON.stringify({ + invalid, + missing, }, null, 2)) return } @@ -76,52 +76,92 @@ class VerifySignatures { const auditedPlural = this.auditedWithKeysCount > 1 ? 's' : '' const timing = `audited ${this.auditedWithKeysCount} package${auditedPlural} in ` + `${Math.floor(Number(elapsed) / 1e9)}s` - this.appendOutput(`${timing}\n`) + this.npm.output(timing) + this.npm.output('') + + const verifiedBold = this.npm.chalk.bold('verified') + if (this.verifiedSignatureCount) { + if (this.verifiedSignatureCount === 1) { + /* eslint-disable-next-line max-len */ + this.npm.output(`${this.verifiedSignatureCount} package has a ${verifiedBold} registry signature`) + } else { + /* eslint-disable-next-line max-len */ + this.npm.output(`${this.verifiedSignatureCount} packages have ${verifiedBold} registry signatures`) + } + this.npm.output('') + } - if (this.verifiedCount) { - const verifiedBold = this.npm.chalk.bold('verified') - const msg = this.verifiedCount === 1 ? - `${this.verifiedCount} package has a ${verifiedBold} registry signature\n` : - `${this.verifiedCount} packages have ${verifiedBold} registry signatures\n` - this.appendOutput(msg) + if (this.verifiedAttestationCount) { + if (this.verifiedAttestationCount === 1) { + /* eslint-disable-next-line max-len */ + this.npm.output(`${this.verifiedAttestationCount} package has a ${verifiedBold} attestation`) + } else { + /* eslint-disable-next-line max-len */ + this.npm.output(`${this.verifiedAttestationCount} packages have ${verifiedBold} attestations`) + } + this.npm.output('') } if (missing.length) { const missingClr = this.npm.chalk.bold(this.npm.chalk.red('missing')) - const msg = missing.length === 1 ? - `package has a ${missingClr} registry signature` : - `packages have ${missingClr} registry signatures` - this.appendOutput( - `${missing.length} ${msg} but the registry is ` + - `providing signing keys:\n` + if (missing.length === 1) { + /* eslint-disable-next-line max-len */ + this.npm.output(`1 package has a ${missingClr} registry signature but the registry is providing signing keys:`) + } else { + /* eslint-disable-next-line max-len */ + this.npm.output(`${missing.length} packages have ${missingClr} registry signatures but the registry is providing signing keys:`) + } + this.npm.output('') + missing.map(m => + this.npm.output(`${this.npm.chalk.red(`${m.name}@${m.version}`)} (${m.registry})`) ) - this.appendOutput(this.humanOutput(missing)) } if (invalid.length) { + if (missing.length) { + this.npm.output('') + } const invalidClr = this.npm.chalk.bold(this.npm.chalk.red('invalid')) - const msg = invalid.length === 1 ? - `${invalid.length} package has an ${invalidClr} registry signature:\n` : - `${invalid.length} packages have ${invalidClr} registry signatures:\n` - this.appendOutput( - `${missing.length ? '\n' : ''}${msg}` - ) - this.appendOutput(this.humanOutput(invalid)) - const tamperMsg = invalid.length === 1 ? - `\nSomeone might have tampered with this package since it was ` + - `published on the registry!\n` : - `\nSomeone might have tampered with these packages since they where ` + - `published on the registry!\n` - this.appendOutput(tamperMsg) - } - } + // We can have either invalid signatures or invalid provenance + const invalidSignatures = this.invalid.filter(i => i.code === 'EINTEGRITYSIGNATURE') + if (invalidSignatures.length) { + if (invalidSignatures.length === 1) { + this.npm.output(`1 package has an ${invalidClr} registry signature:`) + } else { + /* eslint-disable-next-line max-len */ + this.npm.output(`${invalidSignatures.length} packages have ${invalidClr} registry signatures:`) + } + this.npm.output('') + invalidSignatures.map(i => + this.npm.output(`${this.npm.chalk.red(`${i.name}@${i.version}`)} (${i.registry})`) + ) + this.npm.output('') + } - appendOutput (...args) { - this.output.push(...args.flat()) - } + const invalidAttestations = this.invalid.filter(i => i.code === 'EATTESTATIONVERIFY') + if (invalidAttestations.length) { + if (invalidAttestations.length === 1) { + this.npm.output(`1 package has an ${invalidClr} attestation:`) + } else { + /* eslint-disable-next-line max-len */ + this.npm.output(`${invalidAttestations.length} packages have ${invalidClr} attestations:`) + } + this.npm.output('') + invalidAttestations.map(i => + this.npm.output(`${this.npm.chalk.red(`${i.name}@${i.version}`)} (${i.registry})`) + ) + this.npm.output('') + } - report () { - return { report: this.output.join('\n'), exitCode: this.exitCode } + if (invalid.length === 1) { + /* eslint-disable-next-line max-len */ + this.npm.output(`Someone might have tampered with this package since it was published on the registry!`) + } else { + /* eslint-disable-next-line max-len */ + this.npm.output(`Someone might have tampered with these packages since they were published on the registry!`) + } + this.npm.output('') + } } getEdgesOut (nodes, filterSet) { @@ -242,18 +282,22 @@ class VerifySignatures { const { _integrity: integrity, _signatures, + _attestations, _resolved: resolved, } = await pacote.manifest(`${name}@${version}`, { verifySignatures: true, + verifyAttestations: true, ...this.buildRegistryConfig(registry), ...this.npm.flatOptions, }) const signatures = _signatures || [] - return { + const result = { integrity, signatures, + attestations: _attestations, resolved, } + return result } async getVerifiedInfo (edge) { @@ -276,61 +320,52 @@ class VerifySignatures { } try { - const { integrity, signatures, resolved } = await this.verifySignatures( + const { integrity, signatures, attestations, resolved } = await this.verifySignatures( name, version, registry ) // Currently we only care about missing signatures on registries that provide a public key // We could make this configurable in the future with a strict/paranoid mode if (signatures.length) { - this.verifiedCount += 1 + this.verifiedSignatureCount += 1 } else if (keys.length) { this.missing.push({ - name, - version, - location, - resolved, integrity, + location, + name, registry, + resolved, + version, }) } + + // Track verified attestations separately to registry signatures, as all + // packages on registries with signing keys are expected to have registry + // signatures, but not all packages have provenance and publish attestations. + if (attestations) { + this.verifiedAttestationCount += 1 + } } catch (e) { - if (e.code === 'EINTEGRITYSIGNATURE') { - const { signature, keyid, integrity, resolved } = e + if (e.code === 'EINTEGRITYSIGNATURE' || e.code === 'EATTESTATIONVERIFY') { this.invalid.push({ + code: e.code, + message: e.message, + integrity: e.integrity, + keyid: e.keyid, + location, name, + registry, + resolved: e.resolved, + signature: e.signature, + predicateType: e.predicateType, type, version, - resolved, - location, - integrity, - registry, - signature, - keyid, }) } else { throw e } } } - - humanOutput (list) { - return list.map(v => - `${this.npm.chalk.red(`${v.name}@${v.version}`)} (${v.registry})` - ).join('\n') - } - - makeJSON (deps) { - return deps.map(d => ({ - name: d.name, - version: d.version, - location: d.location, - resolved: d.resolved, - integrity: d.integrity, - signature: d.signature, - keyid: d.keyid, - })) - } } class Audit extends ArboristWorkspaceCmd { @@ -432,9 +467,6 @@ class Audit extends ArboristWorkspaceCmd { const verify = new VerifySignatures(tree, filterSet, this.npm, { ...opts }) await verify.run() - const result = verify.report() - process.exitCode = process.exitCode || result.exitCode - this.npm.output(result.report) } } diff --git a/deps/npm/lib/commands/init.js b/deps/npm/lib/commands/init.js index 16ece46589d7cb..1e5661a7840f26 100644 --- a/deps/npm/lib/commands/init.js +++ b/deps/npm/lib/commands/init.js @@ -165,24 +165,20 @@ class Init extends BaseCommand { ].join('\n')) } - // XXX promisify init-package-json - await new Promise((res, rej) => { - initJson(path, initFile, this.npm.config, (er, data) => { - log.resume() - log.enableProgress() - log.silly('package data', data) - if (er && er.message === 'canceled') { - log.warn('init', 'canceled') - return res() - } - if (er) { - rej(er) - } else { - log.info('init', 'written successfully') - res(data) - } - }) - }) + try { + const data = await initJson(path, initFile, this.npm.config) + log.silly('package data', data) + return data + } catch (er) { + if (er.message === 'canceled') { + log.warn('init', 'canceled') + } else { + throw er + } + } finally { + log.resume() + log.enableProgress() + } } async setWorkspace (pkg, workspacePath) { diff --git a/deps/npm/lib/commands/publish.js b/deps/npm/lib/commands/publish.js index 76faea9457f748..8befbc5ca34cec 100644 --- a/deps/npm/lib/commands/publish.js +++ b/deps/npm/lib/commands/publish.js @@ -35,6 +35,7 @@ class Publish extends BaseCommand { 'workspace', 'workspaces', 'include-workspace-root', + 'provenance', ] static usage = [''] diff --git a/deps/npm/lib/commands/unpublish.js b/deps/npm/lib/commands/unpublish.js index 9985e2e39f1405..f1bcded192e5ad 100644 --- a/deps/npm/lib/commands/unpublish.js +++ b/deps/npm/lib/commands/unpublish.js @@ -26,7 +26,10 @@ class Unpublish extends BaseCommand { async getKeysOfVersions (name, opts) { const pkgUri = npa(name).escapedName - const json = await npmFetch.json(`${pkgUri}?write=true`, opts) + const json = await npmFetch.json(`${pkgUri}?write=true`, { + ...opts, + spec: name, + }) return Object.keys(json.versions) } diff --git a/deps/npm/lib/utils/auth.js b/deps/npm/lib/utils/auth.js index 8b9125a1c3ef06..729ce32c2a7a8f 100644 --- a/deps/npm/lib/utils/auth.js +++ b/deps/npm/lib/utils/auth.js @@ -8,16 +8,27 @@ const adduser = async (npm, { creds, ...opts }) => { const authType = npm.config.get('auth-type') let res if (authType === 'web') { - res = await profile.adduserWeb((url, emitter) => { - openUrlPrompt( - npm, - url, - 'Create your account at', - 'Press ENTER to open in the browser...', - emitter - ) - }, opts) - } else { + try { + res = await profile.adduserWeb((url, emitter) => { + openUrlPrompt( + npm, + url, + 'Create your account at', + 'Press ENTER to open in the browser...', + emitter + ) + }, opts) + } catch (err) { + if (err.code === 'ENYI') { + log.verbose('web add user not supported, trying couch') + } else { + throw err + } + } + } + + // auth type !== web or ENYI error w/ web adduser + if (!res) { const username = await read.username('Username:', creds.username) const password = await read.password('Password:', creds.password) const email = await read.email('Email: (this IS public) ', creds.email) @@ -44,16 +55,27 @@ const login = async (npm, { creds, ...opts }) => { const authType = npm.config.get('auth-type') let res if (authType === 'web') { - res = await profile.loginWeb((url, emitter) => { - openUrlPrompt( - npm, - url, - 'Login at', - 'Press ENTER to open in the browser...', - emitter - ) - }, opts) - } else { + try { + res = await profile.loginWeb((url, emitter) => { + openUrlPrompt( + npm, + url, + 'Login at', + 'Press ENTER to open in the browser...', + emitter + ) + }, opts) + } catch (err) { + if (err.code === 'ENYI') { + log.verbose('web login not supported, trying couch') + } else { + throw err + } + } + } + + // auth type !== web or ENYI error w/ web login + if (!res) { const username = await read.username('Username:', creds.username) const password = await read.password('Password:', creds.password) res = await otplease(npm, opts, (reqOpts) => diff --git a/deps/npm/lib/utils/config/definitions.js b/deps/npm/lib/utils/config/definitions.js index 578e0daa677375..4b9eb1f64cbbd1 100644 --- a/deps/npm/lib/utils/config/definitions.js +++ b/deps/npm/lib/utils/config/definitions.js @@ -1078,7 +1078,7 @@ define('init.version', { }) define('install-links', { - default: true, + default: false, type: Boolean, description: ` When set file: protocol dependencies will be packed and installed as @@ -1620,6 +1620,15 @@ define('progress', { }, }) +define('provenance', { + default: false, + type: Boolean, + description: ` + Indicates that a provenance statement should be generated. + `, + flatten, +}) + define('proxy', { default: null, type: [null, false, url], // allow proxy to be disabled explicitly diff --git a/deps/npm/lib/utils/read-user-info.js b/deps/npm/lib/utils/read-user-info.js index 26d5b36d55b582..1cac8ee6d2668b 100644 --- a/deps/npm/lib/utils/read-user-info.js +++ b/deps/npm/lib/utils/read-user-info.js @@ -1,5 +1,4 @@ -const { promisify } = require('util') -const readAsync = promisify(require('read')) +const read = require('read') const userValidate = require('npm-user-validate') const log = require('./log-shim.js') @@ -17,9 +16,9 @@ const passwordPrompt = 'npm password: ' const usernamePrompt = 'npm username: ' const emailPrompt = 'email (this IS public): ' -function read (opts) { +function readWithProgress (opts) { log.clearProgress() - return readAsync(opts).finally(() => log.showProgress()) + return read(opts).finally(() => log.showProgress()) } function readOTP (msg = otpPrompt, otp, isRetry) { @@ -27,7 +26,7 @@ function readOTP (msg = otpPrompt, otp, isRetry) { return otp.replace(/\s+/g, '') } - return read({ prompt: msg, default: otp || '' }) + return readWithProgress({ prompt: msg, default: otp || '' }) .then((rOtp) => readOTP(msg, rOtp, true)) } @@ -36,7 +35,7 @@ function readPassword (msg = passwordPrompt, password, isRetry) { return password } - return read({ prompt: msg, silent: true, default: password || '' }) + return readWithProgress({ prompt: msg, silent: true, default: password || '' }) .then((rPassword) => readPassword(msg, rPassword, true)) } @@ -50,7 +49,7 @@ function readUsername (msg = usernamePrompt, username, isRetry) { } } - return read({ prompt: msg, default: username || '' }) + return readWithProgress({ prompt: msg, default: username || '' }) .then((rUsername) => readUsername(msg, rUsername, true)) } @@ -64,6 +63,6 @@ function readEmail (msg = emailPrompt, email, isRetry) { } } - return read({ prompt: msg, default: email || '' }) + return readWithProgress({ prompt: msg, default: email || '' }) .then((username) => readEmail(msg, username, true)) } diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index 91381c80c2c909..732813c2b8642f 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM-ACCESS" "1" "January 2023" "" "" +.TH "NPM-ACCESS" "1" "February 2023" "" "" .SH "NAME" \fBnpm-access\fR - Set access level on published packages .SS "Synopsis" @@ -55,7 +55,7 @@ You have been given read-write privileges for a package, either as a member of a .RE 0 .P -If you have two-factor authentication enabled then you'll be prompted to provide an otp token, or may use the \fB--otp=...\fR option to specify it on the command line. +If you have two-factor authentication enabled then you'll be prompted to provide a second factor, or may use the \fB--otp=...\fR option to specify it on the command line. .P If your account is not paid, then attempts to publish scoped packages will fail with an HTTP 402 status code (logically enough), unless you use \fB--access=public\fR. .P diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 4e9a687fb6752c..5a4ee97566cc08 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM-ADDUSER" "1" "January 2023" "" "" +.TH "NPM-ADDUSER" "1" "February 2023" "" "" .SH "NAME" \fBnpm-adduser\fR - Add a registry user account .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-audit.1 b/deps/npm/man/man1/npm-audit.1 index f99fa41719b110..f0c8475937f7fa 100644 --- a/deps/npm/man/man1/npm-audit.1 +++ b/deps/npm/man/man1/npm-audit.1 @@ -1,4 +1,4 @@ -.TH "NPM-AUDIT" "1" "January 2023" "" "" +.TH "NPM-AUDIT" "1" "February 2023" "" "" .SH "NAME" \fBnpm-audit\fR - Run a security audit .SS "Synopsis" @@ -403,7 +403,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index 61d2835a912352..1f2ee1642dab02 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM-BUGS" "1" "January 2023" "" "" +.TH "NPM-BUGS" "1" "February 2023" "" "" .SH "NAME" \fBnpm-bugs\fR - Report bugs for a package in a web browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index 026f08d17d1ca2..5559b3be352bfb 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM-CACHE" "1" "January 2023" "" "" +.TH "NPM-CACHE" "1" "February 2023" "" "" .SH "NAME" \fBnpm-cache\fR - Manipulates packages cache .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1 index e4d3c2feb01d35..66b688f9717612 100644 --- a/deps/npm/man/man1/npm-ci.1 +++ b/deps/npm/man/man1/npm-ci.1 @@ -1,4 +1,4 @@ -.TH "NPM-CI" "1" "January 2023" "" "" +.TH "NPM-CI" "1" "February 2023" "" "" .SH "NAME" \fBnpm-ci\fR - Clean install a project .SS "Synopsis" @@ -314,7 +314,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index c2f5d2a2506d23..b82899fd35db14 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM-COMPLETION" "1" "January 2023" "" "" +.TH "NPM-COMPLETION" "1" "February 2023" "" "" .SH "NAME" \fBnpm-completion\fR - Tab Completion for npm .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index 1f4e831af8d63b..0cf96143ff8e3b 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM-CONFIG" "1" "January 2023" "" "" +.TH "NPM-CONFIG" "1" "February 2023" "" "" .SH "NAME" \fBnpm-config\fR - Manage the npm configuration files .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index 78feb7989c4797..302d63b3c2c107 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM-DEDUPE" "1" "January 2023" "" "" +.TH "NPM-DEDUPE" "1" "February 2023" "" "" .SH "NAME" \fBnpm-dedupe\fR - Reduce duplication in the package tree .SS "Synopsis" @@ -258,7 +258,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index ad4f34b53c263e..d525e703e841d9 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM-DEPRECATE" "1" "January 2023" "" "" +.TH "NPM-DEPRECATE" "1" "February 2023" "" "" .SH "NAME" \fBnpm-deprecate\fR - Deprecate a version of a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-diff.1 b/deps/npm/man/man1/npm-diff.1 index 410548534a6e0d..5d2c240f839f95 100644 --- a/deps/npm/man/man1/npm-diff.1 +++ b/deps/npm/man/man1/npm-diff.1 @@ -1,4 +1,4 @@ -.TH "NPM-DIFF" "1" "January 2023" "" "" +.TH "NPM-DIFF" "1" "February 2023" "" "" .SH "NAME" \fBnpm-diff\fR - The registry diff command .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index f87010d6019de8..bd700f0fefe5ed 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM-DIST-TAG" "1" "January 2023" "" "" +.TH "NPM-DIST-TAG" "1" "February 2023" "" "" .SH "NAME" \fBnpm-dist-tag\fR - Modify package distribution tags .SS "Synopsis" @@ -17,9 +17,9 @@ alias: dist-tags Add, remove, and enumerate distribution tags on a package: .RS 0 .IP \(bu 4 -add: Tags the specified version of the package with the specified tag, or the \fB\fB--tag\fR config\fR \fI\(la/using-npm/config#tag\(ra\fR if not specified. If you have two-factor authentication on auth-and-writes then you\[cq]ll need to include a one-time password on the command line with \fB--otp \fR, or at the OTP prompt. +add: Tags the specified version of the package with the specified tag, or the \fB\fB--tag\fR config\fR \fI\(la/using-npm/config#tag\(ra\fR if not specified. If you have two-factor authentication on auth-and-writes then you\[cq]ll need to include a one-time password on the command line with \fB--otp \fR, or go through a second factor flow based on your \fBauthtype\fR. .IP \(bu 4 -rm: Clear a tag that is no longer in use from the package. If you have two-factor authentication on auth-and-writes then you\[cq]ll need to include a one-time password on the command line with \fB--otp \fR, or at the OTP prompt. +rm: Clear a tag that is no longer in use from the package. If you have two-factor authentication on auth-and-writes then you\[cq]ll need to include a one-time password on the command line with \fB--otp \fR, or go through a second factor flow based on your \fBauthtype\fR .IP \(bu 4 ls: Show all of the dist-tags for a package, defaulting to the package in the current prefix. This is the default action if none is specified. .RE 0 diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index c3832ae6f52279..6ee27d9348b7b1 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM-DOCS" "1" "January 2023" "" "" +.TH "NPM-DOCS" "1" "February 2023" "" "" .SH "NAME" \fBnpm-docs\fR - Open documentation for a package in a web browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1 index a33e7acf628325..d1b5a4165452af 100644 --- a/deps/npm/man/man1/npm-doctor.1 +++ b/deps/npm/man/man1/npm-doctor.1 @@ -1,4 +1,4 @@ -.TH "NPM-DOCTOR" "1" "January 2023" "" "" +.TH "NPM-DOCTOR" "1" "February 2023" "" "" .SH "NAME" \fBnpm-doctor\fR - Check your npm environment .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 4b933ac01c88a4..de723dfabe983b 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM-EDIT" "1" "January 2023" "" "" +.TH "NPM-EDIT" "1" "February 2023" "" "" .SH "NAME" \fBnpm-edit\fR - Edit an installed package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-exec.1 b/deps/npm/man/man1/npm-exec.1 index b8b6cc7e96187a..10d06ae263408f 100644 --- a/deps/npm/man/man1/npm-exec.1 +++ b/deps/npm/man/man1/npm-exec.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXEC" "1" "January 2023" "" "" +.TH "NPM-EXEC" "1" "February 2023" "" "" .SH "NAME" \fBnpm-exec\fR - Run a command from a local or remote npm package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-explain.1 b/deps/npm/man/man1/npm-explain.1 index b1b5305d0d99e7..a8f5e0e2b63487 100644 --- a/deps/npm/man/man1/npm-explain.1 +++ b/deps/npm/man/man1/npm-explain.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXPLAIN" "1" "January 2023" "" "" +.TH "NPM-EXPLAIN" "1" "February 2023" "" "" .SH "NAME" \fBnpm-explain\fR - Explain installed packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index de402db28c648e..82452e0cba6eaa 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXPLORE" "1" "January 2023" "" "" +.TH "NPM-EXPLORE" "1" "February 2023" "" "" .SH "NAME" \fBnpm-explore\fR - Browse an installed package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-find-dupes.1 b/deps/npm/man/man1/npm-find-dupes.1 index c38290b9c6b442..4834f54df6abd3 100644 --- a/deps/npm/man/man1/npm-find-dupes.1 +++ b/deps/npm/man/man1/npm-find-dupes.1 @@ -1,4 +1,4 @@ -.TH "NPM-FIND-DUPES" "1" "January 2023" "" "" +.TH "NPM-FIND-DUPES" "1" "February 2023" "" "" .SH "NAME" \fBnpm-find-dupes\fR - Find duplication in the package tree .SS "Synopsis" @@ -193,7 +193,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1 index 7c1fe64f033cd1..a0a31eebd445ac 100644 --- a/deps/npm/man/man1/npm-fund.1 +++ b/deps/npm/man/man1/npm-fund.1 @@ -1,4 +1,4 @@ -.TH "NPM-FUND" "1" "January 2023" "" "" +.TH "NPM-FUND" "1" "February 2023" "" "" .SH "NAME" \fBnpm-fund\fR - Retrieve funding information .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index 5d7a40e7ca3cec..846f507f51e4d7 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM-HELP-SEARCH" "1" "January 2023" "" "" +.TH "NPM-HELP-SEARCH" "1" "February 2023" "" "" .SH "NAME" \fBnpm-help-search\fR - Search npm help documentation .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index c0e77e0b5fc83d..cffb33d49f91ef 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM-HELP" "1" "January 2023" "" "" +.TH "NPM-HELP" "1" "February 2023" "" "" .SH "NAME" \fBnpm-help\fR - Get help on npm .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-hook.1 b/deps/npm/man/man1/npm-hook.1 index 8ba80f625cebbb..0cd0935d9498a9 100644 --- a/deps/npm/man/man1/npm-hook.1 +++ b/deps/npm/man/man1/npm-hook.1 @@ -1,4 +1,4 @@ -.TH "NPM-HOOK" "1" "January 2023" "" "" +.TH "NPM-HOOK" "1" "February 2023" "" "" .SH "NAME" \fBnpm-hook\fR - Manage registry hooks .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index f5fc5fbc359195..763e2914fa1e67 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM-INIT" "1" "January 2023" "" "" +.TH "NPM-INIT" "1" "February 2023" "" "" .SH "NAME" \fBnpm-init\fR - Create a package.json file .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1 index 987643c830bf05..fbe641322dac4b 100644 --- a/deps/npm/man/man1/npm-install-ci-test.1 +++ b/deps/npm/man/man1/npm-install-ci-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL-CI-TEST" "1" "January 2023" "" "" +.TH "NPM-INSTALL-CI-TEST" "1" "February 2023" "" "" .SH "NAME" \fBnpm-install-ci-test\fR - Install a project with a clean slate and run tests .SS "Synopsis" @@ -262,7 +262,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index 2f9282ef29e851..528ec9b75adf02 100644 --- a/deps/npm/man/man1/npm-install-test.1 +++ b/deps/npm/man/man1/npm-install-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL-TEST" "1" "January 2023" "" "" +.TH "NPM-INSTALL-TEST" "1" "February 2023" "" "" .SH "NAME" \fBnpm-install-test\fR - Install package(s) and run tests .SS "Synopsis" @@ -262,7 +262,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index 97997f1bada754..4eb982a825f3e3 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL" "1" "January 2023" "" "" +.TH "NPM-INSTALL" "1" "February 2023" "" "" .SH "NAME" \fBnpm-install\fR - Install a package .SS "Synopsis" @@ -624,7 +624,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index ed09d4a11c58d2..84c3e7fd7ccc3c 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM-LINK" "1" "January 2023" "" "" +.TH "NPM-LINK" "1" "February 2023" "" "" .SH "NAME" \fBnpm-link\fR - Symlink a package folder .SS "Synopsis" @@ -317,7 +317,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-login.1 b/deps/npm/man/man1/npm-login.1 index 3b99aefeecf75a..83535a93440fa7 100644 --- a/deps/npm/man/man1/npm-login.1 +++ b/deps/npm/man/man1/npm-login.1 @@ -1,4 +1,4 @@ -.TH "NPM-LOGIN" "1" "January 2023" "" "" +.TH "NPM-LOGIN" "1" "February 2023" "" "" .SH "NAME" \fBnpm-login\fR - Login to a registry user account .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 3bb5aa671422ed..945b6ef8e02003 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM-LOGOUT" "1" "January 2023" "" "" +.TH "NPM-LOGOUT" "1" "February 2023" "" "" .SH "NAME" \fBnpm-logout\fR - Log out of the registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 06b0ae23d4cb10..3d12f7a42dfb47 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM-LS" "1" "January 2023" "" "" +.TH "NPM-LS" "1" "February 2023" "" "" .SH "NAME" \fBnpm-ls\fR - List installed packages .SS "Synopsis" @@ -20,7 +20,7 @@ Positional arguments are \fBname@version-range\fR identifiers, which will limit .P .RS 2 .nf -npm@9.4.0 /path/to/npm +npm@9.5.0 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 .fi @@ -235,7 +235,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-org.1 b/deps/npm/man/man1/npm-org.1 index ba4ee6c72a5ebc..2e952687b307ac 100644 --- a/deps/npm/man/man1/npm-org.1 +++ b/deps/npm/man/man1/npm-org.1 @@ -1,4 +1,4 @@ -.TH "NPM-ORG" "1" "January 2023" "" "" +.TH "NPM-ORG" "1" "February 2023" "" "" .SH "NAME" \fBnpm-org\fR - Manage orgs .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index 0cd7762886c959..683321321f6876 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM-OUTDATED" "1" "January 2023" "" "" +.TH "NPM-OUTDATED" "1" "February 2023" "" "" .SH "NAME" \fBnpm-outdated\fR - Check for outdated packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index f2015740b02cd9..bf73df68cdf48b 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM-OWNER" "1" "January 2023" "" "" +.TH "NPM-OWNER" "1" "February 2023" "" "" .SH "NAME" \fBnpm-owner\fR - Manage package owners .SS "Synopsis" @@ -27,7 +27,7 @@ rm: Remove a user from the package owner list. This immediately revokes their pr .P Note that there is only one level of access. Either you can modify a package, or you can't. Future versions may contain more fine-grained access levels, but that is not implemented at this time. .P -If you have two-factor authentication enabled with \fBauth-and-writes\fR (see npm help npm-profile) then you'll need to include an otp on the command line when changing ownership with \fB--otp\fR. +If you have two-factor authentication enabled with \fBauth-and-writes\fR (see npm help npm-profile) then you'll need to go through a second factor flow when changing ownership or include an otp on the command line with \fB--otp\fR. .SS "Configuration" .SS "\fBregistry\fR" .RS 0 diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index 934bc9cf4ec176..e6b19f2eb061c6 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM-PACK" "1" "January 2023" "" "" +.TH "NPM-PACK" "1" "February 2023" "" "" .SH "NAME" \fBnpm-pack\fR - Create a tarball from a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index 59c5191676dba1..4ae24a8cd6eb46 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM-PING" "1" "January 2023" "" "" +.TH "NPM-PING" "1" "February 2023" "" "" .SH "NAME" \fBnpm-ping\fR - Ping npm registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-pkg.1 b/deps/npm/man/man1/npm-pkg.1 index 4f3437fb2fedb1..d67f473563af1a 100644 --- a/deps/npm/man/man1/npm-pkg.1 +++ b/deps/npm/man/man1/npm-pkg.1 @@ -1,4 +1,4 @@ -.TH "NPM-PKG" "1" "January 2023" "" "" +.TH "NPM-PKG" "1" "February 2023" "" "" .SH "NAME" \fBnpm-pkg\fR - Manages your package.json .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index c51646626a4982..a14aec7c6b3043 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM-PREFIX" "1" "January 2023" "" "" +.TH "NPM-PREFIX" "1" "February 2023" "" "" .SH "NAME" \fBnpm-prefix\fR - Display prefix .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1 index cd5cba95150b22..40bc3df8e842a7 100644 --- a/deps/npm/man/man1/npm-profile.1 +++ b/deps/npm/man/man1/npm-profile.1 @@ -1,4 +1,4 @@ -.TH "NPM-PROFILE" "1" "January 2023" "" "" +.TH "NPM-PROFILE" "1" "February 2023" "" "" .SH "NAME" \fBnpm-profile\fR - Change settings on your registry profile .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 928ccd5d806082..86546ac112f1cd 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM-PRUNE" "1" "January 2023" "" "" +.TH "NPM-PRUNE" "1" "February 2023" "" "" .SH "NAME" \fBnpm-prune\fR - Remove extraneous packages .SS "Synopsis" @@ -152,7 +152,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index d75c7b39eb60aa..97b912987d0bd0 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM-PUBLISH" "1" "January 2023" "" "" +.TH "NPM-PUBLISH" "1" "February 2023" "" "" .SH "NAME" \fBnpm-publish\fR - Publish a package .SS "Synopsis" @@ -172,6 +172,16 @@ Include the workspace root when workspaces are enabled for a command. When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. .P This value is not exported to the environment for child processes. +.SS "\fBprovenance\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Indicates that a provenance statement should be generated. .SS "See Also" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-query.1 b/deps/npm/man/man1/npm-query.1 index 0e6d444e39948b..24ba7853adba8f 100644 --- a/deps/npm/man/man1/npm-query.1 +++ b/deps/npm/man/man1/npm-query.1 @@ -1,4 +1,4 @@ -.TH "NPM-QUERY" "1" "January 2023" "" "" +.TH "NPM-QUERY" "1" "February 2023" "" "" .SH "NAME" \fBnpm-query\fR - Dependency selector query .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index ce56c880b634af..1c00566dd1701a 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM-REBUILD" "1" "January 2023" "" "" +.TH "NPM-REBUILD" "1" "February 2023" "" "" .SH "NAME" \fBnpm-rebuild\fR - Rebuild a package .SS "Synopsis" @@ -132,7 +132,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index 836ae8de258883..65bb96687f571e 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM-REPO" "1" "January 2023" "" "" +.TH "NPM-REPO" "1" "February 2023" "" "" .SH "NAME" \fBnpm-repo\fR - Open package repository page in the browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index 00b83e280b5cfd..9323e2841a261e 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM-RESTART" "1" "January 2023" "" "" +.TH "NPM-RESTART" "1" "February 2023" "" "" .SH "NAME" \fBnpm-restart\fR - Restart a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 9333aa4545235b..bd943bb95a6d9c 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM-ROOT" "1" "January 2023" "" "" +.TH "NPM-ROOT" "1" "February 2023" "" "" .SH "NAME" \fBnpm-root\fR - Display npm root .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index 44a6a76a8b3844..afcf4d655bf218 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,4 +1,4 @@ -.TH "NPM-RUN-SCRIPT" "1" "January 2023" "" "" +.TH "NPM-RUN-SCRIPT" "1" "February 2023" "" "" .SH "NAME" \fBnpm-run-script\fR - Run arbitrary package scripts .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index 3fe6f69992ed6a..2241f81e2250e8 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM-SEARCH" "1" "January 2023" "" "" +.TH "NPM-SEARCH" "1" "February 2023" "" "" .SH "NAME" \fBnpm-search\fR - Search for packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index 875f0b58bad501..5192bc1222f3dc 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM-SHRINKWRAP" "1" "January 2023" "" "" +.TH "NPM-SHRINKWRAP" "1" "February 2023" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR - Lock down dependency versions for publication .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index 627d11b3667df7..ecb2ffe84fa809 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM-STAR" "1" "January 2023" "" "" +.TH "NPM-STAR" "1" "February 2023" "" "" .SH "NAME" \fBnpm-star\fR - Mark your favorite packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index 6660429c892b48..49ffc90e03ce10 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM-STARS" "1" "January 2023" "" "" +.TH "NPM-STARS" "1" "February 2023" "" "" .SH "NAME" \fBnpm-stars\fR - View packages marked as favorites .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index abdc41d8c5194d..ecf3ad2838266c 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM-START" "1" "January 2023" "" "" +.TH "NPM-START" "1" "February 2023" "" "" .SH "NAME" \fBnpm-start\fR - Start a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index 9c9437aafe6543..4a5f604941e09d 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM-STOP" "1" "January 2023" "" "" +.TH "NPM-STOP" "1" "February 2023" "" "" .SH "NAME" \fBnpm-stop\fR - Stop a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 917dbce667b9a3..30399634bc8bc8 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM-TEAM" "1" "January 2023" "" "" +.TH "NPM-TEAM" "1" "February 2023" "" "" .SH "NAME" \fBnpm-team\fR - Manage organization teams and team memberships .SS "Synopsis" @@ -20,7 +20,7 @@ Used to manage teams in organizations, and change team memberships. Does not han .P Teams must always be fully qualified with the organization/scope they belong to when operating on them, separated by a colon (\fB:\fR). That is, if you have a \fBnewteam\fR team in an \fBorg\fR organization, you must always refer to that team as \fB@org:newteam\fR in these commands. .P -If you have two-factor authentication enabled in \fBauth-and-writes\fR mode, then you can provide a code from your authenticator with \fB\[lB]--otp \[rB]\fR. If you don't include this then you will be prompted. +If you have two-factor authentication enabled in \fBauth-and-writes\fR mode, then you can provide a code from your authenticator with \fB\[lB]--otp \[rB]\fR. If you don't include this then you will be taken through a second factor flow based on your \fBauthtype\fR. .RS 0 .IP \(bu 4 create / destroy: Create a new team, or destroy an existing one. Note: You cannot remove the \fBdevelopers\fR team, learn more. diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index 5863931a62e8fa..ddd45f0757b9ff 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-TEST" "1" "January 2023" "" "" +.TH "NPM-TEST" "1" "February 2023" "" "" .SH "NAME" \fBnpm-test\fR - Test a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1 index 1c7f976201283e..202f55bd69e68e 100644 --- a/deps/npm/man/man1/npm-token.1 +++ b/deps/npm/man/man1/npm-token.1 @@ -1,4 +1,4 @@ -.TH "NPM-TOKEN" "1" "January 2023" "" "" +.TH "NPM-TOKEN" "1" "February 2023" "" "" .SH "NAME" \fBnpm-token\fR - Manage your authentication tokens .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index 231b203955aa63..9c90a9863215c9 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNINSTALL" "1" "January 2023" "" "" +.TH "NPM-UNINSTALL" "1" "February 2023" "" "" .SH "NAME" \fBnpm-uninstall\fR - Remove a package .SS "Synopsis" @@ -118,7 +118,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index 99024be559c3c3..8b250dd67bcc41 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNPUBLISH" "1" "January 2023" "" "" +.TH "NPM-UNPUBLISH" "1" "February 2023" "" "" .SH "NAME" \fBnpm-unpublish\fR - Remove a package from the registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-unstar.1 b/deps/npm/man/man1/npm-unstar.1 index 8263c1aad3f280..c76968c9050b5b 100644 --- a/deps/npm/man/man1/npm-unstar.1 +++ b/deps/npm/man/man1/npm-unstar.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNSTAR" "1" "January 2023" "" "" +.TH "NPM-UNSTAR" "1" "February 2023" "" "" .SH "NAME" \fBnpm-unstar\fR - Remove an item from your favorite packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index 6d826c32905d7e..7819631243fccd 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM-UPDATE" "1" "January 2023" "" "" +.TH "NPM-UPDATE" "1" "February 2023" "" "" .SH "NAME" \fBnpm-update\fR - Update packages .SS "Synopsis" @@ -370,7 +370,7 @@ This value is not exported to the environment for child processes. .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index 59248f1a4ef769..66bfdbdc598bdd 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM-VERSION" "1" "January 2023" "" "" +.TH "NPM-VERSION" "1" "February 2023" "" "" .SH "NAME" \fBnpm-version\fR - Bump a package version .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 8de0a2d9f7df87..6075c163d0e8d2 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM-VIEW" "1" "January 2023" "" "" +.TH "NPM-VIEW" "1" "February 2023" "" "" .SH "NAME" \fBnpm-view\fR - View registry info .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index a609e66bf52059..d96a3648776381 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM-WHOAMI" "1" "January 2023" "" "" +.TH "NPM-WHOAMI" "1" "February 2023" "" "" .SH "NAME" \fBnpm-whoami\fR - Display npm username .SS "Synopsis" diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 64e6f290ce258e..3e1b5acf5c0bfc 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "January 2023" "" "" +.TH "NPM" "1" "February 2023" "" "" .SH "NAME" \fBnpm\fR - javascript package manager .SS "Synopsis" @@ -12,7 +12,7 @@ npm Note: This command is unaware of workspaces. .SS "Version" .P -9.4.0 +9.5.0 .SS "Description" .P npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently. diff --git a/deps/npm/man/man1/npx.1 b/deps/npm/man/man1/npx.1 index ab3a83236bfcd1..079dffeecdbe2e 100644 --- a/deps/npm/man/man1/npx.1 +++ b/deps/npm/man/man1/npx.1 @@ -1,4 +1,4 @@ -.TH "NPX" "1" "January 2023" "" "" +.TH "NPX" "1" "February 2023" "" "" .SH "NAME" \fBnpx\fR - Run a command from a local or remote npm package .SS "Synopsis" diff --git a/deps/npm/man/man5/folders.5 b/deps/npm/man/man5/folders.5 index 09870f292aee49..50bf4c8c7aec20 100644 --- a/deps/npm/man/man5/folders.5 +++ b/deps/npm/man/man5/folders.5 @@ -1,4 +1,4 @@ -.TH "FOLDERS" "5" "January 2023" "" "" +.TH "FOLDERS" "5" "February 2023" "" "" .SH "NAME" \fBfolders\fR - Folder Structures Used by npm .SS "Description" diff --git a/deps/npm/man/man5/install.5 b/deps/npm/man/man5/install.5 index ecc6a9b72379ca..68af465f5ee21a 100644 --- a/deps/npm/man/man5/install.5 +++ b/deps/npm/man/man5/install.5 @@ -1,4 +1,4 @@ -.TH "INSTALL" "5" "January 2023" "" "" +.TH "INSTALL" "5" "February 2023" "" "" .SH "NAME" \fBinstall\fR - Download and install node and npm .SS "Description" diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index 09870f292aee49..50bf4c8c7aec20 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,4 +1,4 @@ -.TH "FOLDERS" "5" "January 2023" "" "" +.TH "FOLDERS" "5" "February 2023" "" "" .SH "NAME" \fBfolders\fR - Folder Structures Used by npm .SS "Description" diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index 6d7c946a06110d..ceafaf29104e66 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE.JSON" "5" "January 2023" "" "" +.TH "PACKAGE.JSON" "5" "February 2023" "" "" .SH "NAME" \fBpackage.json\fR - Specifics of npm's package.json handling .SS "Description" diff --git a/deps/npm/man/man5/npm-shrinkwrap-json.5 b/deps/npm/man/man5/npm-shrinkwrap-json.5 index 2e498029e420b6..12a5dc05887fda 100644 --- a/deps/npm/man/man5/npm-shrinkwrap-json.5 +++ b/deps/npm/man/man5/npm-shrinkwrap-json.5 @@ -1,4 +1,4 @@ -.TH "NPM-SHRINKWRAP.JSON" "5" "January 2023" "" "" +.TH "NPM-SHRINKWRAP.JSON" "5" "February 2023" "" "" .SH "NAME" \fBnpm-shrinkwrap.json\fR - A publishable lockfile .SS "Description" diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index 0828d2ea7ba317..a568984bc80aaa 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "January 2023" "" "" +.TH "NPMRC" "5" "February 2023" "" "" .SH "NAME" \fBnpmrc\fR - The npm config files .SS "Description" diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5 index 6d7c946a06110d..ceafaf29104e66 100644 --- a/deps/npm/man/man5/package-json.5 +++ b/deps/npm/man/man5/package-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE.JSON" "5" "January 2023" "" "" +.TH "PACKAGE.JSON" "5" "February 2023" "" "" .SH "NAME" \fBpackage.json\fR - Specifics of npm's package.json handling .SS "Description" diff --git a/deps/npm/man/man5/package-lock-json.5 b/deps/npm/man/man5/package-lock-json.5 index d10a93bc31ab82..20be57b80db4fb 100644 --- a/deps/npm/man/man5/package-lock-json.5 +++ b/deps/npm/man/man5/package-lock-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE-LOCK.JSON" "5" "January 2023" "" "" +.TH "PACKAGE-LOCK.JSON" "5" "February 2023" "" "" .SH "NAME" \fBpackage-lock.json\fR - A manifestation of the manifest .SS "Description" diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7 index 8cfd9b876ece00..dc4261c2803a8c 100644 --- a/deps/npm/man/man7/config.7 +++ b/deps/npm/man/man7/config.7 @@ -1,4 +1,4 @@ -.TH "CONFIG" "7" "January 2023" "" "" +.TH "CONFIG" "7" "February 2023" "" "" .SH "NAME" \fBconfig\fR - More than you probably want to know about npm configuration .SS "Description" @@ -815,7 +815,7 @@ The value that \fBnpm init\fR should use by default for the package version numb .SS "\fBinstall-links\fR" .RS 0 .IP \(bu 4 -Default: true +Default: false .IP \(bu 4 Type: Boolean .RE 0 @@ -1168,6 +1168,16 @@ Type: Boolean When set to \fBtrue\fR, npm will display a progress bar during time intensive operations, if \fBprocess.stderr\fR is a TTY. .P Set to \fBfalse\fR to suppress the progress bar. +.SS "\fBprovenance\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Indicates that a provenance statement should be generated. .SS "\fBproxy\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man7/dependency-selectors.7 b/deps/npm/man/man7/dependency-selectors.7 index e3b0271a2601f7..f1670a3a20e885 100644 --- a/deps/npm/man/man7/dependency-selectors.7 +++ b/deps/npm/man/man7/dependency-selectors.7 @@ -1,4 +1,4 @@ -.TH "QUERYING" "7" "January 2023" "" "" +.TH "QUERYING" "7" "February 2023" "" "" .SH "NAME" \fBQuerying\fR - Dependency Selector Syntax & Querying .SS "Description" diff --git a/deps/npm/man/man7/developers.7 b/deps/npm/man/man7/developers.7 index 8b5184dcb662dc..a15142ba205a4b 100644 --- a/deps/npm/man/man7/developers.7 +++ b/deps/npm/man/man7/developers.7 @@ -1,4 +1,4 @@ -.TH "DEVELOPERS" "7" "January 2023" "" "" +.TH "DEVELOPERS" "7" "February 2023" "" "" .SH "NAME" \fBdevelopers\fR - Developer Guide .SS "Description" diff --git a/deps/npm/man/man7/logging.7 b/deps/npm/man/man7/logging.7 index f894a4b36fdfd8..d1cc3bdf00d8ca 100644 --- a/deps/npm/man/man7/logging.7 +++ b/deps/npm/man/man7/logging.7 @@ -1,4 +1,4 @@ -.TH "LOGGING" "7" "January 2023" "" "" +.TH "LOGGING" "7" "February 2023" "" "" .SH "NAME" \fBLogging\fR - Why, What & How We Log .SS "Description" diff --git a/deps/npm/man/man7/orgs.7 b/deps/npm/man/man7/orgs.7 index 1aefdbb4145658..7aa5da2ede48f4 100644 --- a/deps/npm/man/man7/orgs.7 +++ b/deps/npm/man/man7/orgs.7 @@ -1,4 +1,4 @@ -.TH "ORGS" "7" "January 2023" "" "" +.TH "ORGS" "7" "February 2023" "" "" .SH "NAME" \fBorgs\fR - Working with Teams & Orgs .SS "Description" diff --git a/deps/npm/man/man7/package-spec.7 b/deps/npm/man/man7/package-spec.7 index 9c376719ce9c53..4ae0095bd13b25 100644 --- a/deps/npm/man/man7/package-spec.7 +++ b/deps/npm/man/man7/package-spec.7 @@ -1,4 +1,4 @@ -.TH "PACKAGE-SPEC" "7" "January 2023" "" "" +.TH "PACKAGE-SPEC" "7" "February 2023" "" "" .SH "NAME" \fBpackage-spec\fR - Package name specifier .SS "Description" diff --git a/deps/npm/man/man7/registry.7 b/deps/npm/man/man7/registry.7 index da418a424014e8..e67c8bb2b01158 100644 --- a/deps/npm/man/man7/registry.7 +++ b/deps/npm/man/man7/registry.7 @@ -1,4 +1,4 @@ -.TH "REGISTRY" "7" "January 2023" "" "" +.TH "REGISTRY" "7" "February 2023" "" "" .SH "NAME" \fBregistry\fR - The JavaScript Package Registry .SS "Description" diff --git a/deps/npm/man/man7/removal.7 b/deps/npm/man/man7/removal.7 index aea330f2f6260e..82e39c8cb1acc3 100644 --- a/deps/npm/man/man7/removal.7 +++ b/deps/npm/man/man7/removal.7 @@ -1,4 +1,4 @@ -.TH "REMOVAL" "7" "January 2023" "" "" +.TH "REMOVAL" "7" "February 2023" "" "" .SH "NAME" \fBremoval\fR - Cleaning the Slate .SS "Synopsis" diff --git a/deps/npm/man/man7/scope.7 b/deps/npm/man/man7/scope.7 index 9b892290e9b5cd..670b2f88c82116 100644 --- a/deps/npm/man/man7/scope.7 +++ b/deps/npm/man/man7/scope.7 @@ -1,4 +1,4 @@ -.TH "SCOPE" "7" "January 2023" "" "" +.TH "SCOPE" "7" "February 2023" "" "" .SH "NAME" \fBscope\fR - Scoped packages .SS "Description" diff --git a/deps/npm/man/man7/scripts.7 b/deps/npm/man/man7/scripts.7 index 443d9430e76016..5f0ee7735d6a22 100644 --- a/deps/npm/man/man7/scripts.7 +++ b/deps/npm/man/man7/scripts.7 @@ -1,4 +1,4 @@ -.TH "SCRIPTS" "7" "January 2023" "" "" +.TH "SCRIPTS" "7" "February 2023" "" "" .SH "NAME" \fBscripts\fR - How npm handles the "scripts" field .SS "Description" diff --git a/deps/npm/man/man7/workspaces.7 b/deps/npm/man/man7/workspaces.7 index e0ec139dd3429c..6e1e9bf59e08f2 100644 --- a/deps/npm/man/man7/workspaces.7 +++ b/deps/npm/man/man7/workspaces.7 @@ -1,4 +1,4 @@ -.TH "WORKSPACES" "7" "January 2023" "" "" +.TH "WORKSPACES" "7" "February 2023" "" "" .SH "NAME" \fBworkspaces\fR - Working with workspaces .SS "Description" diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js index 3c8059d281d136..87993cca876d66 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js @@ -82,7 +82,6 @@ const _rollbackRetireShallowNodes = Symbol.for('rollbackRetireShallowNodes') const _rollbackCreateSparseTree = Symbol.for('rollbackCreateSparseTree') const _rollbackMoveBackRetiredUnchanged = Symbol.for('rollbackMoveBackRetiredUnchanged') const _saveIdealTree = Symbol.for('saveIdealTree') -const _saveLockFile = Symbol('saveLockFile') const _copyIdealToActual = Symbol('copyIdealToActual') const _addOmitsToTrashList = Symbol('addOmitsToTrashList') const _packageLockOnly = Symbol('packageLockOnly') @@ -1404,64 +1403,53 @@ module.exports = cls => class Reifier extends cls { } } - // preserve indentation, if possible - const { - [Symbol.for('indent')]: indent, - } = this.idealTree.package - const format = indent === undefined ? ' ' : indent - - const saveOpt = { - format: (this[_formatPackageLock] && format) ? format - : this[_formatPackageLock], - } - - const promises = [this[_saveLockFile](saveOpt)] - - const updatePackageJson = async (tree) => { - const pkgJson = await PackageJson.load(tree.path) - .catch(() => new PackageJson(tree.path)) - const { - dependencies = {}, - devDependencies = {}, - optionalDependencies = {}, - peerDependencies = {}, - // bundleDependencies is not required by PackageJson like the other fields here - // PackageJson also doesn't omit an empty array for this field so defaulting this - // to an empty array would add that field to every package.json file. - bundleDependencies, - } = tree.package - - pkgJson.update({ - dependencies, - devDependencies, - optionalDependencies, - peerDependencies, - bundleDependencies, - }) - await pkgJson.save() - } - if (save) { for (const tree of updatedTrees) { // refresh the edges so they have the correct specs tree.package = tree.package - promises.push(updatePackageJson(tree)) + const pkgJson = await PackageJson.load(tree.path) + .catch(() => new PackageJson(tree.path)) + const { + dependencies = {}, + devDependencies = {}, + optionalDependencies = {}, + peerDependencies = {}, + // bundleDependencies is not required by PackageJson like the other + // fields here PackageJson also doesn't omit an empty array for this + // field so defaulting this to an empty array would add that field to + // every package.json file. + bundleDependencies, + } = tree.package + + pkgJson.update({ + dependencies, + devDependencies, + optionalDependencies, + peerDependencies, + bundleDependencies, + }) + await pkgJson.save() } } - await Promise.all(promises) - process.emit('timeEnd', 'reify:save') - return true - } + // before now edge specs could be changing, affecting the `requires` field + // in the package lock, so we hold off saving to the very last action + if (this[_usePackageLock]) { + // preserve indentation, if possible + let format = this.idealTree.package[Symbol.for('indent')] + if (format === undefined) { + format = ' ' + } - async [_saveLockFile] (saveOpt) { - if (!this[_usePackageLock]) { - return + // TODO this ignores options.save + await this.idealTree.meta.save({ + format: (this[_formatPackageLock] && format) ? format + : this[_formatPackageLock], + }) } - const { meta } = this.idealTree - - return meta.save(saveOpt) + process.emit('timeEnd', 'reify:save') + return true } async [_copyIdealToActual] () { diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json index 735dd41a2ef50d..f27b1458d8d59c 100644 --- a/deps/npm/node_modules/@npmcli/arborist/package.json +++ b/deps/npm/node_modules/@npmcli/arborist/package.json @@ -1,37 +1,37 @@ { "name": "@npmcli/arborist", - "version": "6.2.0", + "version": "6.2.2", "description": "Manage node_modules trees", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/fs": "^3.1.0", "@npmcli/installed-package-contents": "^2.0.0", - "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/map-workspaces": "^3.0.2", "@npmcli/metavuln-calculator": "^5.0.0", - "@npmcli/name-from-folder": "^1.0.1", + "@npmcli/name-from-folder": "^2.0.0", "@npmcli/node-gyp": "^3.0.0", "@npmcli/package-json": "^3.0.0", "@npmcli/query": "^3.0.0", "@npmcli/run-script": "^6.0.0", "bin-links": "^4.0.1", - "cacache": "^17.0.3", + "cacache": "^17.0.4", "common-ancestor-path": "^1.0.1", "hosted-git-info": "^6.1.1", "json-parse-even-better-errors": "^3.0.0", "json-stringify-nice": "^1.1.4", - "minimatch": "^5.1.1", + "minimatch": "^6.1.6", "nopt": "^7.0.0", "npm-install-checks": "^6.0.0", "npm-package-arg": "^10.1.0", "npm-pick-manifest": "^8.0.1", "npm-registry-fetch": "^14.0.3", "npmlog": "^7.0.1", - "pacote": "^15.0.7", + "pacote": "^15.0.8", "parse-conflict-json": "^3.0.0", "proc-log": "^3.0.0", "promise-all-reject-late": "^1.0.0", "promise-call-limit": "^1.0.1", - "read-package-json-fast": "^3.0.1", + "read-package-json-fast": "^3.0.2", "semver": "^7.3.7", "ssri": "^10.0.1", "treeverse": "^3.0.0", @@ -39,28 +39,24 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.11.1", + "@npmcli/template-oss": "4.11.4", "benchmark": "^2.1.4", "chalk": "^4.1.0", "minify-registry-metadata": "^3.0.0", - "nock": "^13.2.0", - "tap": "^16.3.2", + "nock": "^13.3.0", + "tap": "^16.3.4", "tar-stream": "^3.0.0", "tcompare": "^5.0.6" }, "scripts": { "test": "tap", - "test-only": "tap --only", "posttest": "node ../.. run lint", "snap": "tap", - "postsnap": "npm run lintfix", "test-proxy": "ARBORIST_TEST_PROXY=1 tap --snapshot", - "eslint": "eslint", "lint": "eslint \"**/*.js\"", "lintfix": "node ../.. run lint -- --fix", "benchmark": "node scripts/benchmark.js", "benchclean": "rm -rf scripts/benchmark/*/", - "npmclilint": "npmcli-lint", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force" }, @@ -102,7 +98,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1", + "version": "4.11.4", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/@npmcli/config/lib/index.js b/deps/npm/node_modules/@npmcli/config/lib/index.js index 1ddf2678391959..6520e5616ff41c 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/index.js +++ b/deps/npm/node_modules/@npmcli/config/lib/index.js @@ -482,8 +482,9 @@ class Config { if (problem.action === 'delete') { this.delete(problem.key, problem.where) } else if (problem.action === 'rename') { - const old = this.get(problem.from, problem.where) - this.set(problem.to, old, problem.where) + const raw = this.data.get(problem.where).raw?.[problem.from] + const calculated = this.get(problem.from, problem.where) + this.set(problem.to, raw || calculated, problem.where) this.delete(problem.from, problem.where) } } diff --git a/deps/npm/node_modules/@npmcli/config/package.json b/deps/npm/node_modules/@npmcli/config/package.json index 11835648ea061c..38c063e358beb1 100644 --- a/deps/npm/node_modules/@npmcli/config/package.json +++ b/deps/npm/node_modules/@npmcli/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "6.1.1", + "version": "6.1.3", "files": [ "bin/", "lib/" @@ -33,15 +33,15 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.11.1", - "tap": "^16.3.2" + "@npmcli/template-oss": "4.11.4", + "tap": "^16.3.4" }, "dependencies": { - "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/map-workspaces": "^3.0.2", "ini": "^3.0.0", "nopt": "^7.0.0", "proc-log": "^3.0.0", - "read-package-json-fast": "^3.0.0", + "read-package-json-fast": "^3.0.2", "semver": "^7.3.5", "walk-up-path": "^1.0.0" }, @@ -50,6 +50,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1" + "version": "4.11.4" } } diff --git a/deps/npm/node_modules/@npmcli/map-workspaces/package.json b/deps/npm/node_modules/@npmcli/map-workspaces/package.json index c8113cb25eb32b..3f5270360c5fc0 100644 --- a/deps/npm/node_modules/@npmcli/map-workspaces/package.json +++ b/deps/npm/node_modules/@npmcli/map-workspaces/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/map-workspaces", - "version": "3.0.0", + "version": "3.0.2", "main": "lib/index.js", "files": [ "bin/", @@ -42,18 +42,18 @@ ] }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.5.1", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.11.3", "tap": "^16.0.1" }, "dependencies": { - "@npmcli/name-from-folder": "^1.0.1", + "@npmcli/name-from-folder": "^2.0.0", "glob": "^8.0.1", - "minimatch": "^5.0.1", + "minimatch": "^6.1.6", "read-package-json-fast": "^3.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.1" + "version": "4.11.3" } } diff --git a/deps/npm/node_modules/node-gyp/node_modules/@npmcli/move-file/LICENSE.md b/deps/npm/node_modules/@npmcli/move-file/LICENSE.md similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/@npmcli/move-file/LICENSE.md rename to deps/npm/node_modules/@npmcli/move-file/LICENSE.md diff --git a/deps/npm/node_modules/node-gyp/node_modules/@npmcli/move-file/lib/index.js b/deps/npm/node_modules/@npmcli/move-file/lib/index.js similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/@npmcli/move-file/lib/index.js rename to deps/npm/node_modules/@npmcli/move-file/lib/index.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/@npmcli/move-file/package.json b/deps/npm/node_modules/@npmcli/move-file/package.json similarity index 100% rename from deps/npm/node_modules/node-gyp/node_modules/@npmcli/move-file/package.json rename to deps/npm/node_modules/@npmcli/move-file/package.json diff --git a/deps/npm/node_modules/@npmcli/name-from-folder/index.js b/deps/npm/node_modules/@npmcli/name-from-folder/lib/index.js similarity index 100% rename from deps/npm/node_modules/@npmcli/name-from-folder/index.js rename to deps/npm/node_modules/@npmcli/name-from-folder/lib/index.js diff --git a/deps/npm/node_modules/@npmcli/name-from-folder/package.json b/deps/npm/node_modules/@npmcli/name-from-folder/package.json index 9569b4e66e90c9..f0aa5b16dba1aa 100644 --- a/deps/npm/node_modules/@npmcli/name-from-folder/package.json +++ b/deps/npm/node_modules/@npmcli/name-from-folder/package.json @@ -1,27 +1,43 @@ { "name": "@npmcli/name-from-folder", - "version": "1.0.1", + "version": "2.0.0", "files": [ - "index.js" + "bin/", + "lib/" ], + "main": "lib/index.js", "description": "Get the package name from a folder path", "repository": { "type": "git", - "url": "git+https://github.com/npm/name-from-folder" + "url": "https://github.com/npm/name-from-folder.git" }, - "author": "Isaac Z. Schlueter (https://izs.me)", + "author": "GitHub Inc.", "license": "ISC", "scripts": { "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "tap": { - "check-coverage": true + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "posttest": "npm run lint" }, "devDependencies": { - "tap": "^14.10.7" + "@npmcli/eslint-config": "^4.0.1", + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "4.11.0" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/deps/npm/node_modules/@npmcli/promise-spawn/lib/index.js b/deps/npm/node_modules/@npmcli/promise-spawn/lib/index.js index 1d422045d558c1..571ff6b9169c9b 100644 --- a/deps/npm/node_modules/@npmcli/promise-spawn/lib/index.js +++ b/deps/npm/node_modules/@npmcli/promise-spawn/lib/index.js @@ -131,7 +131,7 @@ const open = (_args, opts = {}, extra = {}) => { let platform = process.platform // process.platform === 'linux' may actually indicate WSL, if that's the case // we want to treat things as win32 anyway so the host can open the argument - if (platform === 'linux' && os.release().includes('Microsoft')) { + if (platform === 'linux' && os.release().toLowerCase().includes('microsoft')) { platform = 'win32' } diff --git a/deps/npm/node_modules/@npmcli/promise-spawn/package.json b/deps/npm/node_modules/@npmcli/promise-spawn/package.json index c21e84fe835997..2080d9f5be9f04 100644 --- a/deps/npm/node_modules/@npmcli/promise-spawn/package.json +++ b/deps/npm/node_modules/@npmcli/promise-spawn/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/promise-spawn", - "version": "6.0.1", + "version": "6.0.2", "files": [ "bin/", "lib/" @@ -32,8 +32,8 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.8.0", - "minipass": "^3.1.1", + "@npmcli/template-oss": "4.11.0", + "minipass": "^4.0.0", "spawk": "^1.7.1", "tap": "^16.0.1" }, @@ -42,7 +42,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.8.0" + "version": "4.11.0" }, "dependencies": { "which": "^3.0.0" diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 105eebbd1c6af8..00000000000000 --- a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' // Keep this file as an alias for the full stream module. - -module.exports = require('./stream').Duplex diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 31358e6d129574..00000000000000 --- a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' // Keep this file as an alias for the full stream module. - -module.exports = require('./stream').PassThrough diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index abd53db4ca77d7..00000000000000 --- a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' // Keep this file as an alias for the full stream module. - -module.exports = require('./stream').Readable diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 98ea338248e0a6..00000000000000 --- a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' // Keep this file as an alias for the full stream module. - -module.exports = require('./stream').Transform diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 07204c42954708..00000000000000 --- a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' // Keep this file as an alias for the full stream module. - -module.exports = require('./stream').Writable diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/buffer_list.js deleted file mode 100644 index e22914f0edca0c..00000000000000 --- a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/buffer_list.js +++ /dev/null @@ -1,180 +0,0 @@ -'use strict' - -const { StringPrototypeSlice, SymbolIterator, TypedArrayPrototypeSet, Uint8Array } = require('../../ours/primordials') - -const { Buffer } = require('buffer') - -const { inspect } = require('../../ours/util') - -module.exports = class BufferList { - constructor() { - this.head = null - this.tail = null - this.length = 0 - } - - push(v) { - const entry = { - data: v, - next: null - } - if (this.length > 0) this.tail.next = entry - else this.head = entry - this.tail = entry - ++this.length - } - - unshift(v) { - const entry = { - data: v, - next: this.head - } - if (this.length === 0) this.tail = entry - this.head = entry - ++this.length - } - - shift() { - if (this.length === 0) return - const ret = this.head.data - if (this.length === 1) this.head = this.tail = null - else this.head = this.head.next - --this.length - return ret - } - - clear() { - this.head = this.tail = null - this.length = 0 - } - - join(s) { - if (this.length === 0) return '' - let p = this.head - let ret = '' + p.data - - while ((p = p.next) !== null) ret += s + p.data - - return ret - } - - concat(n) { - if (this.length === 0) return Buffer.alloc(0) - const ret = Buffer.allocUnsafe(n >>> 0) - let p = this.head - let i = 0 - - while (p) { - TypedArrayPrototypeSet(ret, p.data, i) - i += p.data.length - p = p.next - } - - return ret - } // Consumes a specified amount of bytes or characters from the buffered data. - - consume(n, hasStrings) { - const data = this.head.data - - if (n < data.length) { - // `slice` is the same for buffers and strings. - const slice = data.slice(0, n) - this.head.data = data.slice(n) - return slice - } - - if (n === data.length) { - // First chunk is a perfect match. - return this.shift() - } // Result spans more than one buffer. - - return hasStrings ? this._getString(n) : this._getBuffer(n) - } - - first() { - return this.head.data - } - - *[SymbolIterator]() { - for (let p = this.head; p; p = p.next) { - yield p.data - } - } // Consumes a specified amount of characters from the buffered data. - - _getString(n) { - let ret = '' - let p = this.head - let c = 0 - - do { - const str = p.data - - if (n > str.length) { - ret += str - n -= str.length - } else { - if (n === str.length) { - ret += str - ++c - if (p.next) this.head = p.next - else this.head = this.tail = null - } else { - ret += StringPrototypeSlice(str, 0, n) - this.head = p - p.data = StringPrototypeSlice(str, n) - } - - break - } - - ++c - } while ((p = p.next) !== null) - - this.length -= c - return ret - } // Consumes a specified amount of bytes from the buffered data. - - _getBuffer(n) { - const ret = Buffer.allocUnsafe(n) - const retLen = n - let p = this.head - let c = 0 - - do { - const buf = p.data - - if (n > buf.length) { - TypedArrayPrototypeSet(ret, buf, retLen - n) - n -= buf.length - } else { - if (n === buf.length) { - TypedArrayPrototypeSet(ret, buf, retLen - n) - ++c - if (p.next) this.head = p.next - else this.head = this.tail = null - } else { - TypedArrayPrototypeSet(ret, new Uint8Array(buf.buffer, buf.byteOffset, n), retLen - n) - this.head = p - p.data = buf.slice(n) - } - - break - } - - ++c - } while ((p = p.next) !== null) - - this.length -= c - return ret - } // Make sure the linked list only shows the minimal necessary information. - - [Symbol.for('nodejs.util.inspect.custom')](_, options) { - return inspect(this, { - ...options, - // Only inspect one level. - depth: 0, - // It should not recurse. - customInspect: false - }) - } -} diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index e04306f0b1904e..00000000000000 --- a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,337 +0,0 @@ -'use strict' - -/* replacement start */ - -const process = require('process') -/* replacement end */ - -const { - aggregateTwoErrors, - codes: { ERR_MULTIPLE_CALLBACK }, - AbortError -} = require('../../ours/errors') - -const { Symbol } = require('../../ours/primordials') - -const { kDestroyed, isDestroyed, isFinished, isServerRequest } = require('./utils') - -const kDestroy = Symbol('kDestroy') -const kConstruct = Symbol('kConstruct') - -function checkError(err, w, r) { - if (err) { - // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 - err.stack // eslint-disable-line no-unused-expressions - - if (w && !w.errored) { - w.errored = err - } - - if (r && !r.errored) { - r.errored = err - } - } -} // Backwards compat. cb() is undocumented and unused in core but -// unfortunately might be used by modules. - -function destroy(err, cb) { - const r = this._readableState - const w = this._writableState // With duplex streams we use the writable side for state. - - const s = w || r - - if ((w && w.destroyed) || (r && r.destroyed)) { - if (typeof cb === 'function') { - cb() - } - - return this - } // We set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - checkError(err, w, r) - - if (w) { - w.destroyed = true - } - - if (r) { - r.destroyed = true - } // If still constructing then defer calling _destroy. - - if (!s.constructed) { - this.once(kDestroy, function (er) { - _destroy(this, aggregateTwoErrors(er, err), cb) - }) - } else { - _destroy(this, err, cb) - } - - return this -} - -function _destroy(self, err, cb) { - let called = false - - function onDestroy(err) { - if (called) { - return - } - - called = true - const r = self._readableState - const w = self._writableState - checkError(err, w, r) - - if (w) { - w.closed = true - } - - if (r) { - r.closed = true - } - - if (typeof cb === 'function') { - cb(err) - } - - if (err) { - process.nextTick(emitErrorCloseNT, self, err) - } else { - process.nextTick(emitCloseNT, self) - } - } - - try { - self._destroy(err || null, onDestroy) - } catch (err) { - onDestroy(err) - } -} - -function emitErrorCloseNT(self, err) { - emitErrorNT(self, err) - emitCloseNT(self) -} - -function emitCloseNT(self) { - const r = self._readableState - const w = self._writableState - - if (w) { - w.closeEmitted = true - } - - if (r) { - r.closeEmitted = true - } - - if ((w && w.emitClose) || (r && r.emitClose)) { - self.emit('close') - } -} - -function emitErrorNT(self, err) { - const r = self._readableState - const w = self._writableState - - if ((w && w.errorEmitted) || (r && r.errorEmitted)) { - return - } - - if (w) { - w.errorEmitted = true - } - - if (r) { - r.errorEmitted = true - } - - self.emit('error', err) -} - -function undestroy() { - const r = this._readableState - const w = this._writableState - - if (r) { - r.constructed = true - r.closed = false - r.closeEmitted = false - r.destroyed = false - r.errored = null - r.errorEmitted = false - r.reading = false - r.ended = r.readable === false - r.endEmitted = r.readable === false - } - - if (w) { - w.constructed = true - w.destroyed = false - w.closed = false - w.closeEmitted = false - w.errored = null - w.errorEmitted = false - w.finalCalled = false - w.prefinished = false - w.ended = w.writable === false - w.ending = w.writable === false - w.finished = w.writable === false - } -} - -function errorOrDestroy(stream, err, sync) { - // We have tests that rely on errors being emitted - // in the same tick, so changing this is semver major. - // For now when you opt-in to autoDestroy we allow - // the error to be emitted nextTick. In a future - // semver major update we should change the default to this. - const r = stream._readableState - const w = stream._writableState - - if ((w && w.destroyed) || (r && r.destroyed)) { - return this - } - - if ((r && r.autoDestroy) || (w && w.autoDestroy)) stream.destroy(err) - else if (err) { - // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 - err.stack // eslint-disable-line no-unused-expressions - - if (w && !w.errored) { - w.errored = err - } - - if (r && !r.errored) { - r.errored = err - } - - if (sync) { - process.nextTick(emitErrorNT, stream, err) - } else { - emitErrorNT(stream, err) - } - } -} - -function construct(stream, cb) { - if (typeof stream._construct !== 'function') { - return - } - - const r = stream._readableState - const w = stream._writableState - - if (r) { - r.constructed = false - } - - if (w) { - w.constructed = false - } - - stream.once(kConstruct, cb) - - if (stream.listenerCount(kConstruct) > 1) { - // Duplex - return - } - - process.nextTick(constructNT, stream) -} - -function constructNT(stream) { - let called = false - - function onConstruct(err) { - if (called) { - errorOrDestroy(stream, err !== null && err !== undefined ? err : new ERR_MULTIPLE_CALLBACK()) - return - } - - called = true - const r = stream._readableState - const w = stream._writableState - const s = w || r - - if (r) { - r.constructed = true - } - - if (w) { - w.constructed = true - } - - if (s.destroyed) { - stream.emit(kDestroy, err) - } else if (err) { - errorOrDestroy(stream, err, true) - } else { - process.nextTick(emitConstructNT, stream) - } - } - - try { - stream._construct(onConstruct) - } catch (err) { - onConstruct(err) - } -} - -function emitConstructNT(stream) { - stream.emit(kConstruct) -} - -function isRequest(stream) { - return stream && stream.setHeader && typeof stream.abort === 'function' -} - -function emitCloseLegacy(stream) { - stream.emit('close') -} - -function emitErrorCloseLegacy(stream, err) { - stream.emit('error', err) - process.nextTick(emitCloseLegacy, stream) -} // Normalize destroy for legacy. - -function destroyer(stream, err) { - if (!stream || isDestroyed(stream)) { - return - } - - if (!err && !isFinished(stream)) { - err = new AbortError() - } // TODO: Remove isRequest branches. - - if (isServerRequest(stream)) { - stream.socket = null - stream.destroy(err) - } else if (isRequest(stream)) { - stream.abort() - } else if (isRequest(stream.req)) { - stream.req.abort() - } else if (typeof stream.destroy === 'function') { - stream.destroy(err) - } else if (typeof stream.close === 'function') { - // TODO: Don't lose err? - stream.close() - } else if (err) { - process.nextTick(emitErrorCloseLegacy, stream, err) - } else { - process.nextTick(emitCloseLegacy, stream) - } - - if (!stream.destroyed) { - stream[kDestroyed] = true - } -} - -module.exports = { - construct, - destroyer, - destroy, - undestroy, - errorOrDestroy -} diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/end-of-stream.js deleted file mode 100644 index acc13be7d26425..00000000000000 --- a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +++ /dev/null @@ -1,262 +0,0 @@ -/* replacement start */ -const process = require('process') -/* replacement end */ -// Ported from https://github.com/mafintosh/end-of-stream with -// permission from the author, Mathias Buus (@mafintosh). - -;('use strict') - -const { AbortError, codes } = require('../../ours/errors') - -const { ERR_INVALID_ARG_TYPE, ERR_STREAM_PREMATURE_CLOSE } = codes - -const { kEmptyObject, once } = require('../../ours/util') - -const { validateAbortSignal, validateFunction, validateObject } = require('../validators') - -const { Promise } = require('../../ours/primordials') - -const { - isClosed, - isReadable, - isReadableNodeStream, - isReadableFinished, - isReadableErrored, - isWritable, - isWritableNodeStream, - isWritableFinished, - isWritableErrored, - isNodeStream, - willEmitClose: _willEmitClose -} = require('./utils') - -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function' -} - -const nop = () => {} - -function eos(stream, options, callback) { - var _options$readable, _options$writable - - if (arguments.length === 2) { - callback = options - options = kEmptyObject - } else if (options == null) { - options = kEmptyObject - } else { - validateObject(options, 'options') - } - - validateFunction(callback, 'callback') - validateAbortSignal(options.signal, 'options.signal') - callback = once(callback) - const readable = - (_options$readable = options.readable) !== null && _options$readable !== undefined - ? _options$readable - : isReadableNodeStream(stream) - const writable = - (_options$writable = options.writable) !== null && _options$writable !== undefined - ? _options$writable - : isWritableNodeStream(stream) - - if (!isNodeStream(stream)) { - // TODO: Webstreams. - throw new ERR_INVALID_ARG_TYPE('stream', 'Stream', stream) - } - - const wState = stream._writableState - const rState = stream._readableState - - const onlegacyfinish = () => { - if (!stream.writable) { - onfinish() - } - } // TODO (ronag): Improve soft detection to include core modules and - // common ecosystem modules that do properly emit 'close' but fail - // this generic check. - - let willEmitClose = - _willEmitClose(stream) && isReadableNodeStream(stream) === readable && isWritableNodeStream(stream) === writable - let writableFinished = isWritableFinished(stream, false) - - const onfinish = () => { - writableFinished = true // Stream should not be destroyed here. If it is that - // means that user space is doing something differently and - // we cannot trust willEmitClose. - - if (stream.destroyed) { - willEmitClose = false - } - - if (willEmitClose && (!stream.readable || readable)) { - return - } - - if (!readable || readableFinished) { - callback.call(stream) - } - } - - let readableFinished = isReadableFinished(stream, false) - - const onend = () => { - readableFinished = true // Stream should not be destroyed here. If it is that - // means that user space is doing something differently and - // we cannot trust willEmitClose. - - if (stream.destroyed) { - willEmitClose = false - } - - if (willEmitClose && (!stream.writable || writable)) { - return - } - - if (!writable || writableFinished) { - callback.call(stream) - } - } - - const onerror = (err) => { - callback.call(stream, err) - } - - let closed = isClosed(stream) - - const onclose = () => { - closed = true - const errored = isWritableErrored(stream) || isReadableErrored(stream) - - if (errored && typeof errored !== 'boolean') { - return callback.call(stream, errored) - } - - if (readable && !readableFinished && isReadableNodeStream(stream, true)) { - if (!isReadableFinished(stream, false)) return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()) - } - - if (writable && !writableFinished) { - if (!isWritableFinished(stream, false)) return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()) - } - - callback.call(stream) - } - - const onrequest = () => { - stream.req.on('finish', onfinish) - } - - if (isRequest(stream)) { - stream.on('complete', onfinish) - - if (!willEmitClose) { - stream.on('abort', onclose) - } - - if (stream.req) { - onrequest() - } else { - stream.on('request', onrequest) - } - } else if (writable && !wState) { - // legacy streams - stream.on('end', onlegacyfinish) - stream.on('close', onlegacyfinish) - } // Not all streams will emit 'close' after 'aborted'. - - if (!willEmitClose && typeof stream.aborted === 'boolean') { - stream.on('aborted', onclose) - } - - stream.on('end', onend) - stream.on('finish', onfinish) - - if (options.error !== false) { - stream.on('error', onerror) - } - - stream.on('close', onclose) - - if (closed) { - process.nextTick(onclose) - } else if ( - (wState !== null && wState !== undefined && wState.errorEmitted) || - (rState !== null && rState !== undefined && rState.errorEmitted) - ) { - if (!willEmitClose) { - process.nextTick(onclose) - } - } else if ( - !readable && - (!willEmitClose || isReadable(stream)) && - (writableFinished || isWritable(stream) === false) - ) { - process.nextTick(onclose) - } else if ( - !writable && - (!willEmitClose || isWritable(stream)) && - (readableFinished || isReadable(stream) === false) - ) { - process.nextTick(onclose) - } else if (rState && stream.req && stream.aborted) { - process.nextTick(onclose) - } - - const cleanup = () => { - callback = nop - stream.removeListener('aborted', onclose) - stream.removeListener('complete', onfinish) - stream.removeListener('abort', onclose) - stream.removeListener('request', onrequest) - if (stream.req) stream.req.removeListener('finish', onfinish) - stream.removeListener('end', onlegacyfinish) - stream.removeListener('close', onlegacyfinish) - stream.removeListener('finish', onfinish) - stream.removeListener('end', onend) - stream.removeListener('error', onerror) - stream.removeListener('close', onclose) - } - - if (options.signal && !closed) { - const abort = () => { - // Keep it because cleanup removes it. - const endCallback = callback - cleanup() - endCallback.call( - stream, - new AbortError(undefined, { - cause: options.signal.reason - }) - ) - } - - if (options.signal.aborted) { - process.nextTick(abort) - } else { - const originalCallback = callback - callback = once((...args) => { - options.signal.removeEventListener('abort', abort) - originalCallback.apply(stream, args) - }) - options.signal.addEventListener('abort', abort) - } - } - - return cleanup -} - -function finished(stream, opts) { - return new Promise((resolve, reject) => { - eos(stream, opts, (err) => { - if (err) { - reject(err) - } else { - resolve() - } - }) - }) -} - -module.exports = eos -module.exports.finished = finished diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/from.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/from.js deleted file mode 100644 index 89ce1a8bec79d6..00000000000000 --- a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/from.js +++ /dev/null @@ -1,115 +0,0 @@ -'use strict' - -/* replacement start */ - -const process = require('process') -/* replacement end */ - -const { PromisePrototypeThen, SymbolAsyncIterator, SymbolIterator } = require('../../ours/primordials') - -const { Buffer } = require('buffer') - -const { ERR_INVALID_ARG_TYPE, ERR_STREAM_NULL_VALUES } = require('../../ours/errors').codes - -function from(Readable, iterable, opts) { - let iterator - - if (typeof iterable === 'string' || iterable instanceof Buffer) { - return new Readable({ - objectMode: true, - ...opts, - - read() { - this.push(iterable) - this.push(null) - } - }) - } - - let isAsync - - if (iterable && iterable[SymbolAsyncIterator]) { - isAsync = true - iterator = iterable[SymbolAsyncIterator]() - } else if (iterable && iterable[SymbolIterator]) { - isAsync = false - iterator = iterable[SymbolIterator]() - } else { - throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable) - } - - const readable = new Readable({ - objectMode: true, - highWaterMark: 1, - // TODO(ronag): What options should be allowed? - ...opts - }) // Flag to protect against _read - // being called before last iteration completion. - - let reading = false - - readable._read = function () { - if (!reading) { - reading = true - next() - } - } - - readable._destroy = function (error, cb) { - PromisePrototypeThen( - close(error), - () => process.nextTick(cb, error), // nextTick is here in case cb throws - (e) => process.nextTick(cb, e || error) - ) - } - - async function close(error) { - const hadError = error !== undefined && error !== null - const hasThrow = typeof iterator.throw === 'function' - - if (hadError && hasThrow) { - const { value, done } = await iterator.throw(error) - await value - - if (done) { - return - } - } - - if (typeof iterator.return === 'function') { - const { value } = await iterator.return() - await value - } - } - - async function next() { - for (;;) { - try { - const { value, done } = isAsync ? await iterator.next() : iterator.next() - - if (done) { - readable.push(null) - } else { - const res = value && typeof value.then === 'function' ? await value : value - - if (res === null) { - reading = false - throw new ERR_STREAM_NULL_VALUES() - } else if (readable.push(res)) { - continue - } else { - reading = false - } - } - } catch (err) { - readable.destroy(err) - } - - break - } - } - - return readable -} - -module.exports = from diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/pipeline.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/pipeline.js deleted file mode 100644 index c170b48327eee6..00000000000000 --- a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/pipeline.js +++ /dev/null @@ -1,434 +0,0 @@ -/* replacement start */ -const process = require('process') -/* replacement end */ -// Ported from https://github.com/mafintosh/pump with -// permission from the author, Mathias Buus (@mafintosh). - -;('use strict') - -const { ArrayIsArray, Promise, SymbolAsyncIterator } = require('../../ours/primordials') - -const eos = require('./end-of-stream') - -const { once } = require('../../ours/util') - -const destroyImpl = require('./destroy') - -const Duplex = require('./duplex') - -const { - aggregateTwoErrors, - codes: { - ERR_INVALID_ARG_TYPE, - ERR_INVALID_RETURN_VALUE, - ERR_MISSING_ARGS, - ERR_STREAM_DESTROYED, - ERR_STREAM_PREMATURE_CLOSE - }, - AbortError -} = require('../../ours/errors') - -const { validateFunction, validateAbortSignal } = require('../validators') - -const { isIterable, isReadable, isReadableNodeStream, isNodeStream } = require('./utils') - -const AbortController = globalThis.AbortController || require('abort-controller').AbortController - -let PassThrough -let Readable - -function destroyer(stream, reading, writing) { - let finished = false - stream.on('close', () => { - finished = true - }) - const cleanup = eos( - stream, - { - readable: reading, - writable: writing - }, - (err) => { - finished = !err - } - ) - return { - destroy: (err) => { - if (finished) return - finished = true - destroyImpl.destroyer(stream, err || new ERR_STREAM_DESTROYED('pipe')) - }, - cleanup - } -} - -function popCallback(streams) { - // Streams should never be an empty array. It should always contain at least - // a single stream. Therefore optimize for the average case instead of - // checking for length === 0 as well. - validateFunction(streams[streams.length - 1], 'streams[stream.length - 1]') - return streams.pop() -} - -function makeAsyncIterable(val) { - if (isIterable(val)) { - return val - } else if (isReadableNodeStream(val)) { - // Legacy streams are not Iterable. - return fromReadable(val) - } - - throw new ERR_INVALID_ARG_TYPE('val', ['Readable', 'Iterable', 'AsyncIterable'], val) -} - -async function* fromReadable(val) { - if (!Readable) { - Readable = require('./readable') - } - - yield* Readable.prototype[SymbolAsyncIterator].call(val) -} - -async function pump(iterable, writable, finish, { end }) { - let error - let onresolve = null - - const resume = (err) => { - if (err) { - error = err - } - - if (onresolve) { - const callback = onresolve - onresolve = null - callback() - } - } - - const wait = () => - new Promise((resolve, reject) => { - if (error) { - reject(error) - } else { - onresolve = () => { - if (error) { - reject(error) - } else { - resolve() - } - } - } - }) - - writable.on('drain', resume) - const cleanup = eos( - writable, - { - readable: false - }, - resume - ) - - try { - if (writable.writableNeedDrain) { - await wait() - } - - for await (const chunk of iterable) { - if (!writable.write(chunk)) { - await wait() - } - } - - if (end) { - writable.end() - } - - await wait() - finish() - } catch (err) { - finish(error !== err ? aggregateTwoErrors(error, err) : err) - } finally { - cleanup() - writable.off('drain', resume) - } -} - -function pipeline(...streams) { - return pipelineImpl(streams, once(popCallback(streams))) -} - -function pipelineImpl(streams, callback, opts) { - if (streams.length === 1 && ArrayIsArray(streams[0])) { - streams = streams[0] - } - - if (streams.length < 2) { - throw new ERR_MISSING_ARGS('streams') - } - - const ac = new AbortController() - const signal = ac.signal - const outerSignal = opts === null || opts === undefined ? undefined : opts.signal // Need to cleanup event listeners if last stream is readable - // https://github.com/nodejs/node/issues/35452 - - const lastStreamCleanup = [] - validateAbortSignal(outerSignal, 'options.signal') - - function abort() { - finishImpl(new AbortError()) - } - - outerSignal === null || outerSignal === undefined ? undefined : outerSignal.addEventListener('abort', abort) - let error - let value - const destroys = [] - let finishCount = 0 - - function finish(err) { - finishImpl(err, --finishCount === 0) - } - - function finishImpl(err, final) { - if (err && (!error || error.code === 'ERR_STREAM_PREMATURE_CLOSE')) { - error = err - } - - if (!error && !final) { - return - } - - while (destroys.length) { - destroys.shift()(error) - } - - outerSignal === null || outerSignal === undefined ? undefined : outerSignal.removeEventListener('abort', abort) - ac.abort() - - if (final) { - if (!error) { - lastStreamCleanup.forEach((fn) => fn()) - } - - process.nextTick(callback, error, value) - } - } - - let ret - - for (let i = 0; i < streams.length; i++) { - const stream = streams[i] - const reading = i < streams.length - 1 - const writing = i > 0 - const end = reading || (opts === null || opts === undefined ? undefined : opts.end) !== false - const isLastStream = i === streams.length - 1 - - if (isNodeStream(stream)) { - if (end) { - const { destroy, cleanup } = destroyer(stream, reading, writing) - destroys.push(destroy) - - if (isReadable(stream) && isLastStream) { - lastStreamCleanup.push(cleanup) - } - } // Catch stream errors that occur after pipe/pump has completed. - - function onError(err) { - if (err && err.name !== 'AbortError' && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { - finish(err) - } - } - - stream.on('error', onError) - - if (isReadable(stream) && isLastStream) { - lastStreamCleanup.push(() => { - stream.removeListener('error', onError) - }) - } - } - - if (i === 0) { - if (typeof stream === 'function') { - ret = stream({ - signal - }) - - if (!isIterable(ret)) { - throw new ERR_INVALID_RETURN_VALUE('Iterable, AsyncIterable or Stream', 'source', ret) - } - } else if (isIterable(stream) || isReadableNodeStream(stream)) { - ret = stream - } else { - ret = Duplex.from(stream) - } - } else if (typeof stream === 'function') { - ret = makeAsyncIterable(ret) - ret = stream(ret, { - signal - }) - - if (reading) { - if (!isIterable(ret, true)) { - throw new ERR_INVALID_RETURN_VALUE('AsyncIterable', `transform[${i - 1}]`, ret) - } - } else { - var _ret - - if (!PassThrough) { - PassThrough = require('./passthrough') - } // If the last argument to pipeline is not a stream - // we must create a proxy stream so that pipeline(...) - // always returns a stream which can be further - // composed through `.pipe(stream)`. - - const pt = new PassThrough({ - objectMode: true - }) // Handle Promises/A+ spec, `then` could be a getter that throws on - // second use. - - const then = (_ret = ret) === null || _ret === undefined ? undefined : _ret.then - - if (typeof then === 'function') { - finishCount++ - then.call( - ret, - (val) => { - value = val - - if (val != null) { - pt.write(val) - } - - if (end) { - pt.end() - } - - process.nextTick(finish) - }, - (err) => { - pt.destroy(err) - process.nextTick(finish, err) - } - ) - } else if (isIterable(ret, true)) { - finishCount++ - pump(ret, pt, finish, { - end - }) - } else { - throw new ERR_INVALID_RETURN_VALUE('AsyncIterable or Promise', 'destination', ret) - } - - ret = pt - const { destroy, cleanup } = destroyer(ret, false, true) - destroys.push(destroy) - - if (isLastStream) { - lastStreamCleanup.push(cleanup) - } - } - } else if (isNodeStream(stream)) { - if (isReadableNodeStream(ret)) { - finishCount += 2 - const cleanup = pipe(ret, stream, finish, { - end - }) - - if (isReadable(stream) && isLastStream) { - lastStreamCleanup.push(cleanup) - } - } else if (isIterable(ret)) { - finishCount++ - pump(ret, stream, finish, { - end - }) - } else { - throw new ERR_INVALID_ARG_TYPE('val', ['Readable', 'Iterable', 'AsyncIterable'], ret) - } - - ret = stream - } else { - ret = Duplex.from(stream) - } - } - - if ( - (signal !== null && signal !== undefined && signal.aborted) || - (outerSignal !== null && outerSignal !== undefined && outerSignal.aborted) - ) { - process.nextTick(abort) - } - - return ret -} - -function pipe(src, dst, finish, { end }) { - let ended = false - dst.on('close', () => { - if (!ended) { - // Finish if the destination closes before the source has completed. - finish(new ERR_STREAM_PREMATURE_CLOSE()) - } - }) - src.pipe(dst, { - end - }) - - if (end) { - // Compat. Before node v10.12.0 stdio used to throw an error so - // pipe() did/does not end() stdio destinations. - // Now they allow it but "secretly" don't close the underlying fd. - src.once('end', () => { - ended = true - dst.end() - }) - } else { - finish() - } - - eos( - src, - { - readable: true, - writable: false - }, - (err) => { - const rState = src._readableState - - if ( - err && - err.code === 'ERR_STREAM_PREMATURE_CLOSE' && - rState && - rState.ended && - !rState.errored && - !rState.errorEmitted - ) { - // Some readable streams will emit 'close' before 'end'. However, since - // this is on the readable side 'end' should still be emitted if the - // stream has been ended and no error emitted. This should be allowed in - // favor of backwards compatibility. Since the stream is piped to a - // destination this should not result in any observable difference. - // We don't need to check if this is a writable premature close since - // eos will only fail with premature close on the reading side for - // duplex streams. - src.once('end', finish).once('error', finish) - } else { - finish(err) - } - } - ) - return eos( - dst, - { - readable: false, - writable: true - }, - finish - ) -} - -module.exports = { - pipelineImpl, - pipeline -} diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/state.js b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/state.js deleted file mode 100644 index e7fcebdde9de14..00000000000000 --- a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/state.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict' - -const { MathFloor, NumberIsInteger } = require('../../ours/primordials') - -const { ERR_INVALID_ARG_VALUE } = require('../../ours/errors').codes - -function highWaterMarkFrom(options, isDuplex, duplexKey) { - return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null -} - -function getDefaultHighWaterMark(objectMode) { - return objectMode ? 16 : 16 * 1024 -} - -function getHighWaterMark(state, options, duplexKey, isDuplex) { - const hwm = highWaterMarkFrom(options, isDuplex, duplexKey) - - if (hwm != null) { - if (!NumberIsInteger(hwm) || hwm < 0) { - const name = isDuplex ? `options.${duplexKey}` : 'options.highWaterMark' - throw new ERR_INVALID_ARG_VALUE(name, hwm) - } - - return MathFloor(hwm) - } // Default value - - return getDefaultHighWaterMark(state.objectMode) -} - -module.exports = { - getHighWaterMark, - getDefaultHighWaterMark -} diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/package.json b/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/package.json deleted file mode 100644 index 1b65f2332a4476..00000000000000 --- a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "readable-stream", - "version": "4.2.0", - "description": "Node.js Streams, a user-land copy of the stream library from Node.js", - "homepage": "https://github.com/nodejs/readable-stream", - "license": "MIT", - "licenses": [ - { - "type": "MIT", - "url": "https://choosealicense.com/licenses/mit/" - } - ], - "keywords": [ - "readable", - "stream", - "pipe" - ], - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "main": "lib/ours/index.js", - "files": [ - "lib", - "LICENSE", - "README.md" - ], - "browser": { - "util": "./lib/ours/util.js", - "./lib/ours/index.js": "./lib/ours/browser.js" - }, - "scripts": { - "build": "node build/build.mjs", - "postbuild": "prettier -w lib test", - "test": "tap --rcfile=./tap.yml test/parallel/test-*.js test/ours/test-*.js", - "test:prepare": "node test/browser/runner-prepare.mjs", - "test:browsers": "node test/browser/runner-browser.mjs", - "test:bundlers": "node test/browser/runner-node.mjs", - "coverage": "c8 -c ./c8.json tap --rcfile=./tap.yml test/parallel/test-*.js test/ours/test-*.js", - "format": "prettier -w src lib test", - "lint": "eslint src" - }, - "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10" - }, - "devDependencies": { - "@babel/core": "^7.17.10", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", - "@babel/plugin-proposal-optional-chaining": "^7.16.7", - "@rollup/plugin-commonjs": "^22.0.0", - "@rollup/plugin-inject": "^4.0.4", - "@rollup/plugin-node-resolve": "^13.3.0", - "@sinonjs/fake-timers": "^9.1.2", - "browserify": "^17.0.0", - "c8": "^7.11.2", - "esbuild": "^0.14.39", - "esbuild-plugin-alias": "^0.2.1", - "eslint": "^8.15.0", - "eslint-config-standard": "^17.0.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-n": "^15.2.0", - "eslint-plugin-promise": "^6.0.0", - "playwright": "^1.21.1", - "prettier": "^2.6.2", - "rollup": "^2.72.1", - "rollup-plugin-polyfill-node": "^0.9.0", - "tap": "^16.2.0", - "tap-mocha-reporter": "^5.0.3", - "tape": "^5.5.3", - "tar": "^6.1.11", - "undici": "^5.1.1", - "webpack": "^5.72.1", - "webpack-cli": "^4.9.2" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } -} diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json index 6ab0d2a9dd8a36..189a19bf315976 100644 --- a/deps/npm/node_modules/cacache/package.json +++ b/deps/npm/node_modules/cacache/package.json @@ -1,6 +1,6 @@ { "name": "cacache", - "version": "17.0.3", + "version": "17.0.4", "cache-version": { "content": "2", "index": "5" @@ -46,7 +46,7 @@ "license": "ISC", "dependencies": { "@npmcli/fs": "^3.1.0", - "fs-minipass": "^2.1.0", + "fs-minipass": "^3.0.0", "glob": "^8.0.1", "lru-cache": "^7.7.1", "minipass": "^4.0.0", @@ -61,7 +61,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.0", "tap": "^16.0.0" }, "engines": { @@ -70,7 +70,7 @@ "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "windowsCI": false, - "version": "4.10.0" + "version": "4.11.0" }, "author": "GitHub Inc.", "tap": { diff --git a/deps/npm/node_modules/ci-info/LICENSE b/deps/npm/node_modules/ci-info/LICENSE index 74871920628718..44ca33aa611e73 100644 --- a/deps/npm/node_modules/ci-info/LICENSE +++ b/deps/npm/node_modules/ci-info/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016-2022 Thomas Watson Steen +Copyright (c) 2016-2023 Thomas Watson Steen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/deps/npm/node_modules/ci-info/index.d.ts b/deps/npm/node_modules/ci-info/index.d.ts index 816d63a867cffd..8aebdcf25858d2 100644 --- a/deps/npm/node_modules/ci-info/index.d.ts +++ b/deps/npm/node_modules/ci-info/index.d.ts @@ -43,15 +43,16 @@ export const CODESHIP: boolean; export const DRONE: boolean; export const DSARI: boolean; export const EAS: boolean; +export const GERRIT: boolean; export const GITHUB_ACTIONS: boolean; export const GITLAB: boolean; export const GOCD: boolean; export const GOOGLE_CLOUD_BUILD: boolean; -export const LAYERCI: boolean; -export const GERRIT: boolean; +export const HARNESS: boolean; export const HEROKU: boolean; export const HUDSON: boolean; export const JENKINS: boolean; +export const LAYERCI: boolean; export const MAGNUM: boolean; export const NETLIFY: boolean; export const NEVERCODE: boolean; diff --git a/deps/npm/node_modules/ci-info/index.js b/deps/npm/node_modules/ci-info/index.js index e91c518557897a..47907264581eb1 100644 --- a/deps/npm/node_modules/ci-info/index.js +++ b/deps/npm/node_modules/ci-info/index.js @@ -54,7 +54,8 @@ vendors.forEach(function (vendor) { }) exports.isCI = !!( - env.BUILD_ID || // Jenkins, Cloudbees + env.CI !== 'false' && // Bypass all checks if CI env is explicitly set to 'false' + (env.BUILD_ID || // Jenkins, Cloudbees env.BUILD_NUMBER || // Jenkins, TeamCity env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari env.CI_APP_ID || // Appflow @@ -64,7 +65,7 @@ exports.isCI = !!( env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI env.RUN_ID || // TaskCluster, dsari exports.name || - false + false) ) function checkEnv (obj) { diff --git a/deps/npm/node_modules/ci-info/package.json b/deps/npm/node_modules/ci-info/package.json index cadaa15026239b..3edae7417a33ef 100644 --- a/deps/npm/node_modules/ci-info/package.json +++ b/deps/npm/node_modules/ci-info/package.json @@ -1,6 +1,6 @@ { "name": "ci-info", - "version": "3.7.0", + "version": "3.8.0", "description": "Get details about the current Continuous Integration environment", "main": "index.js", "typings": "index.d.ts", @@ -22,6 +22,12 @@ "index.d.ts", "CHANGELOG.md" ], + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], "scripts": { "lint:fix": "standard --fix", "test": "standard && node test.js", diff --git a/deps/npm/node_modules/ci-info/vendors.json b/deps/npm/node_modules/ci-info/vendors.json index 00c1601b511937..213711755273ae 100644 --- a/deps/npm/node_modules/ci-info/vendors.json +++ b/deps/npm/node_modules/ci-info/vendors.json @@ -48,7 +48,10 @@ "name": "Buildkite", "constant": "BUILDKITE", "env": "BUILDKITE", - "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" } + "pr": { + "env": "BUILDKITE_PULL_REQUEST", + "ne": "false" + } }, { "name": "CircleCI", @@ -66,7 +69,12 @@ "name": "Codefresh", "constant": "CODEFRESH", "env": "CF_BUILD_ID", - "pr": { "any": ["CF_PULL_REQUEST_NUMBER", "CF_PULL_REQUEST_ID"] } + "pr": { + "any": [ + "CF_PULL_REQUEST_NUMBER", + "CF_PULL_REQUEST_ID" + ] + } }, { "name": "Codemagic", @@ -77,13 +85,17 @@ { "name": "Codeship", "constant": "CODESHIP", - "env": { "CI_NAME": "codeship" } + "env": { + "CI_NAME": "codeship" + } }, { "name": "Drone", "constant": "DRONE", "env": "DRONE", - "pr": { "DRONE_BUILD_EVENT": "pull_request" } + "pr": { + "DRONE_BUILD_EVENT": "pull_request" + } }, { "name": "dsari", @@ -95,11 +107,18 @@ "constant": "EAS", "env": "EAS_BUILD" }, + { + "name": "Gerrit", + "constant": "GERRIT", + "env": "GERRIT_PROJECT" + }, { "name": "GitHub Actions", "constant": "GITHUB_ACTIONS", "env": "GITHUB_ACTIONS", - "pr": { "GITHUB_EVENT_NAME": "pull_request" } + "pr": { + "GITHUB_EVENT_NAME": "pull_request" + } }, { "name": "GitLab CI", @@ -118,20 +137,17 @@ "env": "BUILDER_OUTPUT" }, { - "name": "LayerCI", - "constant": "LAYERCI", - "env": "LAYERCI", - "pr": "LAYERCI_PULL_REQUEST" - }, - { - "name": "Gerrit", - "constant": "GERRIT", - "env": "GERRIT_PROJECT" + "name": "Harness CI", + "constant": "HARNESS", + "env": "HARNESS_BUILD_ID" }, { "name": "Heroku", "constant": "HEROKU", - "env": { "env": "NODE", "includes": "/app/.heroku/node/bin/node" } + "env": { + "env": "NODE", + "includes": "/app/.heroku/node/bin/node" + } }, { "name": "Hudson", @@ -141,8 +157,22 @@ { "name": "Jenkins", "constant": "JENKINS", - "env": ["JENKINS_URL", "BUILD_ID"], - "pr": { "any": ["ghprbPullId", "CHANGE_ID"] } + "env": [ + "JENKINS_URL", + "BUILD_ID" + ], + "pr": { + "any": [ + "ghprbPullId", + "CHANGE_ID" + ] + } + }, + { + "name": "LayerCI", + "constant": "LAYERCI", + "env": "LAYERCI", + "pr": "LAYERCI_PULL_REQUEST" }, { "name": "Magnum CI", @@ -153,13 +183,19 @@ "name": "Netlify CI", "constant": "NETLIFY", "env": "NETLIFY", - "pr": { "env": "PULL_REQUEST", "ne": "false" } + "pr": { + "env": "PULL_REQUEST", + "ne": "false" + } }, { "name": "Nevercode", "constant": "NEVERCODE", "env": "NEVERCODE", - "pr": { "env": "NEVERCODE_PULL_REQUEST", "ne": "false" } + "pr": { + "env": "NEVERCODE_PULL_REQUEST", + "ne": "false" + } }, { "name": "ReleaseHub", @@ -170,7 +206,9 @@ "name": "Render", "constant": "RENDER", "env": "RENDER", - "pr": { "IS_PULL_REQUEST": "true" } + "pr": { + "IS_PULL_REQUEST": "true" + } }, { "name": "Sail CI", @@ -182,7 +220,10 @@ "name": "Screwdriver", "constant": "SCREWDRIVER", "env": "SCREWDRIVER", - "pr": { "env": "SD_PULL_REQUEST", "ne": "false" } + "pr": { + "env": "SD_PULL_REQUEST", + "ne": "false" + } }, { "name": "Semaphore", @@ -194,7 +235,9 @@ "name": "Shippable", "constant": "SHIPPABLE", "env": "SHIPPABLE", - "pr": { "IS_PULL_REQUEST": "true" } + "pr": { + "IS_PULL_REQUEST": "true" + } }, { "name": "Solano CI", @@ -205,7 +248,9 @@ { "name": "Sourcehut", "constant": "SOURCEHUT", - "env": { "CI_NAME": "sourcehut" } + "env": { + "CI_NAME": "sourcehut" + } }, { "name": "Strider CD", @@ -215,7 +260,10 @@ { "name": "TaskCluster", "constant": "TASKCLUSTER", - "env": ["TASK_ID", "RUN_ID"] + "env": [ + "TASK_ID", + "RUN_ID" + ] }, { "name": "TeamCity", @@ -226,12 +274,20 @@ "name": "Travis CI", "constant": "TRAVIS", "env": "TRAVIS", - "pr": { "env": "TRAVIS_PULL_REQUEST", "ne": "false" } + "pr": { + "env": "TRAVIS_PULL_REQUEST", + "ne": "false" + } }, { "name": "Vercel", "constant": "VERCEL", - "env": { "any": ["NOW_BUILDER", "VERCEL"] } + "env": { + "any": [ + "NOW_BUILDER", + "VERCEL" + ] + } }, { "name": "Visual Studio App Center", @@ -241,8 +297,12 @@ { "name": "Woodpecker", "constant": "WOODPECKER", - "env": { "CI": "woodpecker" }, - "pr": { "CI_BUILD_EVENT": "pull_request" } + "env": { + "CI": "woodpecker" + }, + "pr": { + "CI_BUILD_EVENT": "pull_request" + } }, { "name": "Xcode Cloud", diff --git a/deps/npm/node_modules/cmd-shim/lib/index.js b/deps/npm/node_modules/cmd-shim/lib/index.js index cf223feb2aa65b..76ea2cb6d624d8 100644 --- a/deps/npm/node_modules/cmd-shim/lib/index.js +++ b/deps/npm/node_modules/cmd-shim/lib/index.js @@ -19,7 +19,9 @@ const { const { dirname, relative } = require('path') const toBatchSyntax = require('./to-batch-syntax') -const shebangExpr = /^#!\s*(?:\/usr\/bin\/env\s*((?:[^ \t=]+=[^ \t=]+\s+)*))?([^ \t]+)(.*)$/ +// linting disabled because this regex is really long +// eslint-disable-next-line max-len +const shebangExpr = /^#!\s*(?:\/usr\/bin\/env\s+(?:-S\s+)?((?:[^ \t=]+=[^ \t=]+\s+)*))?([^ \t]+)(.*)$/ const cmdShimIfExists = (from, to) => stat(from).then(() => cmdShim(from, to), () => {}) diff --git a/deps/npm/node_modules/cmd-shim/package.json b/deps/npm/node_modules/cmd-shim/package.json index 80cbec8aec6a78..4e52de2412f24a 100644 --- a/deps/npm/node_modules/cmd-shim/package.json +++ b/deps/npm/node_modules/cmd-shim/package.json @@ -1,6 +1,6 @@ { "name": "cmd-shim", - "version": "6.0.0", + "version": "6.0.1", "description": "Used in npm for command line application support", "scripts": { "test": "tap", @@ -17,8 +17,8 @@ }, "license": "ISC", "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.5.1", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.11.0", "tap": "^16.0.1" }, "files": [ @@ -41,6 +41,6 @@ "author": "GitHub Inc.", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.1" + "version": "4.11.0" } } diff --git a/deps/npm/node_modules/defaults/LICENSE b/deps/npm/node_modules/defaults/LICENSE index d88b0720784808..11eb6fdebf3b63 100644 --- a/deps/npm/node_modules/defaults/LICENSE +++ b/deps/npm/node_modules/defaults/LICENSE @@ -1,5 +1,6 @@ The MIT License (MIT) +Copyright (c) 2022 Sindre Sorhus Copyright (c) 2015 Elijah Insua Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/deps/npm/node_modules/defaults/package.json b/deps/npm/node_modules/defaults/package.json index 854016d56fefd7..44f72b1714ce4e 100644 --- a/deps/npm/node_modules/defaults/package.json +++ b/deps/npm/node_modules/defaults/package.json @@ -1,26 +1,33 @@ { - "name": "defaults", - "version": "1.0.3", - "description": "merge single level defaults over a config object", - "main": "index.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/tmpvar/defaults.git" - }, - "keywords": [ - "config", - "defaults" - ], - "author": "Elijah Insua ", - "license": "MIT", - "readmeFilename": "README.md", - "dependencies": { - "clone": "^1.0.2" - }, - "devDependencies": { - "tap": "^2.0.0" - } + "name": "defaults", + "version": "1.0.4", + "description": "merge single level defaults over a config object", + "main": "index.js", + "funding": "https://github.com/sponsors/sindresorhus", + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/node-defaults.git" + }, + "keywords": [ + "config", + "defaults", + "options", + "object", + "merge", + "assign", + "properties", + "deep" + ], + "author": "Elijah Insua ", + "license": "MIT", + "readmeFilename": "README.md", + "dependencies": { + "clone": "^1.0.2" + }, + "devDependencies": { + "tap": "^2.0.0" + } } diff --git a/deps/npm/node_modules/fs-minipass/lib/index.js b/deps/npm/node_modules/fs-minipass/lib/index.js new file mode 100644 index 00000000000000..f9d5082a4d6426 --- /dev/null +++ b/deps/npm/node_modules/fs-minipass/lib/index.js @@ -0,0 +1,443 @@ +'use strict' +const MiniPass = require('minipass') +const EE = require('events').EventEmitter +const fs = require('fs') + +const writev = fs.writev + +const _autoClose = Symbol('_autoClose') +const _close = Symbol('_close') +const _ended = Symbol('_ended') +const _fd = Symbol('_fd') +const _finished = Symbol('_finished') +const _flags = Symbol('_flags') +const _flush = Symbol('_flush') +const _handleChunk = Symbol('_handleChunk') +const _makeBuf = Symbol('_makeBuf') +const _mode = Symbol('_mode') +const _needDrain = Symbol('_needDrain') +const _onerror = Symbol('_onerror') +const _onopen = Symbol('_onopen') +const _onread = Symbol('_onread') +const _onwrite = Symbol('_onwrite') +const _open = Symbol('_open') +const _path = Symbol('_path') +const _pos = Symbol('_pos') +const _queue = Symbol('_queue') +const _read = Symbol('_read') +const _readSize = Symbol('_readSize') +const _reading = Symbol('_reading') +const _remain = Symbol('_remain') +const _size = Symbol('_size') +const _write = Symbol('_write') +const _writing = Symbol('_writing') +const _defaultFlag = Symbol('_defaultFlag') +const _errored = Symbol('_errored') + +class ReadStream extends MiniPass { + constructor (path, opt) { + opt = opt || {} + super(opt) + + this.readable = true + this.writable = false + + if (typeof path !== 'string') { + throw new TypeError('path must be a string') + } + + this[_errored] = false + this[_fd] = typeof opt.fd === 'number' ? opt.fd : null + this[_path] = path + this[_readSize] = opt.readSize || 16 * 1024 * 1024 + this[_reading] = false + this[_size] = typeof opt.size === 'number' ? opt.size : Infinity + this[_remain] = this[_size] + this[_autoClose] = typeof opt.autoClose === 'boolean' ? + opt.autoClose : true + + if (typeof this[_fd] === 'number') { + this[_read]() + } else { + this[_open]() + } + } + + get fd () { + return this[_fd] + } + + get path () { + return this[_path] + } + + write () { + throw new TypeError('this is a readable stream') + } + + end () { + throw new TypeError('this is a readable stream') + } + + [_open] () { + fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd)) + } + + [_onopen] (er, fd) { + if (er) { + this[_onerror](er) + } else { + this[_fd] = fd + this.emit('open', fd) + this[_read]() + } + } + + [_makeBuf] () { + return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])) + } + + [_read] () { + if (!this[_reading]) { + this[_reading] = true + const buf = this[_makeBuf]() + /* istanbul ignore if */ + if (buf.length === 0) { + return process.nextTick(() => this[_onread](null, 0, buf)) + } + fs.read(this[_fd], buf, 0, buf.length, null, (er, br, b) => + this[_onread](er, br, b)) + } + } + + [_onread] (er, br, buf) { + this[_reading] = false + if (er) { + this[_onerror](er) + } else if (this[_handleChunk](br, buf)) { + this[_read]() + } + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd] + this[_fd] = null + fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')) + } + } + + [_onerror] (er) { + this[_reading] = true + this[_close]() + this.emit('error', er) + } + + [_handleChunk] (br, buf) { + let ret = false + // no effect if infinite + this[_remain] -= br + if (br > 0) { + ret = super.write(br < buf.length ? buf.slice(0, br) : buf) + } + + if (br === 0 || this[_remain] <= 0) { + ret = false + this[_close]() + super.end() + } + + return ret + } + + emit (ev, data) { + switch (ev) { + case 'prefinish': + case 'finish': + break + + case 'drain': + if (typeof this[_fd] === 'number') { + this[_read]() + } + break + + case 'error': + if (this[_errored]) { + return + } + this[_errored] = true + return super.emit(ev, data) + + default: + return super.emit(ev, data) + } + } +} + +class ReadStreamSync extends ReadStream { + [_open] () { + let threw = true + try { + this[_onopen](null, fs.openSync(this[_path], 'r')) + threw = false + } finally { + if (threw) { + this[_close]() + } + } + } + + [_read] () { + let threw = true + try { + if (!this[_reading]) { + this[_reading] = true + do { + const buf = this[_makeBuf]() + /* istanbul ignore next */ + const br = buf.length === 0 ? 0 + : fs.readSync(this[_fd], buf, 0, buf.length, null) + if (!this[_handleChunk](br, buf)) { + break + } + } while (true) + this[_reading] = false + } + threw = false + } finally { + if (threw) { + this[_close]() + } + } + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd] + this[_fd] = null + fs.closeSync(fd) + this.emit('close') + } + } +} + +class WriteStream extends EE { + constructor (path, opt) { + opt = opt || {} + super(opt) + this.readable = false + this.writable = true + this[_errored] = false + this[_writing] = false + this[_ended] = false + this[_needDrain] = false + this[_queue] = [] + this[_path] = path + this[_fd] = typeof opt.fd === 'number' ? opt.fd : null + this[_mode] = opt.mode === undefined ? 0o666 : opt.mode + this[_pos] = typeof opt.start === 'number' ? opt.start : null + this[_autoClose] = typeof opt.autoClose === 'boolean' ? + opt.autoClose : true + + // truncating makes no sense when writing into the middle + const defaultFlag = this[_pos] !== null ? 'r+' : 'w' + this[_defaultFlag] = opt.flags === undefined + this[_flags] = this[_defaultFlag] ? defaultFlag : opt.flags + + if (this[_fd] === null) { + this[_open]() + } + } + + emit (ev, data) { + if (ev === 'error') { + if (this[_errored]) { + return + } + this[_errored] = true + } + return super.emit(ev, data) + } + + get fd () { + return this[_fd] + } + + get path () { + return this[_path] + } + + [_onerror] (er) { + this[_close]() + this[_writing] = true + this.emit('error', er) + } + + [_open] () { + fs.open(this[_path], this[_flags], this[_mode], + (er, fd) => this[_onopen](er, fd)) + } + + [_onopen] (er, fd) { + if (this[_defaultFlag] && + this[_flags] === 'r+' && + er && er.code === 'ENOENT') { + this[_flags] = 'w' + this[_open]() + } else if (er) { + this[_onerror](er) + } else { + this[_fd] = fd + this.emit('open', fd) + if (!this[_writing]) { + this[_flush]() + } + } + } + + end (buf, enc) { + if (buf) { + this.write(buf, enc) + } + + this[_ended] = true + + // synthetic after-write logic, where drain/finish live + if (!this[_writing] && !this[_queue].length && + typeof this[_fd] === 'number') { + this[_onwrite](null, 0) + } + return this + } + + write (buf, enc) { + if (typeof buf === 'string') { + buf = Buffer.from(buf, enc) + } + + if (this[_ended]) { + this.emit('error', new Error('write() after end()')) + return false + } + + if (this[_fd] === null || this[_writing] || this[_queue].length) { + this[_queue].push(buf) + this[_needDrain] = true + return false + } + + this[_writing] = true + this[_write](buf) + return true + } + + [_write] (buf) { + fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => + this[_onwrite](er, bw)) + } + + [_onwrite] (er, bw) { + if (er) { + this[_onerror](er) + } else { + if (this[_pos] !== null) { + this[_pos] += bw + } + if (this[_queue].length) { + this[_flush]() + } else { + this[_writing] = false + + if (this[_ended] && !this[_finished]) { + this[_finished] = true + this[_close]() + this.emit('finish') + } else if (this[_needDrain]) { + this[_needDrain] = false + this.emit('drain') + } + } + } + } + + [_flush] () { + if (this[_queue].length === 0) { + if (this[_ended]) { + this[_onwrite](null, 0) + } + } else if (this[_queue].length === 1) { + this[_write](this[_queue].pop()) + } else { + const iovec = this[_queue] + this[_queue] = [] + writev(this[_fd], iovec, this[_pos], + (er, bw) => this[_onwrite](er, bw)) + } + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd] + this[_fd] = null + fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')) + } + } +} + +class WriteStreamSync extends WriteStream { + [_open] () { + let fd + // only wrap in a try{} block if we know we'll retry, to avoid + // the rethrow obscuring the error's source frame in most cases. + if (this[_defaultFlag] && this[_flags] === 'r+') { + try { + fd = fs.openSync(this[_path], this[_flags], this[_mode]) + } catch (er) { + if (er.code === 'ENOENT') { + this[_flags] = 'w' + return this[_open]() + } else { + throw er + } + } + } else { + fd = fs.openSync(this[_path], this[_flags], this[_mode]) + } + + this[_onopen](null, fd) + } + + [_close] () { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd] + this[_fd] = null + fs.closeSync(fd) + this.emit('close') + } + } + + [_write] (buf) { + // throw the original, but try to close if it fails + let threw = true + try { + this[_onwrite](null, + fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos])) + threw = false + } finally { + if (threw) { + try { + this[_close]() + } catch { + // ok error + } + } + } + } +} + +exports.ReadStream = ReadStream +exports.ReadStreamSync = ReadStreamSync + +exports.WriteStream = WriteStream +exports.WriteStreamSync = WriteStreamSync diff --git a/deps/npm/node_modules/fs-minipass/package.json b/deps/npm/node_modules/fs-minipass/package.json index 2f2436cb5c3b1a..cba0d0cbc2dd85 100644 --- a/deps/npm/node_modules/fs-minipass/package.json +++ b/deps/npm/node_modules/fs-minipass/package.json @@ -1,19 +1,22 @@ { "name": "fs-minipass", - "version": "2.1.0", - "main": "index.js", + "version": "3.0.1", + "main": "lib/index.js", "scripts": { "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "snap": "tap", + "posttest": "npm run lint" }, "keywords": [], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "author": "GitHub Inc.", "license": "ISC", "repository": { "type": "git", - "url": "git+https://github.com/npm/fs-minipass.git" + "url": "https://github.com/npm/fs-minipass.git" }, "bugs": { "url": "https://github.com/npm/fs-minipass/issues" @@ -21,19 +24,30 @@ "homepage": "https://github.com/npm/fs-minipass#readme", "description": "fs read and write streams based on minipass", "dependencies": { - "minipass": "^3.0.0" + "minipass": "^4.0.0" }, "devDependencies": { - "mutate-fs": "^2.0.1", - "tap": "^14.6.4" + "@npmcli/eslint-config": "^4.0.1", + "@npmcli/template-oss": "4.11.3", + "mutate-fs": "^2.1.1", + "tap": "^16.3.2" }, "files": [ - "index.js" + "bin/", + "lib/" ], "tap": { - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "engines": { - "node": ">= 8" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "4.11.3" } } diff --git a/deps/npm/node_modules/glob/common.js b/deps/npm/node_modules/glob/common.js index e094f750472f78..61a4452f097dcd 100644 --- a/deps/npm/node_modules/glob/common.js +++ b/deps/npm/node_modules/glob/common.js @@ -57,6 +57,12 @@ function setopts (self, pattern, options) { pattern = "**/" + pattern } + self.windowsPathsNoEscape = !!options.windowsPathsNoEscape || + options.allowWindowsEscape === false + if (self.windowsPathsNoEscape) { + pattern = pattern.replace(/\\/g, '/') + } + self.silent = !!options.silent self.pattern = pattern self.strict = options.strict !== false @@ -112,8 +118,6 @@ function setopts (self, pattern, options) { // Note that they are not supported in Glob itself anyway. options.nonegate = true options.nocomment = true - // always treat \ in patterns as escapes, not path separators - options.allowWindowsEscape = true self.minimatch = new Minimatch(pattern, options) self.options = self.minimatch.options diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/LICENSE b/deps/npm/node_modules/glob/node_modules/minimatch/LICENSE new file mode 100644 index 00000000000000..1493534e60dce4 --- /dev/null +++ b/deps/npm/node_modules/glob/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/minimatch/lib/path.js b/deps/npm/node_modules/glob/node_modules/minimatch/lib/path.js similarity index 100% rename from deps/npm/node_modules/minimatch/lib/path.js rename to deps/npm/node_modules/glob/node_modules/minimatch/lib/path.js diff --git a/deps/npm/node_modules/minimatch/minimatch.js b/deps/npm/node_modules/glob/node_modules/minimatch/minimatch.js similarity index 90% rename from deps/npm/node_modules/minimatch/minimatch.js rename to deps/npm/node_modules/glob/node_modules/minimatch/minimatch.js index 9e8917a46165fb..6c8bfc35181c6d 100644 --- a/deps/npm/node_modules/minimatch/minimatch.js +++ b/deps/npm/node_modules/glob/node_modules/minimatch/minimatch.js @@ -157,7 +157,9 @@ minimatch.match = (list, pattern, options = {}) => { // replace stuff like \* with * const globUnescape = s => s.replace(/\\(.)/g, '$1') +const charUnescape = s => s.replace(/\\([^-\]])/g, '$1') const regExpEscape = s => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +const braExpEscape = s => s.replace(/[[\]\\]/g, '\\$&') class Minimatch { constructor (pattern, options) { @@ -425,7 +427,7 @@ class Minimatch { if (pattern === '') return '' let re = '' - let hasMagic = !!options.nocase + let hasMagic = false let escaping = false // ? => one single character const patternListStack = [] @@ -438,11 +440,23 @@ class Minimatch { let pl let sp // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - const patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' + // even when options.dot is set. However, if the pattern + // starts with ., then traversal patterns can match. + let dotTravAllowed = pattern.charAt(0) === '.' + let dotFileAllowed = options.dot || dotTravAllowed + const patternStart = () => + dotTravAllowed + ? '' + : dotFileAllowed + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)' + const subPatternStart = (p) => + p.charAt(0) === '.' + ? '' + : options.dot + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)' + const clearStateChar = () => { if (stateChar) { @@ -492,6 +506,11 @@ class Minimatch { } case '\\': + if (inClass && pattern.charAt(i + 1) === '-') { + re += c + continue + } + clearStateChar() escaping = true continue @@ -526,7 +545,7 @@ class Minimatch { if (options.noext) clearStateChar() continue - case '(': + case '(': { if (inClass) { re += '(' continue @@ -537,46 +556,64 @@ class Minimatch { continue } - patternListStack.push({ + const plEntry = { type: stateChar, start: i - 1, reStart: re.length, open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + close: plTypes[stateChar].close, + } + this.debug(this.pattern, '\t', plEntry) + patternListStack.push(plEntry) + // negation is (?:(?!(?:js)(?:))[^/]*) + re += plEntry.open + // next entry starts with a dot maybe? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true + re += subPatternStart(pattern.slice(i + 1)) + } this.debug('plType %j %j', stateChar, re) stateChar = false - continue + continue + } - case ')': - if (inClass || !patternListStack.length) { + case ')': { + const plEntry = patternListStack[patternListStack.length - 1] + if (inClass || !plEntry) { re += '\\)' continue } + patternListStack.pop() + // closing an extglob clearStateChar() hasMagic = true - pl = patternListStack.pop() + pl = plEntry // negation is (?:(?!js)[^/]*) // The others are (?:) re += pl.close if (pl.type === '!') { - negativeLists.push(pl) + negativeLists.push(Object.assign(pl, { reEnd: re.length })) } - pl.reEnd = re.length - continue + continue + } - case '|': - if (inClass || !patternListStack.length) { + case '|': { + const plEntry = patternListStack[patternListStack.length - 1] + if (inClass || !plEntry) { re += '\\|' continue } clearStateChar() re += '|' - continue + // next subpattern can start with a dot? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true + re += subPatternStart(pattern.slice(i + 1)) + } + continue + } // these are mostly the same in regexp and glob case '[': @@ -604,8 +641,6 @@ class Minimatch { continue } - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" // split where the last [ was, make sure we don't have // an invalid re. if so, re-walk the contents of the // would-be class to re-translate any characters that @@ -615,20 +650,16 @@ class Minimatch { // to do safely. For now, this is safe and works. cs = pattern.substring(classStart + 1, i) try { - RegExp('[' + cs + ']') + RegExp('[' + braExpEscape(charUnescape(cs)) + ']') + // looks good, finish up the class. + re += c } catch (er) { - // not a valid class! - sp = this.parse(cs, SUBPARSE) - re = re.substring(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue + // out of order ranges in JS are errors, but in glob syntax, + // they're just a range that matches nothing. + re = re.substring(0, reClassStart) + '(?:$.)' // match nothing ever } - - // finish up the class. hasMagic = true inClass = false - re += c continue default: @@ -721,14 +752,16 @@ class Minimatch { // Handle nested stuff like *(*.js|!(*.json)), where open parens // mean that we should *not* include the ) in the bit that is considered // "after" the negated section. - const openParensBefore = nlBefore.split('(').length - 1 + const closeParensBefore = nlBefore.split(')').length + const openParensBefore = nlBefore.split('(').length - closeParensBefore let cleanAfter = nlAfter for (let i = 0; i < openParensBefore; i++) { cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') } nlAfter = cleanAfter - const dollar = nlAfter === '' && isSub !== SUBPARSE ? '$' : '' + const dollar = nlAfter === '' && isSub !== SUBPARSE ? '(?:$|\\/)' : '' + re = nlBefore + nlFirst + nlAfter + dollar + nlLast } @@ -740,7 +773,7 @@ class Minimatch { } if (addPatternStart) { - re = patternStart + re + re = patternStart() + re } // parsing just a piece of a larger pattern. @@ -748,6 +781,11 @@ class Minimatch { return [re, hasMagic] } + // if it's nocase, and the lcase/uppercase don't match, it's magic + if (options.nocase && !hasMagic) { + hasMagic = pattern.toUpperCase() !== pattern.toLowerCase() + } + // skip the regexp for non-magical patterns // unescape anything in it, though, so that it'll be // an exact match against a file etc. diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/package.json b/deps/npm/node_modules/glob/node_modules/minimatch/package.json new file mode 100644 index 00000000000000..c8809dbb3119d9 --- /dev/null +++ b/deps/npm/node_modules/glob/node_modules/minimatch/package.json @@ -0,0 +1,35 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "name": "minimatch", + "description": "a glob matcher in javascript", + "publishConfig": { + "tag": "legacy-v5" + }, + "version": "5.1.6", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "test": "tap", + "snap": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags" + }, + "engines": { + "node": ">=10" + }, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "devDependencies": { + "tap": "^16.3.2" + }, + "license": "ISC", + "files": [ + "minimatch.js", + "lib" + ] +} diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json index 5134253e32226f..ca0fd916211b51 100644 --- a/deps/npm/node_modules/glob/package.json +++ b/deps/npm/node_modules/glob/package.json @@ -2,7 +2,7 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me/)", "name": "glob", "description": "a little globber", - "version": "8.0.3", + "version": "8.1.0", "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" diff --git a/deps/npm/node_modules/http-cache-semantics/index.js b/deps/npm/node_modules/http-cache-semantics/index.js index 4f6c2f30498b45..31fba4860024cd 100644 --- a/deps/npm/node_modules/http-cache-semantics/index.js +++ b/deps/npm/node_modules/http-cache-semantics/index.js @@ -7,6 +7,7 @@ const statusCodeCacheableByDefault = new Set([ 206, 300, 301, + 308, 404, 405, 410, @@ -79,10 +80,10 @@ function parseCacheControl(header) { // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives), // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale - const parts = header.trim().split(/\s*,\s*/); // TODO: lame parsing + const parts = header.trim().split(/,/); for (const part of parts) { - const [k, v] = part.split(/\s*=\s*/, 2); - cc[k] = v === undefined ? true : v.replace(/^"|"$/g, ''); // TODO: lame unquoting + const [k, v] = part.split(/=/, 2); + cc[k.trim()] = v === undefined ? true : v.trim().replace(/^"|"$/g, ''); } return cc; diff --git a/deps/npm/node_modules/http-cache-semantics/package.json b/deps/npm/node_modules/http-cache-semantics/package.json index 897798d8ccc79c..defbb045a63832 100644 --- a/deps/npm/node_modules/http-cache-semantics/package.json +++ b/deps/npm/node_modules/http-cache-semantics/package.json @@ -1,6 +1,6 @@ { "name": "http-cache-semantics", - "version": "4.1.0", + "version": "4.1.1", "description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies", "repository": "https://github.com/kornelski/http-cache-semantics.git", "main": "index.js", @@ -13,12 +13,6 @@ "author": "Kornel Lesiński (https://kornel.ski/)", "license": "BSD-2-Clause", "devDependencies": { - "eslint": "^5.13.0", - "eslint-plugin-prettier": "^3.0.1", - "husky": "^0.14.3", - "lint-staged": "^8.1.3", - "mocha": "^5.1.0", - "prettier": "^1.14.3", - "prettier-eslint-cli": "^4.7.1" + "mocha": "^10.0" } } diff --git a/deps/npm/node_modules/ignore-walk/package.json b/deps/npm/node_modules/ignore-walk/package.json index 3d977ed4b84f66..97a2854857939b 100644 --- a/deps/npm/node_modules/ignore-walk/package.json +++ b/deps/npm/node_modules/ignore-walk/package.json @@ -1,11 +1,11 @@ { "name": "ignore-walk", - "version": "6.0.0", + "version": "6.0.1", "description": "Nested/recursive `.gitignore`/`.npmignore` parsing and filtering.", "main": "lib/index.js", "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.5.1", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.11.3", "mkdirp": "^1.0.4", "mutate-fs": "^2.1.1", "rimraf": "^3.0.2", @@ -21,6 +21,7 @@ "postsnap": "npm run lintfix --", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", + "test:windows-coverage": "npm pkg set tap.statements=99 --json && npm pkg set tap.branches=98 --json && npm pkg set tap.lines=99 --json", "snap": "tap" }, "keywords": [ @@ -42,12 +43,13 @@ "lib/" ], "dependencies": { - "minimatch": "^5.0.1" + "minimatch": "^6.1.6" }, "tap": { "test-env": "LC_ALL=sk", "before": "test/00-setup.js", "after": "test/zz-cleanup.js", + "timeout": 600, "jobs": 1, "nyc-arg": [ "--exclude", @@ -59,7 +61,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.1", - "windowsCI": false + "version": "4.11.3", + "content": "scripts/template-oss" } } diff --git a/deps/npm/node_modules/init-package-json/lib/default-input.js b/deps/npm/node_modules/init-package-json/lib/default-input.js index fe5abfdd85e45d..490e83c139887f 100644 --- a/deps/npm/node_modules/init-package-json/lib/default-input.js +++ b/deps/npm/node_modules/init-package-json/lib/default-input.js @@ -1,190 +1,160 @@ -/* eslint-disable no-undef */ -var fs = require('fs') -var path = require('path') -var validateLicense = require('validate-npm-package-license') -var validateName = require('validate-npm-package-name') -var npa = require('npm-package-arg') -var semver = require('semver') +/* globals config, dirname, package, basename, yes, prompt */ + +const fs = require('fs/promises') +const path = require('path') +const validateLicense = require('validate-npm-package-license') +const validateName = require('validate-npm-package-name') +const npa = require('npm-package-arg') +const semver = require('semver') // more popular packages should go here, maybe? -function isTestPkg (p) { - return !!p.match(/^(expresso|mocha|tap|coffee-script|coco|streamline)$/) -} +const isTestPkg = (p) => !!p.match(/^(expresso|mocha|tap|coffee-script|coco|streamline)$/) -function niceName (n) { - return n.replace(/^node-|[.-]js$/g, '').replace(/\s+/g, ' ').replace(/ /g, '-').toLowerCase() -} +const invalid = (msg) => Object.assign(new Error(msg), { notValid: true }) -function readDeps (test, excluded) { - return function (cb) { - fs.readdir('node_modules', function (readdirErr, dir) { - if (readdirErr) { - return cb() - } - var deps = {} - var n = dir.length - if (n === 0) { - return cb(null, deps) - } - dir.forEach(function (d) { - if (d.match(/^\./)) { - return next() - } - if (test !== isTestPkg(d) || excluded[d]) { - return next() - } +const readDeps = (test, excluded) => async () => { + const dirs = await fs.readdir('node_modules').catch(() => null) - var dp = path.join(dirname, 'node_modules', d, 'package.json') - fs.readFile(dp, 'utf8', function (readFileErr, p) { - if (readFileErr) { - return next() - } - try { - p = JSON.parse(p) - } catch (e) { - return next() - } - if (!p.version) { - return next() - } - if (p._requiredBy) { - if (!p._requiredBy.some(function (req) { - return req === '#USER' - })) { - return next() - } - } - deps[d] = config.get('save-exact') ? p.version : config.get('save-prefix') + p.version - return next() - }) - }) - function next () { - if (--n === 0) { - return cb(null, deps) - } - } - }) + if (!dirs) { + return } + + const deps = {} + for (const dir of dirs) { + if (dir.match(/^\./) || test !== isTestPkg(dir) || excluded[dir]) { + continue + } + + const dp = path.join(dirname, 'node_modules', dir, 'package.json') + const p = await fs.readFile(dp, 'utf8').then((d) => JSON.parse(d)).catch(() => null) + + if (!p || !p.version || p?._requiredBy?.some((r) => r === '#USER')) { + continue + } + + deps[dir] = config.get('save-exact') ? p.version : config.get('save-prefix') + p.version + } + + return deps } -var name = niceName(package.name || basename) -var spec -try { - spec = npa(name) -} catch (e) { - spec = {} +const getConfig = (key) => { + // dots take precedence over dashes + const def = config?.defaults?.[`init.${key}`] + const val = config.get(`init.${key}`) + return (val !== def && val) ? val : config.get(`init-${key.replace(/\./g, '-')}`) } -var scope = config.get('scope') -if (scope) { - if (scope.charAt(0) !== '@') { - scope = '@' + scope + +const getName = () => { + const rawName = package.name || basename + let name = rawName + .replace(/^node-|[.-]js$/g, '') + .replace(/\s+/g, ' ') + .replace(/ /g, '-') + .toLowerCase() + + let spec + try { + spec = npa(name) + } catch { + spec = {} } - if (spec.scope) { - name = scope + '/' + spec.name.split('/')[1] - } else { - name = scope + '/' + name + + let scope = config.get('scope') + + if (scope) { + if (scope.charAt(0) !== '@') { + scope = '@' + scope + } + if (spec.scope) { + name = scope + '/' + spec.name.split('/')[1] + } else { + name = scope + '/' + name + } } + + return name } -exports.name = yes ? name : prompt('package name', name, function (data) { - var its = validateName(data) + +const name = getName() +exports.name = yes ? name : prompt('package name', name, (data) => { + const its = validateName(data) if (its.validForNewPackages) { return data } - var errors = (its.errors || []).concat(its.warnings || []) - var er = new Error('Sorry, ' + errors.join(' and ') + '.') - er.notValid = true - return er + const errors = (its.errors || []).concat(its.warnings || []) + return invalid(`Sorry, ${errors.join(' and ')}.`) }) -const defaultDottedInitVersion = config && - config.defaults && - config.defaults['init.version'] -const dottedInitVersion = - config.get('init.version') !== defaultDottedInitVersion && - config.get('init.version') -var version = package.version || - dottedInitVersion || - config.get('init-version') || - '1.0.0' -exports.version = yes ? - version : - prompt('version', version, function (promptedVersion) { - if (semver.valid(promptedVersion)) { - return promptedVersion - } - var er = new Error('Invalid version: "' + promptedVersion + '"') - er.notValid = true - return er - }) +const version = package.version || getConfig('version') || '1.0.0' +exports.version = yes ? version : prompt('version', version, (v) => { + if (semver.valid(v)) { + return v + } + return invalid(`Invalid version: "${v}"`) +}) if (!package.description) { exports.description = yes ? '' : prompt('description') } if (!package.main) { - exports.main = function (cb) { - fs.readdir(dirname, function (er, f) { - if (er) { - f = [] - } + exports.main = async () => { + const files = await fs.readdir(dirname) + .then(list => list.filter((f) => f.match(/\.js$/))) + .catch(() => []) - f = f.filter(function (filtered) { - return filtered.match(/\.js$/) - }) - - if (f.indexOf('index.js') !== -1) { - f = 'index.js' - } else if (f.indexOf('main.js') !== -1) { - f = 'main.js' - } else if (f.indexOf(basename + '.js') !== -1) { - f = basename + '.js' - } else { - f = f[0] - } + let index + if (files.includes('index.js')) { + index = 'index.js' + } else if (files.includes('main.js')) { + index = 'main.js' + } else if (files.includes(basename + '.js')) { + index = basename + '.js' + } else { + index = files[0] || 'index.js' + } - var index = f || 'index.js' - return cb(null, yes ? index : prompt('entry point', index)) - }) + return yes ? index : prompt('entry point', index) } } if (!package.bin) { - exports.bin = function (cb) { - fs.readdir(path.resolve(dirname, 'bin'), function (er, d) { - // no bins - if (er) { - return cb() - } + exports.bin = async () => { + try { + const d = await fs.readdir(path.resolve(dirname, 'bin')) // just take the first js file we find there, or nada let r = d.find(f => f.match(/\.js$/)) if (r) { r = `bin/${r}` } - return cb(null, r) - }) + return r + } catch { + // no bins + } } } -exports.directories = function (cb) { - fs.readdir(dirname, function (er, dirs) { - if (er) { - return cb(er) - } - var res = {} - dirs.forEach(function (d) { - switch (d) { - case 'example': case 'examples': return res.example = d - case 'test': case 'tests': return res.test = d - case 'doc': case 'docs': return res.doc = d - case 'man': return res.man = d - case 'lib': return res.lib = d - } - }) - if (Object.keys(res).length === 0) { - res = undefined +exports.directories = async () => { + const dirs = await fs.readdir(dirname) + + const res = dirs.reduce((acc, d) => { + if (/^examples?$/.test(d)) { + acc.example = d + } else if (/^tests?$/.test(d)) { + acc.test = d + } else if (/^docs?$/.test(d)) { + acc.doc = d + } else if (d === 'man') { + acc.man = d + } else if (d === 'lib') { + acc.lib = d } - return cb(null, res) - }) + + return acc + }, {}) + + return Object.keys(res).length === 0 ? undefined : res } if (!package.dependencies) { @@ -196,116 +166,97 @@ if (!package.devDependencies) { } // MUST have a test script! -var s = package.scripts || {} -var notest = 'echo "Error: no test specified" && exit 1' if (!package.scripts) { - exports.scripts = function (cb) { - fs.readdir(path.join(dirname, 'node_modules'), function (er, d) { - setupScripts(d || [], cb) - }) - } -} -function setupScripts (d, cb) { - // check to see what framework is in use, if any - function tx (test) { - return test || notest - } - if (!s.test || s.test === notest) { - var commands = { - tap: 'tap test/*.js', - expresso: 'expresso test', - mocha: 'mocha', - } - var command - Object.keys(commands).forEach(function (k) { - if (d.indexOf(k) !== -1) { - command = commands[k] + const scripts = package.scripts || {} + const notest = 'echo "Error: no test specified" && exit 1' + exports.scripts = async () => { + const d = await fs.readdir(path.join(dirname, 'node_modules')).catch(() => []) + + // check to see what framework is in use, if any + let command + if (!scripts.test || scripts.test === notest) { + const commands = { + tap: 'tap test/*.js', + expresso: 'expresso test', + mocha: 'mocha', + } + for (const [k, v] of Object.entries(commands)) { + if (d.includes(k)) { + command = v + } } - }) - var ps = 'test command' - if (yes) { - s.test = command || notest - } else { - s.test = command ? prompt(ps, command, tx) : prompt(ps, tx) } + + const promptArgs = ['test command', (t) => t || notest] + if (command) { + promptArgs.splice(1, 0, command) + } + scripts.test = yes ? command || notest : prompt(...promptArgs) + + return scripts } - return cb(null, s) } if (!package.repository) { - exports.repository = function (cb) { - fs.readFile('.git/config', 'utf8', function (er, gconf) { - if (er || !gconf) { - return cb(null, yes ? '' : prompt('git repository')) - } - gconf = gconf.split(/\r?\n/) - var i = gconf.indexOf('[remote "origin"]') - if (i !== -1) { - var u = gconf[i + 1] - if (!u.match(/^\s*url =/)) { - u = gconf[i + 2] - } - if (!u.match(/^\s*url =/)) { - u = null - } else { - u = u.replace(/^\s*url = /, '') - } + exports.repository = async () => { + const gconf = await fs.readFile('.git/config', 'utf8').catch(() => '') + const lines = gconf.split(/\r?\n/) + + let url + const i = lines.indexOf('[remote "origin"]') + + if (i !== -1) { + url = gconf[i + 1] + if (!url.match(/^\s*url =/)) { + url = gconf[i + 2] } - if (u && u.match(/^git@github.com:/)) { - u = u.replace(/^git@github.com:/, 'https://github.com/') + if (!url.match(/^\s*url =/)) { + url = null + } else { + url = url.replace(/^\s*url = /, '') } + } + + if (url && url.match(/^git@github.com:/)) { + url = url.replace(/^git@github.com:/, 'https://github.com/') + } - return cb(null, yes ? u : prompt('git repository', u)) - }) + return yes ? url || '' : prompt('git repository', url || undefined) } } if (!package.keywords) { - exports.keywords = yes ? '' : prompt('keywords', function (promptedKeywords) { - if (!promptedKeywords) { - return undefined + exports.keywords = yes ? '' : prompt('keywords', (data) => { + if (!data) { + return } - if (Array.isArray(promptedKeywords)) { - promptedKeywords = promptedKeywords.join(' ') + if (Array.isArray(data)) { + data = data.join(' ') } - if (typeof promptedKeywords !== 'string') { - return promptedKeywords + if (typeof data !== 'string') { + return data } - return promptedKeywords.split(/[\s,]+/) + return data.split(/[\s,]+/) }) } if (!package.author) { - exports.author = config.get('init.author.name') || - config.get('init-author-name') + const authorName = getConfig('author.name') + exports.author = authorName ? { - name: config.get('init.author.name') || - config.get('init-author-name'), - email: config.get('init.author.email') || - config.get('init-author-email'), - url: config.get('init.author.url') || - config.get('init-author-url'), + name: authorName, + email: getConfig('author.email'), + url: getConfig('author.url'), } : yes ? '' : prompt('author') } -const defaultDottedInitLicense = config && - config.defaults && - config.defaults['init.license'] -const dottedInitLicense = - config.get('init.license') !== defaultDottedInitLicense && - config.get('init.license') -var license = package.license || - dottedInitLicense || - config.get('init-license') || - 'ISC' -exports.license = yes ? license : prompt('license', license, function (data) { - var its = validateLicense(data) +const license = package.license || getConfig('license') || 'ISC' +exports.license = yes ? license : prompt('license', license, (data) => { + const its = validateLicense(data) if (its.validForNewPackages) { return data } - var errors = (its.errors || []).concat(its.warnings || []) - var er = new Error('Sorry, ' + errors.join(' and ') + '.') - er.notValid = true - return er + const errors = (its.errors || []).concat(its.warnings || []) + return invalid(`Sorry, ${errors.join(' and ')}.`) }) diff --git a/deps/npm/node_modules/init-package-json/lib/init-package-json.js b/deps/npm/node_modules/init-package-json/lib/init-package-json.js index 230bcd81747bdc..077ebd96ffc529 100644 --- a/deps/npm/node_modules/init-package-json/lib/init-package-json.js +++ b/deps/npm/node_modules/init-package-json/lib/init-package-json.js @@ -1,184 +1,145 @@ -module.exports = init -module.exports.yes = yes - -var PZ = require('promzard').PromZard -var path = require('path') -var def = require.resolve('./default-input.js') +const promzard = require('promzard') +const path = require('path') +const fs = require('fs/promises') +const semver = require('semver') +const read = require('read') +const util = require('util') +const rpj = require('read-package-json') -var fs = require('fs') -var semver = require('semver') -var read = require('read') +const def = require.resolve('./default-input.js') // to validate the data object at the end as a worthwhile package // and assign default values for things. -var readJson = require('read-package-json') +const _extraSet = rpj.extraSet +const _rpj = util.promisify(rpj) +const _rpjExtras = util.promisify(rpj.extras) +const readPkgJson = async (file, pkg) => { + // only do a few of these. no need for mans or contributors if they're in the files + rpj.extraSet = _extraSet.filter(f => f.name !== 'authors' && f.name !== 'mans') + const p = pkg ? _rpjExtras(file, pkg) : _rpj(file) + return p.catch(() => ({})).finally(() => rpj.extraSet = _extraSet) +} + +const isYes = (c) => !!(c.get('yes') || c.get('y') || c.get('force') || c.get('f')) + +const getConfig = (c = {}) => { + // accept either a plain-jane object, or a config object with a "get" method. + if (typeof c.get !== 'function') { + const data = c + return { + get: (k) => data[k], + toJSON: () => data, + } + } + return c +} -function yes (conf) { - return !!( - conf.get('yes') || conf.get('y') || - conf.get('force') || conf.get('f') - ) +const stringifyPerson = (p) => { + if (typeof p === 'string') { + return p + } + const { name = '', url, web, email, mail } = p + const u = url || web + const e = email || mail + return `${name}${e ? ` <${e}>` : ''}${u ? ` (${u})` : ''}` } -function init (dir, input, config, cb) { - if (typeof config === 'function') { - cb = config - config = {} +async function init (dir, input = def, c = {}) { + const config = getConfig(c) + const yes = isYes(config) + const packageFile = path.resolve(dir, 'package.json') + + const pkg = await readPkgJson(packageFile) + + if (!semver.valid(pkg.version)) { + delete pkg.version } - // accept either a plain-jane object, or a config object - // with a "get" method. - if (typeof config.get !== 'function') { - var data = config - config = { - get: function (k) { - return data[k] - }, - toJSON: function () { - return data - }, + // make sure that the input is valid. if not, use the default + const pzData = await promzard(path.resolve(input), { + yes, + config, + filename: packageFile, + dirname: path.dirname(packageFile), + basename: path.basename(path.dirname(packageFile)), + package: pkg, + }, { backupFile: def }) + + for (const [k, v] of Object.entries(pzData)) { + if (v != null) { + pkg[k] = v } } - var packageFile = path.resolve(dir, 'package.json') - input = path.resolve(input) - var pkg - var ctx = { yes: yes(config) } - - var es = readJson.extraSet - readJson.extraSet = es.filter(function (fn) { - return fn.name !== 'authors' && fn.name !== 'mans' - }) - readJson(packageFile, function (er, d) { - readJson.extraSet = es - - if (er) { - pkg = {} - } else { - pkg = d - } + const pkgExtras = await readPkgJson(packageFile, pkg) + + // turn the objects into somewhat more humane strings. + if (pkgExtras.author) { + pkgExtras.author = stringifyPerson(pkgExtras.author) + } - ctx.filename = packageFile - ctx.dirname = path.dirname(packageFile) - ctx.basename = path.basename(ctx.dirname) - if (!pkg.version || !semver.valid(pkg.version)) { - delete pkg.version + for (const set of ['maintainers', 'contributors']) { + if (Array.isArray(pkgExtras[set])) { + pkgExtras[set] = pkgExtras[set].map(stringifyPerson) } + } - ctx.package = pkg - ctx.config = config || {} - - // make sure that the input is valid. - // if not, use the default - var pz = new PZ(input, ctx) - pz.backupFile = def - pz.on('error', cb) - pz.on('data', function (pzData) { - Object.keys(pzData).forEach(function (k) { - if (pzData[k] !== undefined && pzData[k] !== null) { - pkg[k] = pzData[k] - } - }) - - // only do a few of these. - // no need for mans or contributors if they're in the files - es = readJson.extraSet - readJson.extraSet = es.filter(function (fn) { - return fn.name !== 'authors' && fn.name !== 'mans' - }) - readJson.extras(packageFile, pkg, function (extrasErr, pkgWithExtras) { - if (extrasErr) { - return cb(extrasErr, pkgWithExtras) - } - readJson.extraSet = es - pkgWithExtras = unParsePeople(pkgWithExtras) - // no need for the readme now. - delete pkgWithExtras.readme - delete pkgWithExtras.readmeFilename - - // really don't want to have this lying around in the file - delete pkgWithExtras._id - - // ditto - delete pkgWithExtras.gitHead - - // if the repo is empty, remove it. - if (!pkgWithExtras.repository) { - delete pkgWithExtras.repository - } - - // readJson filters out empty descriptions, but init-package-json - // traditionally leaves them alone - if (!pkgWithExtras.description) { - pkgWithExtras.description = pzData.description - } - - var stringified = JSON.stringify(updateDeps(pkgWithExtras), null, 2) + '\n' - function write (writeYes) { - fs.writeFile(packageFile, stringified, 'utf8', function (writeFileErr) { - if (!writeFileErr && writeYes && !config.get('silent')) { - console.log('Wrote to %s:\n\n%s\n', packageFile, stringified) - } - return cb(writeFileErr, pkgWithExtras) - }) - } - if (ctx.yes) { - return write(true) - } - console.log('About to write to %s:\n\n%s\n', packageFile, stringified) - read({ prompt: 'Is this OK? ', default: 'yes' }, function (promptErr, ok) { - if (promptErr) { - return cb(promptErr) - } - if (!ok || ok.toLowerCase().charAt(0) !== 'y') { - console.log('Aborted.') - } else { - return write() - } - }) - }) - }) - }) -} + // no need for the readme now. + delete pkgExtras.readme + delete pkgExtras.readmeFilename + + // really don't want to have this lying around in the file + delete pkgExtras._id + + // ditto + delete pkgExtras.gitHead + + // if the repo is empty, remove it. + if (!pkgExtras.repository) { + delete pkgExtras.repository + } + + // readJson filters out empty descriptions, but init-package-json + // traditionally leaves them alone + if (!pkgExtras.description) { + pkgExtras.description = pzData.description + } -function updateDeps (depsData) { // optionalDependencies don't need to be repeated in two places - if (depsData.dependencies) { - if (depsData.optionalDependencies) { - for (const name of Object.keys(depsData.optionalDependencies)) { - delete depsData.dependencies[name] + if (pkgExtras.dependencies) { + if (pkgExtras.optionalDependencies) { + for (const name of Object.keys(pkgExtras.optionalDependencies)) { + delete pkgExtras.dependencies[name] } } - if (Object.keys(depsData.dependencies).length === 0) { - delete depsData.dependencies + if (Object.keys(pkgExtras.dependencies).length === 0) { + delete pkgExtras.dependencies } } - return depsData -} + const stringified = JSON.stringify(pkgExtras, null, 2) + '\n' + const msg = util.format('%s:\n\n%s\n', packageFile, stringified) + const write = () => fs.writeFile(packageFile, stringified, 'utf8') -// turn the objects into somewhat more humane strings. -function unParsePeople (data) { - if (data.author) { - data.author = unParsePerson(data.author) - }['maintainers', 'contributors'].forEach(function (set) { - if (!Array.isArray(data[set])) { - return + if (yes) { + await write() + if (!config.get('silent')) { + console.log(`Wrote to ${msg}`) } - data[set] = data[set].map(unParsePerson) - }) - return data -} + return pkgExtras + } -function unParsePerson (person) { - if (typeof person === 'string') { - return person + console.log(`About to write to ${msg}`) + const ok = await read({ prompt: 'Is this OK? ', default: 'yes' }) + if (!ok || !ok.toLowerCase().startsWith('y')) { + console.log('Aborted.') + return } - var name = person.name || '' - var u = person.url || person.web - var url = u ? (' (' + u + ')') : '' - var e = person.email || person.mail - var email = e ? (' <' + e + '>') : '' - return name + email + url + + await write() + return pkgExtras } + +module.exports = init +module.exports.yes = isYes diff --git a/deps/npm/node_modules/init-package-json/package.json b/deps/npm/node_modules/init-package-json/package.json index 6641323e9f9c04..e2cb1fe25ebba7 100644 --- a/deps/npm/node_modules/init-package-json/package.json +++ b/deps/npm/node_modules/init-package-json/package.json @@ -1,6 +1,6 @@ { "name": "init-package-json", - "version": "4.0.1", + "version": "5.0.0", "main": "lib/init-package-json.js", "scripts": { "test": "tap", @@ -20,8 +20,8 @@ "description": "A node module to get your node module started", "dependencies": { "npm-package-arg": "^10.0.0", - "promzard": "^0.3.0", - "read": "^1.0.7", + "promzard": "^1.0.0", + "read": "^2.0.0", "read-package-json": "^6.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4", @@ -30,16 +30,18 @@ "devDependencies": { "@npmcli/config": "^6.0.0", "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.6.1", + "@npmcli/template-oss": "4.11.3", "tap": "^16.0.1" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "tap": { - "statements": "94", - "branches": "83", - "lines": "94", + "statements": 95, + "branches": 78, + "lines": 94, + "jobs": 1, + "test-ignore": "fixtures/", "nyc-arg": [ "--exclude", "tap-snapshots/**" @@ -61,6 +63,6 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.6.1" + "version": "4.11.3" } } diff --git a/deps/npm/node_modules/is-core-module/core.json b/deps/npm/node_modules/is-core-module/core.json index b1d7e46606b77e..d73579c43cbf31 100644 --- a/deps/npm/node_modules/is-core-module/core.json +++ b/deps/npm/node_modules/is-core-module/core.json @@ -57,6 +57,8 @@ "node:https": [">= 14.18 && < 15", ">= 16"], "inspector": ">= 8", "node:inspector": [">= 14.18 && < 15", ">= 16"], + "inspector/promises": [">= 19"], + "node:inspector/promises": [">= 19"], "_linklist": "< 8", "module": true, "node:module": [">= 14.18 && < 15", ">= 16"], diff --git a/deps/npm/node_modules/is-core-module/package.json b/deps/npm/node_modules/is-core-module/package.json index c2830d63202a9e..5c1a87142ba4bd 100644 --- a/deps/npm/node_modules/is-core-module/package.json +++ b/deps/npm/node_modules/is-core-module/package.json @@ -1,6 +1,6 @@ { "name": "is-core-module", - "version": "2.10.0", + "version": "2.11.0", "description": "Is this specifier a node.js core module?", "main": "index.js", "sideEffects": false, @@ -9,6 +9,7 @@ "./package.json": "./package.json" }, "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", "prepublish": "not-in-publish || npm run prepublishOnly", "prepublishOnly": "safe-publish-latest", "lint": "eslint .", @@ -45,14 +46,15 @@ }, "devDependencies": { "@ljharb/eslint-config": "^21.0.0", - "aud": "^2.0.0", + "aud": "^2.0.1", "auto-changelog": "^2.4.0", "eslint": "=8.8.0", "mock-property": "^1.0.0", + "npmignore": "^0.3.0", "nyc": "^10.3.2", "safe-publish-latest": "^2.0.0", "semver": "^6.3.0", - "tape": "^5.5.3" + "tape": "^5.6.1" }, "auto-changelog": { "output": "CHANGELOG.md", @@ -61,5 +63,10 @@ "commitLimit": false, "backfillLimit": false, "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github" + ] } } diff --git a/deps/npm/node_modules/just-diff-apply/index.js b/deps/npm/node_modules/just-diff-apply/index.cjs similarity index 100% rename from deps/npm/node_modules/just-diff-apply/index.js rename to deps/npm/node_modules/just-diff-apply/index.cjs diff --git a/deps/npm/node_modules/just-diff-apply/package.json b/deps/npm/node_modules/just-diff-apply/package.json index 5317303a8bd1b6..be2879aacfadc2 100644 --- a/deps/npm/node_modules/just-diff-apply/package.json +++ b/deps/npm/node_modules/just-diff-apply/package.json @@ -1,17 +1,17 @@ { "name": "just-diff-apply", - "version": "5.4.1", + "version": "5.5.0", "description": "Apply a diff to an object. Optionally supports jsonPatch protocol", - "main": "index.js", - "module": "index.mjs", + "type": "module", "exports": { ".": { - "require": "./index.js", "types": "./index.d.ts", - "default": "./index.mjs" + "require": "./index.cjs", + "import": "./index.mjs" }, "./package.json": "./package.json" }, + "main": "index.cjs", "types": "index.d.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", diff --git a/deps/npm/node_modules/just-diff/index.js b/deps/npm/node_modules/just-diff/index.cjs similarity index 100% rename from deps/npm/node_modules/just-diff/index.js rename to deps/npm/node_modules/just-diff/index.cjs diff --git a/deps/npm/node_modules/just-diff/package.json b/deps/npm/node_modules/just-diff/package.json index 035daf034fcc9e..4456df5db5215a 100644 --- a/deps/npm/node_modules/just-diff/package.json +++ b/deps/npm/node_modules/just-diff/package.json @@ -1,17 +1,17 @@ { "name": "just-diff", - "version": "5.1.1", + "version": "5.2.0", "description": "Return an object representing the diffs between two objects. Supports jsonPatch protocol", - "main": "index.js", - "module": "index.mjs", + "type": "module", "exports": { ".": { - "require": "./index.js", "types": "./index.d.ts", - "default": "./index.mjs" + "require": "./index.cjs", + "import": "./index.mjs" }, "./package.json": "./package.json" }, + "main": "index.cjs", "types": "index.d.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", diff --git a/deps/npm/node_modules/libnpmaccess/package.json b/deps/npm/node_modules/libnpmaccess/package.json index c16c640c5eb63f..ae4cb8b21eb4bb 100644 --- a/deps/npm/node_modules/libnpmaccess/package.json +++ b/deps/npm/node_modules/libnpmaccess/package.json @@ -1,6 +1,6 @@ { "name": "libnpmaccess", - "version": "7.0.1", + "version": "7.0.2", "description": "programmatic library for `npm access` commands", "author": "GitHub Inc.", "license": "ISC", @@ -17,9 +17,9 @@ "devDependencies": { "@npmcli/eslint-config": "^4.0.0", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.11.1", - "nock": "^13.2.4", - "tap": "^16.3.2" + "@npmcli/template-oss": "4.11.4", + "nock": "^13.3.0", + "tap": "^16.3.4" }, "repository": { "type": "git", @@ -41,7 +41,7 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1", + "version": "4.11.4", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmdiff/package.json b/deps/npm/node_modules/libnpmdiff/package.json index a1c261ba9dd308..1814f56957d119 100644 --- a/deps/npm/node_modules/libnpmdiff/package.json +++ b/deps/npm/node_modules/libnpmdiff/package.json @@ -1,6 +1,6 @@ { "name": "libnpmdiff", - "version": "5.0.8", + "version": "5.0.10", "description": "The registry diff", "repository": { "type": "git", @@ -32,7 +32,6 @@ ], "license": "ISC", "scripts": { - "eslint": "eslint", "lint": "eslint \"**/*.js\"", "lintfix": "node ../.. run lint -- --fix", "test": "tap", @@ -43,23 +42,23 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.11.1", - "tap": "^16.3.2" + "@npmcli/template-oss": "4.11.4", + "tap": "^16.3.4" }, "dependencies": { - "@npmcli/arborist": "^6.2.0", + "@npmcli/arborist": "^6.2.2", "@npmcli/disparity-colors": "^3.0.0", "@npmcli/installed-package-contents": "^2.0.0", "binary-extensions": "^2.2.0", "diff": "^5.1.0", - "minimatch": "^5.1.1", + "minimatch": "^6.1.6", "npm-package-arg": "^10.1.0", - "pacote": "^15.0.7", + "pacote": "^15.0.8", "tar": "^6.1.13" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1", + "version": "4.11.4", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmexec/lib/index.js b/deps/npm/node_modules/libnpmexec/lib/index.js index ea4ff5d5474240..719f81ec11d57b 100644 --- a/deps/npm/node_modules/libnpmexec/lib/index.js +++ b/deps/npm/node_modules/libnpmexec/lib/index.js @@ -1,8 +1,6 @@ 'use strict' const { mkdir } = require('fs/promises') -const { promisify } = require('util') - const Arborist = require('@npmcli/arborist') const ciInfo = require('ci-info') const crypto = require('crypto') @@ -10,7 +8,7 @@ const log = require('proc-log') const npa = require('npm-package-arg') const npmlog = require('npmlog') const pacote = require('pacote') -const read = promisify(require('read')) +const read = require('read') const semver = require('semver') const { fileExists, localFileExists } = require('./file-exists.js') diff --git a/deps/npm/node_modules/libnpmexec/package.json b/deps/npm/node_modules/libnpmexec/package.json index d91219b1beb444..6e3696a3a7d053 100644 --- a/deps/npm/node_modules/libnpmexec/package.json +++ b/deps/npm/node_modules/libnpmexec/package.json @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "5.0.8", + "version": "5.0.10", "files": [ "bin/", "lib/" @@ -52,31 +52,30 @@ "devDependencies": { "@npmcli/eslint-config": "^4.0.0", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.11.1", + "@npmcli/template-oss": "4.11.4", "bin-links": "^4.0.1", - "just-extend": "^6.1.1", - "just-safe-set": "^4.1.1", + "just-extend": "^6.2.0", + "just-safe-set": "^4.2.1", "minify-registry-metadata": "^3.0.0", - "mkdirp": "^1.0.4", - "tap": "^16.3.2" + "tap": "^16.3.4" }, "dependencies": { - "@npmcli/arborist": "^6.2.0", + "@npmcli/arborist": "^6.2.2", "@npmcli/run-script": "^6.0.0", "chalk": "^4.1.0", - "ci-info": "^3.7.0", + "ci-info": "^3.7.1", "npm-package-arg": "^10.1.0", "npmlog": "^7.0.1", - "pacote": "^15.0.7", + "pacote": "^15.0.8", "proc-log": "^3.0.0", - "read": "^1.0.7", - "read-package-json-fast": "^3.0.1", + "read": "^2.0.0", + "read-package-json-fast": "^3.0.2", "semver": "^7.3.7", "walk-up-path": "^1.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1", + "version": "4.11.4", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/libnpmfund/package.json b/deps/npm/node_modules/libnpmfund/package.json index f239951ef3a891..21dae2a78bd616 100644 --- a/deps/npm/node_modules/libnpmfund/package.json +++ b/deps/npm/node_modules/libnpmfund/package.json @@ -1,6 +1,6 @@ { "name": "libnpmfund", - "version": "4.0.8", + "version": "4.0.10", "main": "lib/index.js", "files": [ "bin/", @@ -31,7 +31,6 @@ ], "license": "ISC", "scripts": { - "eslint": "eslint", "lint": "eslint \"**/*.js\"", "lintfix": "node ../.. run lint -- --fix", "posttest": "node ../.. run lint", @@ -42,18 +41,18 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.11.1", - "tap": "^16.3.2" + "@npmcli/template-oss": "4.11.4", + "tap": "^16.3.4" }, "dependencies": { - "@npmcli/arborist": "^6.2.0" + "@npmcli/arborist": "^6.2.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1", + "version": "4.11.4", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmhook/package.json b/deps/npm/node_modules/libnpmhook/package.json index e1e55e02349859..493b64359cc220 100644 --- a/deps/npm/node_modules/libnpmhook/package.json +++ b/deps/npm/node_modules/libnpmhook/package.json @@ -1,6 +1,6 @@ { "name": "libnpmhook", - "version": "9.0.1", + "version": "9.0.3", "description": "programmatic API for managing npm registry hooks", "main": "lib/index.js", "files": [ @@ -8,8 +8,6 @@ "lib/" ], "scripts": { - "prerelease": "npm t", - "postrelease": "npm publish && git push --follow-tags", "test": "tap", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", @@ -37,16 +35,16 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.11.1", - "nock": "^13.2.4", - "tap": "^16.3.2" + "@npmcli/template-oss": "4.11.4", + "nock": "^13.3.0", + "tap": "^16.3.4" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1", + "version": "4.11.4", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmorg/package.json b/deps/npm/node_modules/libnpmorg/package.json index b8dacb4a646a18..97d957492eae91 100644 --- a/deps/npm/node_modules/libnpmorg/package.json +++ b/deps/npm/node_modules/libnpmorg/package.json @@ -1,6 +1,6 @@ { "name": "libnpmorg", - "version": "5.0.1", + "version": "5.0.3", "description": "Programmatic api for `npm org` commands", "author": "GitHub Inc.", "main": "lib/index.js", @@ -28,10 +28,10 @@ ], "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.11.1", - "minipass": "^4.0.0", - "nock": "^13.2.4", - "tap": "^16.3.2" + "@npmcli/template-oss": "4.11.4", + "minipass": "^4.0.2", + "nock": "^13.3.0", + "tap": "^16.3.4" }, "repository": { "type": "git", @@ -49,7 +49,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1", + "version": "4.11.4", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmpack/package.json b/deps/npm/node_modules/libnpmpack/package.json index 99b9259d8319d8..671e4b24720dbc 100644 --- a/deps/npm/node_modules/libnpmpack/package.json +++ b/deps/npm/node_modules/libnpmpack/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpack", - "version": "5.0.8", + "version": "5.0.10", "description": "Programmatic API for the bits behind npm pack", "author": "GitHub Inc.", "main": "lib/index.js", @@ -23,10 +23,10 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.11.1", - "nock": "^13.0.7", + "@npmcli/template-oss": "4.11.4", + "nock": "^13.3.0", "spawk": "^1.7.1", - "tap": "^16.3.2" + "tap": "^16.3.4" }, "repository": { "type": "git", @@ -36,17 +36,17 @@ "bugs": "https://github.com/npm/libnpmpack/issues", "homepage": "https://npmjs.com/package/libnpmpack", "dependencies": { - "@npmcli/arborist": "^6.2.0", + "@npmcli/arborist": "^6.2.2", "@npmcli/run-script": "^6.0.0", "npm-package-arg": "^10.1.0", - "pacote": "^15.0.7" + "pacote": "^15.0.8" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1", + "version": "4.11.4", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmpublish/lib/provenance.js b/deps/npm/node_modules/libnpmpublish/lib/provenance.js new file mode 100644 index 00000000000000..d11d210478b651 --- /dev/null +++ b/deps/npm/node_modules/libnpmpublish/lib/provenance.js @@ -0,0 +1,70 @@ +const { sigstore } = require('sigstore') + +const INTOTO_PAYLOAD_TYPE = 'application/vnd.in-toto+json' +const INTOTO_STATEMENT_TYPE = 'https://in-toto.io/Statement/v0.1' +const SLSA_PREDICATE_TYPE = 'https://slsa.dev/provenance/v0.2' + +const BUILDER_ID_PREFIX = 'https://github.com/npm/cli' +const BUILD_TYPE_PREFIX = 'https://github.com/npm/cli/gha' +const BUILD_TYPE_VERSION = 'v1' + +const generateProvenance = async (subject, opts) => { + const { env } = process + const payload = { + _type: INTOTO_STATEMENT_TYPE, + subject, + predicateType: SLSA_PREDICATE_TYPE, + predicate: { + buildType: `${BUILD_TYPE_PREFIX}@${BUILD_TYPE_VERSION}`, + builder: { id: `${BUILDER_ID_PREFIX}@${opts.npmVersion}` }, + invocation: { + configSource: { + uri: `git+${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}@${env.GITHUB_REF}`, + digest: { + sha1: env.GITHUB_SHA, + }, + entryPoint: env.GITHUB_WORKFLOW_REF, + }, + parameters: {}, + environment: { + GITHUB_ACTOR_ID: env.GITHUB_ACTOR_ID, + GITHUB_EVENT_NAME: env.GITHUB_EVENT_NAME, + GITHUB_REF: env.GITHUB_REF, + GITHUB_REF_TYPE: env.GITHUB_REF_TYPE, + GITHUB_REPOSITORY: env.GITHUB_REPOSITORY, + GITHUB_REPOSITORY_ID: env.GITHUB_REPOSITORY_ID, + GITHUB_REPOSITORY_OWNER_ID: env.GITHUB_REPOSITORY_OWNER_ID, + GITHUB_RUN_ATTEMPT: env.GITHUB_RUN_ATTEMPT, + GITHUB_RUN_ID: env.GITHUB_RUN_ID, + GITHUB_RUN_NUMBER: env.GITHUB_RUN_NUMBER, + GITHUB_SHA: env.GITHUB_SHA, + GITHUB_WORKFLOW_REF: env.GITHUB_WORKFLOW_REF, + GITHUB_WORKFLOW_SHA: env.GITHUB_WORKFLOW_SHA, + }, + }, + metadata: { + buildInvocationId: `${env.GITHUB_RUN_ID}-${env.GITHUB_RUN_ATTEMPT}`, + completeness: { + parameters: false, + environment: false, + materials: false, + }, + reproducible: false, + }, + materials: [ + { + uri: `git+${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}`, + digest: { + sha1: env.GITHUB_SHA, + }, + }, + ], + }, + } + + return sigstore.attest(Buffer.from(JSON.stringify(payload)), INTOTO_PAYLOAD_TYPE, opts) +} + +module.exports = { + generateProvenance, +} diff --git a/deps/npm/node_modules/libnpmpublish/lib/publish.js b/deps/npm/node_modules/libnpmpublish/lib/publish.js index 7d01fabf1f2b4d..353688a10eac19 100644 --- a/deps/npm/node_modules/libnpmpublish/lib/publish.js +++ b/deps/npm/node_modules/libnpmpublish/lib/publish.js @@ -4,6 +4,9 @@ const npa = require('npm-package-arg') const semver = require('semver') const { URL } = require('url') const ssri = require('ssri') +const ciInfo = require('ci-info') + +const { generateProvenance } = require('./provenance') const publish = async (manifest, tarballData, opts) => { if (manifest.private) { @@ -36,7 +39,7 @@ Remove the 'private' field from the package.json to publish it.`), ) } - const metadata = buildMetadata(reg, pubManifest, tarballData, opts) + const metadata = await buildMetadata(reg, pubManifest, tarballData, spec, opts) try { return await npmFetch(spec.escapedName, { @@ -89,8 +92,8 @@ const patchManifest = (_manifest, opts) => { return manifest } -const buildMetadata = (registry, manifest, tarballData, opts) => { - const { access, defaultTag, algorithms } = opts +const buildMetadata = async (registry, manifest, tarballData, spec, opts) => { + const { access, defaultTag, algorithms, provenance } = opts const root = { _id: manifest.name, name: manifest.name, @@ -105,6 +108,7 @@ const buildMetadata = (registry, manifest, tarballData, opts) => { root['dist-tags'][tag] = manifest.version const tarballName = `${manifest.name}-${manifest.version}.tgz` + const provenanceBundleName = `${manifest.name}-${manifest.version}.sigstore` const tarballURI = `${manifest.name}/-/${tarballName}` const integrity = ssri.fromData(tarballData, { algorithms: [...new Set(['sha1'].concat(algorithms))], @@ -130,6 +134,41 @@ const buildMetadata = (registry, manifest, tarballData, opts) => { length: tarballData.length, } + // Handle case where --provenance flag was set to true + if (provenance === true) { + const subject = { + name: npa.toPurl(spec), + digest: { sha512: integrity.sha512[0].hexDigest() }, + } + + // Ensure that we're running in GHA and an OIDC token is available, + // currently the only supported build environment + if (ciInfo.name !== 'GitHub Actions' || !process.env.ACTIONS_ID_TOKEN_REQUEST_URL) { + throw Object.assign( + new Error('Automatic provenance generation not supported outside of GitHub Actions'), + { code: 'EUSAGE' } + ) + } + + const visibility = + await npmFetch.json(`${registry}/-/package/${spec.escapedName}/visibility`, opts) + if (!visibility.public && opts.provenance === true && opts.access !== 'public') { + throw Object.assign( + /* eslint-disable-next-line max-len */ + new Error("Can't generate provenance for new or private package, you must set `access` to public."), + { code: 'EUSAGE' } + ) + } + const provenanceBundle = await generateProvenance([subject], opts) + + const serializedBundle = JSON.stringify(provenanceBundle) + root._attachments[provenanceBundleName] = { + content_type: provenanceBundle.mediaType, + data: serializedBundle, + length: serializedBundle.length, + } + } + return root } diff --git a/deps/npm/node_modules/libnpmpublish/package.json b/deps/npm/node_modules/libnpmpublish/package.json index 6c649507443149..1b6a53eae61561 100644 --- a/deps/npm/node_modules/libnpmpublish/package.json +++ b/deps/npm/node_modules/libnpmpublish/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpublish", - "version": "7.0.6", + "version": "7.1.0", "description": "Programmatic API for the bits behind npm publish and unpublish", "author": "GitHub Inc.", "main": "lib/index.js", @@ -14,7 +14,6 @@ ], "license": "ISC", "scripts": { - "eslint": "eslint", "lint": "eslint \"**/*.js\"", "lintfix": "node ../.. run lint -- --fix", "test": "tap", @@ -26,10 +25,10 @@ "devDependencies": { "@npmcli/eslint-config": "^4.0.0", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.11.1", + "@npmcli/template-oss": "4.11.4", "lodash.clonedeep": "^4.5.0", - "nock": "^13.2.4", - "tap": "^16.3.2" + "nock": "^13.3.0", + "tap": "^16.3.4" }, "repository": { "type": "git", @@ -39,10 +38,12 @@ "bugs": "https://github.com/npm/cli/issues", "homepage": "https://npmjs.com/package/libnpmpublish", "dependencies": { + "ci-info": "^3.6.1", "normalize-package-data": "^5.0.0", "npm-package-arg": "^10.1.0", "npm-registry-fetch": "^14.0.3", "semver": "^7.3.7", + "sigstore": "^1.0.0", "ssri": "^10.0.1" }, "engines": { @@ -50,7 +51,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1", + "version": "4.11.4", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmsearch/package.json b/deps/npm/node_modules/libnpmsearch/package.json index 4dcac9839e61ed..51e1d0adf9348f 100644 --- a/deps/npm/node_modules/libnpmsearch/package.json +++ b/deps/npm/node_modules/libnpmsearch/package.json @@ -1,6 +1,6 @@ { "name": "libnpmsearch", - "version": "6.0.1", + "version": "6.0.2", "description": "Programmatic API for searching in npm and compatible registries.", "author": "GitHub Inc.", "main": "lib/index.js", @@ -26,9 +26,9 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.11.1", - "nock": "^13.2.4", - "tap": "^16.3.2" + "@npmcli/template-oss": "4.11.4", + "nock": "^13.3.0", + "tap": "^16.3.4" }, "repository": { "type": "git", @@ -45,7 +45,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1", + "version": "4.11.4", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmteam/lib/index.js b/deps/npm/node_modules/libnpmteam/lib/index.js index 4b257ea850d6e7..9925d2c5c3bfde 100644 --- a/deps/npm/node_modules/libnpmteam/lib/index.js +++ b/deps/npm/node_modules/libnpmteam/lib/index.js @@ -20,15 +20,17 @@ cmd.create = (entity, opts = {}) => { }) } -cmd.destroy = (entity, opts = {}) => { +cmd.destroy = async (entity, opts = {}) => { const { scope, team } = splitEntity(entity) validate('SSO', [scope, team, opts]) const uri = `/-/team/${eu(scope)}/${eu(team)}` - return npmFetch.json(uri, { + await npmFetch(uri, { ...opts, method: 'DELETE', scope, + ignoreBody: true, }) + return true } cmd.add = (user, entity, opts = {}) => { @@ -43,16 +45,18 @@ cmd.add = (user, entity, opts = {}) => { }) } -cmd.rm = (user, entity, opts = {}) => { +cmd.rm = async (user, entity, opts = {}) => { const { scope, team } = splitEntity(entity) validate('SSO', [scope, team, opts]) const uri = `/-/team/${eu(scope)}/${eu(team)}/user` - return npmFetch.json(uri, { + await npmFetch(uri, { ...opts, method: 'DELETE', scope, body: { user }, + ignoreBody: true, }) + return true } cmd.lsTeams = (...args) => cmd.lsTeams.stream(...args).collect() diff --git a/deps/npm/node_modules/libnpmteam/package.json b/deps/npm/node_modules/libnpmteam/package.json index 38b08c83d7bcfb..4d98dc9dc52f32 100644 --- a/deps/npm/node_modules/libnpmteam/package.json +++ b/deps/npm/node_modules/libnpmteam/package.json @@ -1,7 +1,7 @@ { "name": "libnpmteam", "description": "npm Team management APIs", - "version": "5.0.1", + "version": "5.0.3", "author": "GitHub Inc.", "license": "ISC", "main": "lib/index.js", @@ -16,9 +16,9 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.11.1", - "nock": "^13.2.4", - "tap": "^16.3.2" + "@npmcli/template-oss": "4.11.4", + "nock": "^13.3.0", + "tap": "^16.3.4" }, "repository": { "type": "git", @@ -39,7 +39,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1", + "version": "4.11.4", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmversion/package.json b/deps/npm/node_modules/libnpmversion/package.json index c839a95fb9c137..8fce14cebff382 100644 --- a/deps/npm/node_modules/libnpmversion/package.json +++ b/deps/npm/node_modules/libnpmversion/package.json @@ -1,6 +1,6 @@ { "name": "libnpmversion", - "version": "4.0.1", + "version": "4.0.2", "main": "lib/index.js", "files": [ "bin/", @@ -32,9 +32,9 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.11.1", + "@npmcli/template-oss": "4.11.4", "require-inject": "^1.4.4", - "tap": "^16.3.2" + "tap": "^16.3.4" }, "dependencies": { "@npmcli/git": "^4.0.1", @@ -48,7 +48,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.1", + "version": "4.11.4", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/lru-cache/index.d.ts b/deps/npm/node_modules/lru-cache/index.d.ts index e5481b3f926376..ceed413c70919e 100644 --- a/deps/npm/node_modules/lru-cache/index.d.ts +++ b/deps/npm/node_modules/lru-cache/index.d.ts @@ -45,6 +45,7 @@ declare class LRUCache implements Iterable<[K, V]> { public readonly max: number public readonly maxSize: number + public readonly maxEntrySize: number public readonly sizeCalculation: | LRUCache.SizeCalculator | undefined @@ -320,6 +321,13 @@ declare namespace LRUCache { max: number } + type MaybeMaxEntrySizeLimit = + | { + maxEntrySize: number + sizeCalculation?: SizeCalculator + } + | {} + interface LimitedBySize { /** * If you wish to track item size, you must provide a maxSize @@ -507,7 +515,8 @@ declare namespace LRUCache { type Options = SharedOptions & DeprecatedOptions & - SafetyBounds + SafetyBounds & + MaybeMaxEntrySizeLimit /** * options which override the options set in the LRUCache constructor diff --git a/deps/npm/node_modules/lru-cache/index.js b/deps/npm/node_modules/lru-cache/index.js index 0a551c9d1d6f2c..fa53c12096cf64 100644 --- a/deps/npm/node_modules/lru-cache/index.js +++ b/deps/npm/node_modules/lru-cache/index.js @@ -157,6 +157,7 @@ class LRUCache { noDisposeOnSet, noUpdateTTL, maxSize = 0, + maxEntrySize = 0, sizeCalculation, fetchMethod, fetchContext, @@ -180,11 +181,12 @@ class LRUCache { this.max = max this.maxSize = maxSize + this.maxEntrySize = maxEntrySize || this.maxSize this.sizeCalculation = sizeCalculation || length if (this.sizeCalculation) { - if (!this.maxSize) { + if (!this.maxSize && !this.maxEntrySize) { throw new TypeError( - 'cannot set sizeCalculation without setting maxSize' + 'cannot set sizeCalculation without setting maxSize or maxEntrySize' ) } if (typeof this.sizeCalculation !== 'function') { @@ -231,10 +233,18 @@ class LRUCache { this.noUpdateTTL = !!noUpdateTTL this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection - if (this.maxSize !== 0) { - if (!isPosInt(this.maxSize)) { + // NB: maxEntrySize is set to maxSize if it's set + if (this.maxEntrySize !== 0) { + if (this.maxSize !== 0) { + if (!isPosInt(this.maxSize)) { + throw new TypeError( + 'maxSize must be a positive integer if specified' + ) + } + } + if (!isPosInt(this.maxEntrySize)) { throw new TypeError( - 'maxSize must be a positive integer if specified' + 'maxEntrySize must be a positive integer if specified' ) } this.initializeSizeTracking() @@ -369,6 +379,11 @@ class LRUCache { this.sizes[index] = 0 } this.requireSize = (k, v, size, sizeCalculation) => { + // provisionally accept background fetches. + // actual value size will be checked when they return. + if (this.isBackgroundFetch(v)) { + return 0 + } if (!isPosInt(size)) { if (sizeCalculation) { if (typeof sizeCalculation !== 'function') { @@ -390,9 +405,11 @@ class LRUCache { } this.addItemSize = (index, size) => { this.sizes[index] = size - const maxSize = this.maxSize - this.sizes[index] - while (this.calculatedSize > maxSize) { - this.evict(true) + if (this.maxSize) { + const maxSize = this.maxSize - this.sizes[index] + while (this.calculatedSize > maxSize) { + this.evict(true) + } } this.calculatedSize += this.sizes[index] } @@ -402,7 +419,7 @@ class LRUCache { requireSize(k, v, size, sizeCalculation) { if (size || sizeCalculation) { throw new TypeError( - 'cannot set size without setting maxSize on cache' + 'cannot set size without setting maxSize or maxEntrySize on cache' ) } } @@ -574,7 +591,11 @@ class LRUCache { ) { size = this.requireSize(k, v, size, sizeCalculation) // if the item doesn't fit, don't do anything - if (this.maxSize && size > this.maxSize) { + // NB: maxEntrySize set to maxSize by default + if (this.maxEntrySize && size > this.maxEntrySize) { + // have to delete, in case a background fetch is there already. + // in non-async cases, this is a no-op + this.delete(k) return this } let index = this.size === 0 ? undefined : this.keyMap.get(k) diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json index c3c62e0a3254e0..366ec03dfbc52f 100644 --- a/deps/npm/node_modules/lru-cache/package.json +++ b/deps/npm/node_modules/lru-cache/package.json @@ -1,7 +1,7 @@ { "name": "lru-cache", "description": "A cache object that deletes the least-recently-used items.", - "version": "7.13.2", + "version": "7.14.1", "author": "Isaac Z. Schlueter ", "keywords": [ "mru", diff --git a/deps/npm/node_modules/make-fetch-happen/package.json b/deps/npm/node_modules/make-fetch-happen/package.json index 1690c932f75cd2..7c340820f0c550 100644 --- a/deps/npm/node_modules/make-fetch-happen/package.json +++ b/deps/npm/node_modules/make-fetch-happen/package.json @@ -1,6 +1,6 @@ { "name": "make-fetch-happen", - "version": "11.0.2", + "version": "11.0.3", "description": "Opinionated, caching, retrying fetch client", "main": "lib/index.js", "files": [ @@ -35,13 +35,12 @@ "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", - "http-cache-semantics": "^4.1.0", + "http-cache-semantics": "^4.1.1", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", "lru-cache": "^7.7.1", "minipass": "^4.0.0", - "minipass-collect": "^1.0.2", "minipass-fetch": "^3.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", @@ -52,10 +51,8 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", - "mkdirp": "^1.0.4", + "@npmcli/template-oss": "4.11.3", "nock": "^13.2.4", - "rimraf": "^3.0.2", "safe-buffer": "^5.2.1", "standard-version": "^9.3.2", "tap": "^16.0.0" @@ -75,6 +72,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0" + "version": "4.11.3" } } diff --git a/deps/npm/node_modules/minimatch/LICENSE b/deps/npm/node_modules/minimatch/LICENSE index 9517b7d995bb03..1493534e60dce4 100644 --- a/deps/npm/node_modules/minimatch/LICENSE +++ b/deps/npm/node_modules/minimatch/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors +Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/deps/npm/node_modules/minimatch/dist/cjs/index-cjs.d.ts b/deps/npm/node_modules/minimatch/dist/cjs/index-cjs.d.ts new file mode 100644 index 00000000000000..29fdd1d95838fd --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/cjs/index-cjs.d.ts @@ -0,0 +1,35 @@ +declare const _default: { + (p: string, pattern: string, options?: import("./index.js").MinimatchOptions): boolean; + sep: string; + GLOBSTAR: typeof import("./index.js").GLOBSTAR; + filter: (pattern: string, options?: import("./index.js").MinimatchOptions) => (p: string) => boolean; + defaults: (def: import("./index.js").MinimatchOptions) => any; + braceExpand: (pattern: string, options?: import("./index.js").MinimatchOptions) => string[]; + makeRe: (pattern: string, options?: import("./index.js").MinimatchOptions) => false | import("./index.js").MMRegExp; + match: (list: string[], pattern: string, options?: import("./index.js").MinimatchOptions) => string[]; + Minimatch: typeof import("./index.js").Minimatch; +} & { + default: { + (p: string, pattern: string, options?: import("./index.js").MinimatchOptions): boolean; + sep: string; + GLOBSTAR: typeof import("./index.js").GLOBSTAR; + filter: (pattern: string, options?: import("./index.js").MinimatchOptions) => (p: string) => boolean; + defaults: (def: import("./index.js").MinimatchOptions) => any; + braceExpand: (pattern: string, options?: import("./index.js").MinimatchOptions) => string[]; + makeRe: (pattern: string, options?: import("./index.js").MinimatchOptions) => false | import("./index.js").MMRegExp; + match: (list: string[], pattern: string, options?: import("./index.js").MinimatchOptions) => string[]; + Minimatch: typeof import("./index.js").Minimatch; + }; + minimatch: { + (p: string, pattern: string, options?: import("./index.js").MinimatchOptions): boolean; + sep: string; + GLOBSTAR: typeof import("./index.js").GLOBSTAR; + filter: (pattern: string, options?: import("./index.js").MinimatchOptions) => (p: string) => boolean; + defaults: (def: import("./index.js").MinimatchOptions) => any; + braceExpand: (pattern: string, options?: import("./index.js").MinimatchOptions) => string[]; + makeRe: (pattern: string, options?: import("./index.js").MinimatchOptions) => false | import("./index.js").MMRegExp; + match: (list: string[], pattern: string, options?: import("./index.js").MinimatchOptions) => string[]; + Minimatch: typeof import("./index.js").Minimatch; + }; +}; +export = _default; diff --git a/deps/npm/node_modules/minimatch/dist/cjs/index-cjs.js b/deps/npm/node_modules/minimatch/dist/cjs/index-cjs.js new file mode 100644 index 00000000000000..db73b6b933a8a5 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/cjs/index-cjs.js @@ -0,0 +1,7 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const index_js_1 = __importDefault(require("./index.js")); +module.exports = Object.assign(index_js_1.default, { default: index_js_1.default, minimatch: index_js_1.default }); +//# sourceMappingURL=index-cjs.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/cjs/index-cjs.js.map b/deps/npm/node_modules/minimatch/dist/cjs/index-cjs.js.map new file mode 100644 index 00000000000000..1a054859a1341b --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/cjs/index-cjs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index-cjs.js","sourceRoot":"","sources":["../../src/index-cjs.ts"],"names":[],"mappings":";;;;AAAA,0DAAkC;AAElC,iBAAS,MAAM,CAAC,MAAM,CAAC,kBAAS,EAAE,EAAE,OAAO,EAAE,kBAAS,EAAE,SAAS,EAAT,kBAAS,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/cjs/index.d.ts b/deps/npm/node_modules/minimatch/dist/cjs/index.d.ts new file mode 100644 index 00000000000000..cca07a8280d896 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/cjs/index.d.ts @@ -0,0 +1,71 @@ +export interface MinimatchOptions { + nobrace?: boolean; + nocomment?: boolean; + nonegate?: boolean; + debug?: boolean; + noglobstar?: boolean; + noext?: boolean; + nonull?: boolean; + windowsPathsNoEscape?: boolean; + allowWindowsEscape?: boolean; + partial?: boolean; + dot?: boolean; + nocase?: boolean; + nocaseMagicOnly?: boolean; + matchBase?: boolean; + flipNegate?: boolean; + preserveMultipleSlashes?: boolean; +} +export declare const minimatch: { + (p: string, pattern: string, options?: MinimatchOptions): boolean; + sep: string; + GLOBSTAR: typeof GLOBSTAR; + filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean; + defaults: (def: MinimatchOptions) => typeof minimatch; + braceExpand: (pattern: string, options?: MinimatchOptions) => string[]; + makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp; + match: (list: string[], pattern: string, options?: MinimatchOptions) => string[]; + Minimatch: typeof Minimatch; +}; +export default minimatch; +export declare const sep: string; +export declare const GLOBSTAR: unique symbol; +export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean; +export declare const defaults: (def: MinimatchOptions) => typeof minimatch; +export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[]; +declare const SUBPARSE: unique symbol; +export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp; +export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[]; +export type MMRegExp = RegExp & { + _src?: string; + _glob?: string; +}; +type SubparseReturn = [string, boolean]; +type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR; +type ParseReturn = ParseReturnFiltered | false; +export declare class Minimatch { + options: MinimatchOptions; + set: ParseReturnFiltered[][]; + pattern: string; + windowsPathsNoEscape: boolean; + nonegate: boolean; + negate: boolean; + comment: boolean; + empty: boolean; + preserveMultipleSlashes: boolean; + partial: boolean; + globSet: string[]; + globParts: string[][]; + regexp: false | null | MMRegExp; + constructor(pattern: string, options?: MinimatchOptions); + debug(..._: any[]): void; + make(): void; + parseNegate(): void; + matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean; + braceExpand(): string[]; + parse(pattern: string, isSub?: typeof SUBPARSE): ParseReturn | SubparseReturn; + makeRe(): false | MMRegExp; + slashSplit(p: string): string[]; + match(f: string, partial?: boolean): boolean; + static defaults(def: MinimatchOptions): typeof Minimatch; +} diff --git a/deps/npm/node_modules/minimatch/dist/cjs/index.js b/deps/npm/node_modules/minimatch/dist/cjs/index.js new file mode 100644 index 00000000000000..63fc3bdd0b109a --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/cjs/index.js @@ -0,0 +1,1090 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; +const minimatch = (p, pattern, options = {}) => { + assertValidPattern(pattern); + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false; + } + return new Minimatch(pattern, options).match(p); +}; +exports.minimatch = minimatch; +exports.default = exports.minimatch; +// Optimized checking for the most common glob patterns. +const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; +const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); +const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); +const starDotExtTestNocase = (ext) => { + ext = ext.toLowerCase(); + return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext); +}; +const starDotExtTestNocaseDot = (ext) => { + ext = ext.toLowerCase(); + return (f) => f.toLowerCase().endsWith(ext); +}; +const starDotStarRE = /^\*+\.\*+$/; +const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.'); +const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.'); +const dotStarRE = /^\.\*+$/; +const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); +const starRE = /^\*+$/; +const starTest = (f) => f.length !== 0 && !f.startsWith('.'); +const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; +const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; +const qmarksTestNocase = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestNocaseDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTest = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTestNoExt = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && !f.startsWith('.'); +}; +const qmarksTestNoExtDot = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && f !== '.' && f !== '..'; +}; +/* c8 ignore start */ +const platform = typeof process === 'object' && process + ? (typeof process.env === 'object' && + process.env && + process.env.__MINIMATCH_TESTING_PLATFORM__) || + process.platform + : 'posix'; +const isWindows = platform === 'win32'; +const path = isWindows ? { sep: '\\' } : { sep: '/' }; +/* c8 ignore stop */ +exports.sep = path.sep; +exports.minimatch.sep = exports.sep; +exports.GLOBSTAR = Symbol('globstar **'); +exports.minimatch.GLOBSTAR = exports.GLOBSTAR; +const brace_expansion_1 = __importDefault(require("brace-expansion")); +const plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)' }, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' }, +}; +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; +// "abc" -> { a:true, b:true, c:true } +const charSet = (s) => s.split('').reduce((set, c) => { + set[c] = true; + return set; +}, {}); +// characters that need to be escaped in RegExp. +const reSpecials = charSet('().*{}+?[]^$\\!'); +// characters that indicate we have to add the pattern start +const addPatternStartSet = charSet('[.('); +const filter = (pattern, options = {}) => (p) => (0, exports.minimatch)(p, pattern, options); +exports.filter = filter; +exports.minimatch.filter = exports.filter; +const ext = (a, b = {}) => Object.assign({}, a, b); +const defaults = (def) => { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return exports.minimatch; + } + const orig = exports.minimatch; + const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); + return Object.assign(m, { + Minimatch: class Minimatch extends orig.Minimatch { + constructor(pattern, options = {}) { + super(pattern, ext(def, options)); + } + static defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + } + }, + filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), + defaults: (options) => orig.defaults(ext(def, options)), + makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), + braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), + match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), + sep: orig.sep, + GLOBSTAR: exports.GLOBSTAR, + }); +}; +exports.defaults = defaults; +exports.minimatch.defaults = exports.defaults; +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +const braceExpand = (pattern, options = {}) => { + assertValidPattern(pattern); + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern]; + } + return (0, brace_expansion_1.default)(pattern); +}; +exports.braceExpand = braceExpand; +exports.minimatch.braceExpand = exports.braceExpand; +const MAX_PATTERN_LENGTH = 1024 * 64; +const assertValidPattern = (pattern) => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern'); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long'); + } +}; +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +const SUBPARSE = Symbol('subparse'); +const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); +exports.makeRe = makeRe; +exports.minimatch.makeRe = exports.makeRe; +const match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter(f => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; +}; +exports.match = match; +exports.minimatch.match = exports.match; +// replace stuff like \* with * +const globUnescape = (s) => s.replace(/\\(.)/g, '$1'); +const charUnescape = (s) => s.replace(/\\([^-\]])/g, '$1'); +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +const braExpEscape = (s) => s.replace(/[[\]\\]/g, '\\$&'); +class Minimatch { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + regexp; + constructor(pattern, options = {}) { + assertValidPattern(pattern); + options = options || {}; + this.options = options; + this.pattern = pattern; + this.windowsPathsNoEscape = + !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, '/'); + } + this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; + this.regexp = null; + this.negate = false; + this.nonegate = !!options.nonegate; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.globSet = []; + this.globParts = []; + this.set = []; + // make the set of regexps etc. + this.make(); + } + debug(..._) { } + make() { + const pattern = this.pattern; + const options = this.options; + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + // step 1: figure out negation, etc. + this.parseNegate(); + // step 2: expand braces + this.globSet = this.braceExpand(); + if (options.debug) { + this.debug = (...args) => console.error(...args); + } + this.debug(this.pattern, this.globSet); + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + const rawGlobParts = this.globSet.map(s => this.slashSplit(s)); + // consecutive globstars are an unncessary perf killer + // also, **/*/... is equivalent to */**/..., so swap all of those + // this turns a pattern like **/*/**/*/x into */*/**/x + // and a pattern like **/x/**/*/y becomes **/x/*/**/y + // the *later* we can push the **, the more efficient it is, + // because we can avoid having to do a recursive walk until + // the walked tree is as shallow as possible. + // Note that this is only true up to the last pattern, though, because + // a/*/** will only match a/b if b is a dir, but a/**/* will match a/b + // regardless, since it's "0 or more path segments" if it's not final. + if (this.options.noglobstar) { + // ** is * anyway + this.globParts = rawGlobParts; + } + else { + // do this swap BEFORE the reduce, so that we can turn a string + // of **/*/**/* into */*/**/** and then reduce the **'s into one + for (const parts of rawGlobParts) { + let swapped; + do { + swapped = false; + for (let i = 0; i < parts.length - 1; i++) { + if (parts[i] === '*' && parts[i - 1] === '**') { + parts[i] = '**'; + parts[i - 1] = '*'; + swapped = true; + } + } + } while (swapped); + } + this.globParts = rawGlobParts.map(parts => { + parts = parts.reduce((set, part) => { + const prev = set[set.length - 1]; + if (part === '**' && prev === '**') { + return set; + } + if (part === '..') { + if (prev && prev !== '..' && prev !== '.' && prev !== '**') { + set.pop(); + return set; + } + } + set.push(part); + return set; + }, []); + return parts.length === 0 ? [''] : parts; + }); + } + this.debug(this.pattern, this.globParts); + // glob --> regexps + let set = this.globParts.map((s, _, __) => s.map(ss => this.parse(ss))); + this.debug(this.pattern, set); + // filter out everything that didn't compile properly. + this.set = set.filter(s => s.indexOf(false) === -1); + // do not treat the ? in UNC paths as magic + if (isWindows) { + for (let i = 0; i < this.set.length; i++) { + const p = this.set[i]; + if (p[0] === '' && + p[1] === '' && + this.globParts[i][2] === '?' && + typeof p[3] === 'string' && + /^[a-z]:$/i.test(p[3])) { + p[2] = '?'; + } + } + } + this.debug(this.pattern, this.set); + } + parseNegate() { + if (this.nonegate) + return; + const pattern = this.pattern; + let negate = false; + let negateOffset = 0; + for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) + this.pattern = pattern.slice(negateOffset); + this.negate = negate; + } + // set partial to true to test if, for example, + // "/a/b" matches the start of "/*/b/*/d" + // Partial means, if you run out of file before you run + // out of pattern, then that's fine, as long as all + // the parts match. + matchOne(file, pattern, partial = false) { + const options = this.options; + // a UNC pattern like //?/c:/* can match a path like c:/x + // and vice versa + if (isWindows) { + const fileUNC = file[0] === '' && + file[1] === '' && + file[2] === '?' && + typeof file[3] === 'string' && + /^[a-z]:$/i.test(file[3]); + const patternUNC = pattern[0] === '' && + pattern[1] === '' && + pattern[2] === '?' && + typeof pattern[3] === 'string' && + /^[a-z]:$/i.test(pattern[3]); + if (fileUNC && patternUNC) { + const fd = file[3]; + const pd = pattern[3]; + if (fd.toLowerCase() === pd.toLowerCase()) { + file[3] = pd; + } + } + else if (patternUNC && typeof file[0] === 'string') { + const pd = pattern[3]; + const fd = file[0]; + if (pd.toLowerCase() === fd.toLowerCase()) { + pattern[3] = fd; + pattern = pattern.slice(3); + } + } + else if (fileUNC && typeof pattern[0] === 'string') { + const fd = file[3]; + if (fd.toLowerCase() === pattern[0].toLowerCase()) { + pattern[0] = fd; + file = file.slice(3); + } + } + } + this.debug('matchOne', this, { file, pattern }); + this.debug('matchOne', file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug('matchOne loop'); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + // should be impossible. + // some invalid regexp stuff in the set. + /* c8 ignore start */ + if (p === false) { + return false; + } + /* c8 ignore stop */ + if (p === exports.GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]); + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug('** at the end'); + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || + file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) + return false; + } + return true; + } + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr]; + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee); + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee); + // found a match. + return true; + } + else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || + swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr); + break; + } + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue'); + fr++; + } + } + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + /* c8 ignore start */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr); + if (fr === fl) { + return true; + } + } + /* c8 ignore stop */ + return false; + } + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + let hit; + if (typeof p === 'string') { + hit = f === p; + this.debug('string match', p, f, hit); + } + else { + hit = p.test(f); + this.debug('pattern match', p, f, hit); + } + if (!hit) + return false; + } + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true; + } + else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial; + } + else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return fi === fl - 1 && file[fi] === ''; + /* c8 ignore start */ + } + else { + // should be unreachable. + throw new Error('wtf?'); + } + /* c8 ignore stop */ + } + braceExpand() { + return (0, exports.braceExpand)(this.pattern, this.options); + } + parse(pattern, isSub) { + assertValidPattern(pattern); + const options = this.options; + // shortcuts + if (pattern === '**') { + if (!options.noglobstar) + return exports.GLOBSTAR; + else + pattern = '*'; + } + if (pattern === '') + return ''; + // far and away, the most common glob pattern parts are + // *, *.*, and *. Add a fast check method for those. + let m; + let fastTest = null; + if (isSub !== SUBPARSE) { + if ((m = pattern.match(starRE))) { + fastTest = options.dot ? starTestDot : starTest; + } + else if ((m = pattern.match(starDotExtRE))) { + fastTest = (options.nocase + ? options.dot + ? starDotExtTestNocaseDot + : starDotExtTestNocase + : options.dot + ? starDotExtTestDot + : starDotExtTest)(m[1]); + } + else if ((m = pattern.match(qmarksRE))) { + fastTest = (options.nocase + ? options.dot + ? qmarksTestNocaseDot + : qmarksTestNocase + : options.dot + ? qmarksTestDot + : qmarksTest)(m); + } + else if ((m = pattern.match(starDotStarRE))) { + fastTest = options.dot ? starDotStarTestDot : starDotStarTest; + } + else if ((m = pattern.match(dotStarRE))) { + fastTest = dotStarTest; + } + } + let re = ''; + let hasMagic = false; + let escaping = false; + // ? => one single character + const patternListStack = []; + const negativeLists = []; + let stateChar = false; + let inClass = false; + let reClassStart = -1; + let classStart = -1; + let cs; + let pl; + let sp; + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. However, if the pattern + // starts with ., then traversal patterns can match. + let dotTravAllowed = pattern.charAt(0) === '.'; + let dotFileAllowed = options.dot || dotTravAllowed; + const patternStart = () => dotTravAllowed + ? '' + : dotFileAllowed + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)'; + const subPatternStart = (p) => p.charAt(0) === '.' + ? '' + : options.dot + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)'; + const clearStateChar = () => { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star; + hasMagic = true; + break; + case '?': + re += qmark; + hasMagic = true; + break; + default: + re += '\\' + stateChar; + break; + } + this.debug('clearStateChar %j %j', stateChar, re); + stateChar = false; + } + }; + for (let i = 0, c; i < pattern.length && (c = pattern.charAt(i)); i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c); + // skip over any that are escaped. + if (escaping) { + // completely not allowed, even escaped. + // should be impossible. + /* c8 ignore start */ + if (c === '/') { + return false; + } + /* c8 ignore stop */ + if (reSpecials[c]) { + re += '\\'; + } + re += c; + escaping = false; + continue; + } + switch (c) { + // Should already be path-split by now. + /* c8 ignore start */ + case '/': { + return false; + } + /* c8 ignore stop */ + case '\\': + if (inClass && pattern.charAt(i + 1) === '-') { + re += c; + continue; + } + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c); + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class'); + if (c === '!' && i === classStart + 1) + c = '^'; + re += c; + continue; + } + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + this.debug('call clearStateChar %j', stateChar); + clearStateChar(); + stateChar = c; + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) + clearStateChar(); + continue; + case '(': { + if (inClass) { + re += '('; + continue; + } + if (!stateChar) { + re += '\\('; + continue; + } + const plEntry = { + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close, + }; + this.debug(this.pattern, '\t', plEntry); + patternListStack.push(plEntry); + // negation is (?:(?!(?:js)(?:))[^/]*) + re += plEntry.open; + // next entry starts with a dot maybe? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + this.debug('plType %j %j', stateChar, re); + stateChar = false; + continue; + } + case ')': { + const plEntry = patternListStack[patternListStack.length - 1]; + if (inClass || !plEntry) { + re += '\\)'; + continue; + } + patternListStack.pop(); + // closing an extglob + clearStateChar(); + hasMagic = true; + pl = plEntry; + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close; + if (pl.type === '!') { + negativeLists.push(Object.assign(pl, { reEnd: re.length })); + } + continue; + } + case '|': { + const plEntry = patternListStack[patternListStack.length - 1]; + if (inClass || !plEntry) { + re += '\\|'; + continue; + } + clearStateChar(); + re += '|'; + // next subpattern can start with a dot? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + continue; + } + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar(); + if (inClass) { + re += '\\' + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c; + continue; + } + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + cs = pattern.substring(classStart + 1, i); + try { + RegExp('[' + braExpEscape(charUnescape(cs)) + ']'); + // looks good, finish up the class. + re += c; + } + catch (er) { + // out of order ranges in JS are errors, but in glob syntax, + // they're just a range that matches nothing. + re = re.substring(0, reClassStart) + '(?:$.)'; // match nothing ever + } + hasMagic = true; + inClass = false; + continue; + default: + // swallow any state char that wasn't consumed + clearStateChar(); + if (reSpecials[c] && !(c === '^' && inClass)) { + re += '\\'; + } + re += c; + break; + } // switch + } // for + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.slice(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substring(0, reClassStart) + '\\[' + sp[0]; + hasMagic = hasMagic || sp[1]; + } + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + let tail; + tail = re.slice(pl.reStart + pl.open.length); + this.debug(this.pattern, 'setting tail', re, pl); + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\'; + // should already be done + /* c8 ignore start */ + } + /* c8 ignore stop */ + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|'; + }); + this.debug('tail=%j\n %s', tail, tail, pl, re); + const t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + '\\(' + tail; + } + // handle trailing things that only matter at the very end. + clearStateChar(); + if (escaping) { + // trailing \\ + re += '\\\\'; + } + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + const addPatternStart = addPatternStartSet[re.charAt(0)]; + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (let n = negativeLists.length - 1; n > -1; n--) { + const nl = negativeLists[n]; + const nlBefore = re.slice(0, nl.reStart); + const nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + let nlAfter = re.slice(nl.reEnd); + const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter; + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + const closeParensBefore = nlBefore.split(')').length; + const openParensBefore = nlBefore.split('(').length - closeParensBefore; + let cleanAfter = nlAfter; + for (let i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ''); + } + nlAfter = cleanAfter; + const dollar = nlAfter === '' && isSub !== SUBPARSE ? '(?:$|\\/)' : ''; + re = nlBefore + nlFirst + nlAfter + dollar + nlLast; + } + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re; + } + if (addPatternStart) { + re = patternStart() + re; + } + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + // if it's nocase, and the lcase/uppercase don't match, it's magic + if (options.nocase && !hasMagic && !options.nocaseMagicOnly) { + hasMagic = pattern.toUpperCase() !== pattern.toLowerCase(); + } + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern); + } + const flags = options.nocase ? 'i' : ''; + try { + const ext = fastTest + ? { + _glob: pattern, + _src: re, + test: fastTest, + } + : { + _glob: pattern, + _src: re, + }; + return Object.assign(new RegExp('^' + re + '$', flags), ext); + /* c8 ignore start */ + } + catch (er) { + // should be impossible + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + this.debug('invalid regexp', er); + return new RegExp('$.'); + } + /* c8 ignore stop */ + } + makeRe() { + if (this.regexp || this.regexp === false) + return this.regexp; + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + const set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + const options = this.options; + const twoStar = options.noglobstar + ? star + : options.dot + ? twoStarDot + : twoStarNoDot; + const flags = options.nocase ? 'i' : ''; + // regexpify non-globstar patterns + // if ** is only item, then we just do one twoStar + // if ** is first, and there are more, prepend (\/|twoStar\/)? to next + // if ** is last, append (\/twoStar|) to previous + // if ** is in the middle, append (\/|\/twoStar\/) to previous + // then filter out GLOBSTAR symbols + let re = set + .map(pattern => { + const pp = pattern.map(p => typeof p === 'string' + ? regExpEscape(p) + : p === exports.GLOBSTAR + ? exports.GLOBSTAR + : p._src); + pp.forEach((p, i) => { + const next = pp[i + 1]; + const prev = pp[i - 1]; + if (p !== exports.GLOBSTAR || prev === exports.GLOBSTAR) { + return; + } + if (prev === undefined) { + if (next !== undefined && next !== exports.GLOBSTAR) { + pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next; + } + else { + pp[i] = twoStar; + } + } + else if (next === undefined) { + pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?'; + } + else if (next !== exports.GLOBSTAR) { + pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next; + pp[i + 1] = exports.GLOBSTAR; + } + }); + return pp.filter(p => p !== exports.GLOBSTAR).join('/'); + }) + .join('|'); + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$'; + // can match anything, as long as it's not this. + if (this.negate) + re = '^(?!' + re + ').*$'; + try { + this.regexp = new RegExp(re, flags); + /* c8 ignore start */ + } + catch (ex) { + // should be impossible + this.regexp = false; + } + /* c8 ignore stop */ + return this.regexp; + } + slashSplit(p) { + // if p starts with // on windows, we preserve that + // so that UNC paths aren't broken. Otherwise, any number of + // / characters are coalesced into one, unless + // preserveMultipleSlashes is set to true. + if (this.preserveMultipleSlashes) { + return p.split('/'); + } + else if (isWindows && /^\/\/[^\/]+/.test(p)) { + // add an extra '' for the one we lose + return ['', ...p.split(/\/+/)]; + } + else { + return p.split(/\/+/); + } + } + match(f, partial = this.partial) { + this.debug('match', f, this.pattern); + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) { + return false; + } + if (this.empty) { + return f === ''; + } + if (f === '/' && partial) { + return true; + } + const options = this.options; + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/'); + } + // treat the test path as a set of pathparts. + const ff = this.slashSplit(f); + this.debug(this.pattern, 'split', ff); + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + const set = this.set; + this.debug(this.pattern, 'set', set); + // Find the basename of the path by looking for the last non-empty segment + let filename = ff[ff.length - 1]; + if (!filename) { + for (let i = ff.length - 2; !filename && i >= 0; i--) { + filename = ff[i]; + } + } + for (let i = 0; i < set.length; i++) { + const pattern = set[i]; + let file = ff; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + const hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) { + return true; + } + return !this.negate; + } + } + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) { + return false; + } + return this.negate; + } + static defaults(def) { + return exports.minimatch.defaults(def).Minimatch; + } +} +exports.Minimatch = Minimatch; +exports.minimatch.Minimatch = Minimatch; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/cjs/index.js.map b/deps/npm/node_modules/minimatch/dist/cjs/index.js.map new file mode 100644 index 00000000000000..0f561db44c2027 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/cjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAmBO,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QACnD,OAAO,KAAK,CAAA;KACb;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC,CAAA;AAbY,QAAA,SAAS,aAarB;AAED,kBAAe,iBAAS,CAAA;AAExB,wDAAwD;AACxD,MAAM,YAAY,GAAG,uBAAuB,CAAA;AAC5C,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CACpD,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACvC,MAAM,iBAAiB,GAAG,CAAC,GAAW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,SAAS,CAAA;IAC1C,CAAC;CACF;AAt+BD,8BAs+BC;AAED,iBAAS,CAAC,SAAS,GAAG,SAAS,CAAA"} \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/cjs/package.json b/deps/npm/node_modules/minimatch/dist/cjs/package.json new file mode 100644 index 00000000000000..5bbefffbabee39 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/cjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/deps/npm/node_modules/minimatch/dist/mjs/index.d.ts b/deps/npm/node_modules/minimatch/dist/mjs/index.d.ts new file mode 100644 index 00000000000000..cca07a8280d896 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/mjs/index.d.ts @@ -0,0 +1,71 @@ +export interface MinimatchOptions { + nobrace?: boolean; + nocomment?: boolean; + nonegate?: boolean; + debug?: boolean; + noglobstar?: boolean; + noext?: boolean; + nonull?: boolean; + windowsPathsNoEscape?: boolean; + allowWindowsEscape?: boolean; + partial?: boolean; + dot?: boolean; + nocase?: boolean; + nocaseMagicOnly?: boolean; + matchBase?: boolean; + flipNegate?: boolean; + preserveMultipleSlashes?: boolean; +} +export declare const minimatch: { + (p: string, pattern: string, options?: MinimatchOptions): boolean; + sep: string; + GLOBSTAR: typeof GLOBSTAR; + filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean; + defaults: (def: MinimatchOptions) => typeof minimatch; + braceExpand: (pattern: string, options?: MinimatchOptions) => string[]; + makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp; + match: (list: string[], pattern: string, options?: MinimatchOptions) => string[]; + Minimatch: typeof Minimatch; +}; +export default minimatch; +export declare const sep: string; +export declare const GLOBSTAR: unique symbol; +export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean; +export declare const defaults: (def: MinimatchOptions) => typeof minimatch; +export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[]; +declare const SUBPARSE: unique symbol; +export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp; +export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[]; +export type MMRegExp = RegExp & { + _src?: string; + _glob?: string; +}; +type SubparseReturn = [string, boolean]; +type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR; +type ParseReturn = ParseReturnFiltered | false; +export declare class Minimatch { + options: MinimatchOptions; + set: ParseReturnFiltered[][]; + pattern: string; + windowsPathsNoEscape: boolean; + nonegate: boolean; + negate: boolean; + comment: boolean; + empty: boolean; + preserveMultipleSlashes: boolean; + partial: boolean; + globSet: string[]; + globParts: string[][]; + regexp: false | null | MMRegExp; + constructor(pattern: string, options?: MinimatchOptions); + debug(..._: any[]): void; + make(): void; + parseNegate(): void; + matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean; + braceExpand(): string[]; + parse(pattern: string, isSub?: typeof SUBPARSE): ParseReturn | SubparseReturn; + makeRe(): false | MMRegExp; + slashSplit(p: string): string[]; + match(f: string, partial?: boolean): boolean; + static defaults(def: MinimatchOptions): typeof Minimatch; +} diff --git a/deps/npm/node_modules/minimatch/dist/mjs/index.js b/deps/npm/node_modules/minimatch/dist/mjs/index.js new file mode 100644 index 00000000000000..59ac1968b5ded3 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/mjs/index.js @@ -0,0 +1,1077 @@ +export const minimatch = (p, pattern, options = {}) => { + assertValidPattern(pattern); + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false; + } + return new Minimatch(pattern, options).match(p); +}; +export default minimatch; +// Optimized checking for the most common glob patterns. +const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; +const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); +const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); +const starDotExtTestNocase = (ext) => { + ext = ext.toLowerCase(); + return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext); +}; +const starDotExtTestNocaseDot = (ext) => { + ext = ext.toLowerCase(); + return (f) => f.toLowerCase().endsWith(ext); +}; +const starDotStarRE = /^\*+\.\*+$/; +const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.'); +const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.'); +const dotStarRE = /^\.\*+$/; +const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); +const starRE = /^\*+$/; +const starTest = (f) => f.length !== 0 && !f.startsWith('.'); +const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; +const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; +const qmarksTestNocase = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestNocaseDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTest = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTestNoExt = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && !f.startsWith('.'); +}; +const qmarksTestNoExtDot = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && f !== '.' && f !== '..'; +}; +/* c8 ignore start */ +const platform = typeof process === 'object' && process + ? (typeof process.env === 'object' && + process.env && + process.env.__MINIMATCH_TESTING_PLATFORM__) || + process.platform + : 'posix'; +const isWindows = platform === 'win32'; +const path = isWindows ? { sep: '\\' } : { sep: '/' }; +/* c8 ignore stop */ +export const sep = path.sep; +minimatch.sep = sep; +export const GLOBSTAR = Symbol('globstar **'); +minimatch.GLOBSTAR = GLOBSTAR; +import expand from 'brace-expansion'; +const plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)' }, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' }, +}; +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; +// "abc" -> { a:true, b:true, c:true } +const charSet = (s) => s.split('').reduce((set, c) => { + set[c] = true; + return set; +}, {}); +// characters that need to be escaped in RegExp. +const reSpecials = charSet('().*{}+?[]^$\\!'); +// characters that indicate we have to add the pattern start +const addPatternStartSet = charSet('[.('); +export const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options); +minimatch.filter = filter; +const ext = (a, b = {}) => Object.assign({}, a, b); +export const defaults = (def) => { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch; + } + const orig = minimatch; + const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); + return Object.assign(m, { + Minimatch: class Minimatch extends orig.Minimatch { + constructor(pattern, options = {}) { + super(pattern, ext(def, options)); + } + static defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + } + }, + filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), + defaults: (options) => orig.defaults(ext(def, options)), + makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), + braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), + match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), + sep: orig.sep, + GLOBSTAR: GLOBSTAR, + }); +}; +minimatch.defaults = defaults; +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +export const braceExpand = (pattern, options = {}) => { + assertValidPattern(pattern); + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern]; + } + return expand(pattern); +}; +minimatch.braceExpand = braceExpand; +const MAX_PATTERN_LENGTH = 1024 * 64; +const assertValidPattern = (pattern) => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern'); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long'); + } +}; +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +const SUBPARSE = Symbol('subparse'); +export const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); +minimatch.makeRe = makeRe; +export const match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter(f => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; +}; +minimatch.match = match; +// replace stuff like \* with * +const globUnescape = (s) => s.replace(/\\(.)/g, '$1'); +const charUnescape = (s) => s.replace(/\\([^-\]])/g, '$1'); +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +const braExpEscape = (s) => s.replace(/[[\]\\]/g, '\\$&'); +export class Minimatch { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + regexp; + constructor(pattern, options = {}) { + assertValidPattern(pattern); + options = options || {}; + this.options = options; + this.pattern = pattern; + this.windowsPathsNoEscape = + !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, '/'); + } + this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; + this.regexp = null; + this.negate = false; + this.nonegate = !!options.nonegate; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.globSet = []; + this.globParts = []; + this.set = []; + // make the set of regexps etc. + this.make(); + } + debug(..._) { } + make() { + const pattern = this.pattern; + const options = this.options; + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + // step 1: figure out negation, etc. + this.parseNegate(); + // step 2: expand braces + this.globSet = this.braceExpand(); + if (options.debug) { + this.debug = (...args) => console.error(...args); + } + this.debug(this.pattern, this.globSet); + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + const rawGlobParts = this.globSet.map(s => this.slashSplit(s)); + // consecutive globstars are an unncessary perf killer + // also, **/*/... is equivalent to */**/..., so swap all of those + // this turns a pattern like **/*/**/*/x into */*/**/x + // and a pattern like **/x/**/*/y becomes **/x/*/**/y + // the *later* we can push the **, the more efficient it is, + // because we can avoid having to do a recursive walk until + // the walked tree is as shallow as possible. + // Note that this is only true up to the last pattern, though, because + // a/*/** will only match a/b if b is a dir, but a/**/* will match a/b + // regardless, since it's "0 or more path segments" if it's not final. + if (this.options.noglobstar) { + // ** is * anyway + this.globParts = rawGlobParts; + } + else { + // do this swap BEFORE the reduce, so that we can turn a string + // of **/*/**/* into */*/**/** and then reduce the **'s into one + for (const parts of rawGlobParts) { + let swapped; + do { + swapped = false; + for (let i = 0; i < parts.length - 1; i++) { + if (parts[i] === '*' && parts[i - 1] === '**') { + parts[i] = '**'; + parts[i - 1] = '*'; + swapped = true; + } + } + } while (swapped); + } + this.globParts = rawGlobParts.map(parts => { + parts = parts.reduce((set, part) => { + const prev = set[set.length - 1]; + if (part === '**' && prev === '**') { + return set; + } + if (part === '..') { + if (prev && prev !== '..' && prev !== '.' && prev !== '**') { + set.pop(); + return set; + } + } + set.push(part); + return set; + }, []); + return parts.length === 0 ? [''] : parts; + }); + } + this.debug(this.pattern, this.globParts); + // glob --> regexps + let set = this.globParts.map((s, _, __) => s.map(ss => this.parse(ss))); + this.debug(this.pattern, set); + // filter out everything that didn't compile properly. + this.set = set.filter(s => s.indexOf(false) === -1); + // do not treat the ? in UNC paths as magic + if (isWindows) { + for (let i = 0; i < this.set.length; i++) { + const p = this.set[i]; + if (p[0] === '' && + p[1] === '' && + this.globParts[i][2] === '?' && + typeof p[3] === 'string' && + /^[a-z]:$/i.test(p[3])) { + p[2] = '?'; + } + } + } + this.debug(this.pattern, this.set); + } + parseNegate() { + if (this.nonegate) + return; + const pattern = this.pattern; + let negate = false; + let negateOffset = 0; + for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) + this.pattern = pattern.slice(negateOffset); + this.negate = negate; + } + // set partial to true to test if, for example, + // "/a/b" matches the start of "/*/b/*/d" + // Partial means, if you run out of file before you run + // out of pattern, then that's fine, as long as all + // the parts match. + matchOne(file, pattern, partial = false) { + const options = this.options; + // a UNC pattern like //?/c:/* can match a path like c:/x + // and vice versa + if (isWindows) { + const fileUNC = file[0] === '' && + file[1] === '' && + file[2] === '?' && + typeof file[3] === 'string' && + /^[a-z]:$/i.test(file[3]); + const patternUNC = pattern[0] === '' && + pattern[1] === '' && + pattern[2] === '?' && + typeof pattern[3] === 'string' && + /^[a-z]:$/i.test(pattern[3]); + if (fileUNC && patternUNC) { + const fd = file[3]; + const pd = pattern[3]; + if (fd.toLowerCase() === pd.toLowerCase()) { + file[3] = pd; + } + } + else if (patternUNC && typeof file[0] === 'string') { + const pd = pattern[3]; + const fd = file[0]; + if (pd.toLowerCase() === fd.toLowerCase()) { + pattern[3] = fd; + pattern = pattern.slice(3); + } + } + else if (fileUNC && typeof pattern[0] === 'string') { + const fd = file[3]; + if (fd.toLowerCase() === pattern[0].toLowerCase()) { + pattern[0] = fd; + file = file.slice(3); + } + } + } + this.debug('matchOne', this, { file, pattern }); + this.debug('matchOne', file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug('matchOne loop'); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + // should be impossible. + // some invalid regexp stuff in the set. + /* c8 ignore start */ + if (p === false) { + return false; + } + /* c8 ignore stop */ + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]); + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug('** at the end'); + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || + file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) + return false; + } + return true; + } + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr]; + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee); + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee); + // found a match. + return true; + } + else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || + swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr); + break; + } + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue'); + fr++; + } + } + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + /* c8 ignore start */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr); + if (fr === fl) { + return true; + } + } + /* c8 ignore stop */ + return false; + } + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + let hit; + if (typeof p === 'string') { + hit = f === p; + this.debug('string match', p, f, hit); + } + else { + hit = p.test(f); + this.debug('pattern match', p, f, hit); + } + if (!hit) + return false; + } + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true; + } + else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial; + } + else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return fi === fl - 1 && file[fi] === ''; + /* c8 ignore start */ + } + else { + // should be unreachable. + throw new Error('wtf?'); + } + /* c8 ignore stop */ + } + braceExpand() { + return braceExpand(this.pattern, this.options); + } + parse(pattern, isSub) { + assertValidPattern(pattern); + const options = this.options; + // shortcuts + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = '*'; + } + if (pattern === '') + return ''; + // far and away, the most common glob pattern parts are + // *, *.*, and *. Add a fast check method for those. + let m; + let fastTest = null; + if (isSub !== SUBPARSE) { + if ((m = pattern.match(starRE))) { + fastTest = options.dot ? starTestDot : starTest; + } + else if ((m = pattern.match(starDotExtRE))) { + fastTest = (options.nocase + ? options.dot + ? starDotExtTestNocaseDot + : starDotExtTestNocase + : options.dot + ? starDotExtTestDot + : starDotExtTest)(m[1]); + } + else if ((m = pattern.match(qmarksRE))) { + fastTest = (options.nocase + ? options.dot + ? qmarksTestNocaseDot + : qmarksTestNocase + : options.dot + ? qmarksTestDot + : qmarksTest)(m); + } + else if ((m = pattern.match(starDotStarRE))) { + fastTest = options.dot ? starDotStarTestDot : starDotStarTest; + } + else if ((m = pattern.match(dotStarRE))) { + fastTest = dotStarTest; + } + } + let re = ''; + let hasMagic = false; + let escaping = false; + // ? => one single character + const patternListStack = []; + const negativeLists = []; + let stateChar = false; + let inClass = false; + let reClassStart = -1; + let classStart = -1; + let cs; + let pl; + let sp; + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. However, if the pattern + // starts with ., then traversal patterns can match. + let dotTravAllowed = pattern.charAt(0) === '.'; + let dotFileAllowed = options.dot || dotTravAllowed; + const patternStart = () => dotTravAllowed + ? '' + : dotFileAllowed + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)'; + const subPatternStart = (p) => p.charAt(0) === '.' + ? '' + : options.dot + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)'; + const clearStateChar = () => { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star; + hasMagic = true; + break; + case '?': + re += qmark; + hasMagic = true; + break; + default: + re += '\\' + stateChar; + break; + } + this.debug('clearStateChar %j %j', stateChar, re); + stateChar = false; + } + }; + for (let i = 0, c; i < pattern.length && (c = pattern.charAt(i)); i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c); + // skip over any that are escaped. + if (escaping) { + // completely not allowed, even escaped. + // should be impossible. + /* c8 ignore start */ + if (c === '/') { + return false; + } + /* c8 ignore stop */ + if (reSpecials[c]) { + re += '\\'; + } + re += c; + escaping = false; + continue; + } + switch (c) { + // Should already be path-split by now. + /* c8 ignore start */ + case '/': { + return false; + } + /* c8 ignore stop */ + case '\\': + if (inClass && pattern.charAt(i + 1) === '-') { + re += c; + continue; + } + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c); + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class'); + if (c === '!' && i === classStart + 1) + c = '^'; + re += c; + continue; + } + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + this.debug('call clearStateChar %j', stateChar); + clearStateChar(); + stateChar = c; + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) + clearStateChar(); + continue; + case '(': { + if (inClass) { + re += '('; + continue; + } + if (!stateChar) { + re += '\\('; + continue; + } + const plEntry = { + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close, + }; + this.debug(this.pattern, '\t', plEntry); + patternListStack.push(plEntry); + // negation is (?:(?!(?:js)(?:))[^/]*) + re += plEntry.open; + // next entry starts with a dot maybe? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + this.debug('plType %j %j', stateChar, re); + stateChar = false; + continue; + } + case ')': { + const plEntry = patternListStack[patternListStack.length - 1]; + if (inClass || !plEntry) { + re += '\\)'; + continue; + } + patternListStack.pop(); + // closing an extglob + clearStateChar(); + hasMagic = true; + pl = plEntry; + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close; + if (pl.type === '!') { + negativeLists.push(Object.assign(pl, { reEnd: re.length })); + } + continue; + } + case '|': { + const plEntry = patternListStack[patternListStack.length - 1]; + if (inClass || !plEntry) { + re += '\\|'; + continue; + } + clearStateChar(); + re += '|'; + // next subpattern can start with a dot? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + continue; + } + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar(); + if (inClass) { + re += '\\' + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c; + continue; + } + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + cs = pattern.substring(classStart + 1, i); + try { + RegExp('[' + braExpEscape(charUnescape(cs)) + ']'); + // looks good, finish up the class. + re += c; + } + catch (er) { + // out of order ranges in JS are errors, but in glob syntax, + // they're just a range that matches nothing. + re = re.substring(0, reClassStart) + '(?:$.)'; // match nothing ever + } + hasMagic = true; + inClass = false; + continue; + default: + // swallow any state char that wasn't consumed + clearStateChar(); + if (reSpecials[c] && !(c === '^' && inClass)) { + re += '\\'; + } + re += c; + break; + } // switch + } // for + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.slice(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substring(0, reClassStart) + '\\[' + sp[0]; + hasMagic = hasMagic || sp[1]; + } + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + let tail; + tail = re.slice(pl.reStart + pl.open.length); + this.debug(this.pattern, 'setting tail', re, pl); + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\'; + // should already be done + /* c8 ignore start */ + } + /* c8 ignore stop */ + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|'; + }); + this.debug('tail=%j\n %s', tail, tail, pl, re); + const t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + '\\(' + tail; + } + // handle trailing things that only matter at the very end. + clearStateChar(); + if (escaping) { + // trailing \\ + re += '\\\\'; + } + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + const addPatternStart = addPatternStartSet[re.charAt(0)]; + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (let n = negativeLists.length - 1; n > -1; n--) { + const nl = negativeLists[n]; + const nlBefore = re.slice(0, nl.reStart); + const nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + let nlAfter = re.slice(nl.reEnd); + const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter; + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + const closeParensBefore = nlBefore.split(')').length; + const openParensBefore = nlBefore.split('(').length - closeParensBefore; + let cleanAfter = nlAfter; + for (let i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ''); + } + nlAfter = cleanAfter; + const dollar = nlAfter === '' && isSub !== SUBPARSE ? '(?:$|\\/)' : ''; + re = nlBefore + nlFirst + nlAfter + dollar + nlLast; + } + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re; + } + if (addPatternStart) { + re = patternStart() + re; + } + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + // if it's nocase, and the lcase/uppercase don't match, it's magic + if (options.nocase && !hasMagic && !options.nocaseMagicOnly) { + hasMagic = pattern.toUpperCase() !== pattern.toLowerCase(); + } + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern); + } + const flags = options.nocase ? 'i' : ''; + try { + const ext = fastTest + ? { + _glob: pattern, + _src: re, + test: fastTest, + } + : { + _glob: pattern, + _src: re, + }; + return Object.assign(new RegExp('^' + re + '$', flags), ext); + /* c8 ignore start */ + } + catch (er) { + // should be impossible + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + this.debug('invalid regexp', er); + return new RegExp('$.'); + } + /* c8 ignore stop */ + } + makeRe() { + if (this.regexp || this.regexp === false) + return this.regexp; + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + const set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + const options = this.options; + const twoStar = options.noglobstar + ? star + : options.dot + ? twoStarDot + : twoStarNoDot; + const flags = options.nocase ? 'i' : ''; + // regexpify non-globstar patterns + // if ** is only item, then we just do one twoStar + // if ** is first, and there are more, prepend (\/|twoStar\/)? to next + // if ** is last, append (\/twoStar|) to previous + // if ** is in the middle, append (\/|\/twoStar\/) to previous + // then filter out GLOBSTAR symbols + let re = set + .map(pattern => { + const pp = pattern.map(p => typeof p === 'string' + ? regExpEscape(p) + : p === GLOBSTAR + ? GLOBSTAR + : p._src); + pp.forEach((p, i) => { + const next = pp[i + 1]; + const prev = pp[i - 1]; + if (p !== GLOBSTAR || prev === GLOBSTAR) { + return; + } + if (prev === undefined) { + if (next !== undefined && next !== GLOBSTAR) { + pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next; + } + else { + pp[i] = twoStar; + } + } + else if (next === undefined) { + pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?'; + } + else if (next !== GLOBSTAR) { + pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next; + pp[i + 1] = GLOBSTAR; + } + }); + return pp.filter(p => p !== GLOBSTAR).join('/'); + }) + .join('|'); + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$'; + // can match anything, as long as it's not this. + if (this.negate) + re = '^(?!' + re + ').*$'; + try { + this.regexp = new RegExp(re, flags); + /* c8 ignore start */ + } + catch (ex) { + // should be impossible + this.regexp = false; + } + /* c8 ignore stop */ + return this.regexp; + } + slashSplit(p) { + // if p starts with // on windows, we preserve that + // so that UNC paths aren't broken. Otherwise, any number of + // / characters are coalesced into one, unless + // preserveMultipleSlashes is set to true. + if (this.preserveMultipleSlashes) { + return p.split('/'); + } + else if (isWindows && /^\/\/[^\/]+/.test(p)) { + // add an extra '' for the one we lose + return ['', ...p.split(/\/+/)]; + } + else { + return p.split(/\/+/); + } + } + match(f, partial = this.partial) { + this.debug('match', f, this.pattern); + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) { + return false; + } + if (this.empty) { + return f === ''; + } + if (f === '/' && partial) { + return true; + } + const options = this.options; + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/'); + } + // treat the test path as a set of pathparts. + const ff = this.slashSplit(f); + this.debug(this.pattern, 'split', ff); + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + const set = this.set; + this.debug(this.pattern, 'set', set); + // Find the basename of the path by looking for the last non-empty segment + let filename = ff[ff.length - 1]; + if (!filename) { + for (let i = ff.length - 2; !filename && i >= 0; i--) { + filename = ff[i]; + } + } + for (let i = 0; i < set.length; i++) { + const pattern = set[i]; + let file = ff; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + const hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) { + return true; + } + return !this.negate; + } + } + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) { + return false; + } + return this.negate; + } + static defaults(def) { + return minimatch.defaults(def).Minimatch; + } +} +minimatch.Minimatch = Minimatch; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/mjs/index.js.map b/deps/npm/node_modules/minimatch/dist/mjs/index.js.map new file mode 100644 index 00000000000000..854172c5bd0f01 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/mjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QACnD,OAAO,KAAK,CAAA;KACb;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC,CAAA;AAED,eAAe,SAAS,CAAA;AAExB,wDAAwD;AACxD,MAAM,YAAY,GAAG,uBAAuB,CAAA;AAC5C,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,E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,MAAM,CAAC,QAAQ,CAAC,GAAqB;QACnC,OAAO,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,CAAA;IAC1C,CAAC;CACF;AAED,SAAS,CAAC,SAAS,GAAG,SAAS,CAAA"} \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/mjs/package.json b/deps/npm/node_modules/minimatch/dist/mjs/package.json new file mode 100644 index 00000000000000..3dbc1ca591c055 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/mjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/deps/npm/node_modules/minimatch/package.json b/deps/npm/node_modules/minimatch/package.json index 8e237d3f15504f..58f289adf75e76 100644 --- a/deps/npm/node_modules/minimatch/package.json +++ b/deps/npm/node_modules/minimatch/package.json @@ -2,18 +2,54 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me)", "name": "minimatch", "description": "a glob matcher in javascript", - "version": "5.1.1", + "version": "6.2.0", "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" }, - "main": "minimatch.js", + "main": "./dist/cjs/index-cjs.js", + "module": "./dist/mjs/index.js", + "types": "./dist/cjs/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/mjs/index.d.ts", + "default": "./dist/mjs/index.js" + }, + "require": { + "types": "./dist/cjs/index-cjs.d.ts", + "default": "./dist/cjs/index-cjs.js" + } + } + }, + "files": [ + "dist" + ], "scripts": { - "test": "tap", - "snap": "tap", "preversion": "npm test", "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" + "prepublishOnly": "git push origin --follow-tags", + "preprepare": "rm -rf dist", + "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json", + "postprepare": "bash fixup.sh", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "c8 tap", + "snap": "c8 tap", + "format": "prettier --write . --loglevel warn", + "benchmark": "node benchmark/index.js", + "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts" + }, + "prettier": { + "semi": false, + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" }, "engines": { "node": ">=10" @@ -22,11 +58,29 @@ "brace-expansion": "^2.0.1" }, "devDependencies": { - "tap": "^16.3.2" + "@types/brace-expansion": "^1.1.0", + "@types/node": "^18.11.9", + "@types/tap": "^15.0.7", + "c8": "^7.12.0", + "eslint-config-prettier": "^8.6.0", + "mkdirp": "1", + "prettier": "^2.8.2", + "tap": "^16.3.3", + "ts-node": "^10.9.1", + "typedoc": "^0.23.21", + "typescript": "^4.9.3" }, - "license": "ISC", - "files": [ - "minimatch.js", - "lib" - ] + "tap": { + "coverage": false, + "node-arg": [ + "--no-warnings", + "--loader", + "ts-node/esm" + ], + "ts": false + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "license": "ISC" } diff --git a/deps/npm/node_modules/minipass/LICENSE b/deps/npm/node_modules/minipass/LICENSE index bf1dece2e1f122..97f8e32ed82e4c 100644 --- a/deps/npm/node_modules/minipass/LICENSE +++ b/deps/npm/node_modules/minipass/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors +Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/deps/npm/node_modules/minipass/index.d.ts b/deps/npm/node_modules/minipass/index.d.ts index f68ce8a259c471..93a06eb357109b 100644 --- a/deps/npm/node_modules/minipass/index.d.ts +++ b/deps/npm/node_modules/minipass/index.d.ts @@ -140,8 +140,8 @@ declare class Minipass< listener: () => any ): this - [Symbol.iterator](): Iterator - [Symbol.asyncIterator](): AsyncIterator + [Symbol.iterator](): Generator + [Symbol.asyncIterator](): AsyncGenerator } export = Minipass diff --git a/deps/npm/node_modules/minipass/index.js b/deps/npm/node_modules/minipass/index.js index d5003ed9a57546..5d45de8d39f76e 100644 --- a/deps/npm/node_modules/minipass/index.js +++ b/deps/npm/node_modules/minipass/index.js @@ -1,8 +1,11 @@ 'use strict' -const proc = typeof process === 'object' && process ? process : { - stdout: null, - stderr: null, -} +const proc = + typeof process === 'object' && process + ? process + : { + stdout: null, + stderr: null, + } const EE = require('events') const Stream = require('stream') const SD = require('string_decoder').StringDecoder @@ -27,7 +30,10 @@ const BUFFERLENGTH = Symbol('bufferLength') const BUFFERPUSH = Symbol('bufferPush') const BUFFERSHIFT = Symbol('bufferShift') const OBJECTMODE = Symbol('objectMode') +// internal event when stream is destroyed const DESTROYED = Symbol('destroyed') +// internal event when stream has an error +const ERROR = Symbol('error') const EMITDATA = Symbol('emitData') const EMITEND = Symbol('emitEnd') const EMITEND2 = Symbol('emitEnd2') @@ -36,54 +42,51 @@ const ASYNC = Symbol('async') const defer = fn => Promise.resolve().then(fn) // TODO remove when Node v8 support drops -const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' -const ASYNCITERATOR = doIter && Symbol.asyncIterator - || Symbol('asyncIterator not implemented') -const ITERATOR = doIter && Symbol.iterator - || Symbol('iterator not implemented') +const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' +const ASYNCITERATOR = + (doIter && Symbol.asyncIterator) || Symbol('asyncIterator not implemented') +const ITERATOR = + (doIter && Symbol.iterator) || Symbol('iterator not implemented') // events that mean 'the stream is over' // these are treated specially, and re-emitted // if they are listened for after emitting. -const isEndish = ev => - ev === 'end' || - ev === 'finish' || - ev === 'prefinish' +const isEndish = ev => ev === 'end' || ev === 'finish' || ev === 'prefinish' -const isArrayBuffer = b => b instanceof ArrayBuffer || - typeof b === 'object' && - b.constructor && - b.constructor.name === 'ArrayBuffer' && - b.byteLength >= 0 +const isArrayBuffer = b => + b instanceof ArrayBuffer || + (typeof b === 'object' && + b.constructor && + b.constructor.name === 'ArrayBuffer' && + b.byteLength >= 0) const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) class Pipe { - constructor (src, dest, opts) { + constructor(src, dest, opts) { this.src = src this.dest = dest this.opts = opts this.ondrain = () => src[RESUME]() dest.on('drain', this.ondrain) } - unpipe () { + unpipe() { this.dest.removeListener('drain', this.ondrain) } // istanbul ignore next - only here for the prototype - proxyErrors () {} - end () { + proxyErrors() {} + end() { this.unpipe() - if (this.opts.end) - this.dest.end() + if (this.opts.end) this.dest.end() } } class PipeProxyErrors extends Pipe { - unpipe () { + unpipe() { this.src.removeListener('error', this.proxyErrors) super.unpipe() } - constructor (src, dest, opts) { + constructor(src, dest, opts) { super(src, dest, opts) this.proxyErrors = er => dest.emit('error', er) src.on('error', this.proxyErrors) @@ -91,21 +94,18 @@ class PipeProxyErrors extends Pipe { } module.exports = class Minipass extends Stream { - constructor (options) { + constructor(options) { super() this[FLOWING] = false // whether we're explicitly paused this[PAUSED] = false this[PIPES] = [] this[BUFFER] = [] - this[OBJECTMODE] = options && options.objectMode || false - if (this[OBJECTMODE]) - this[ENCODING] = null - else - this[ENCODING] = options && options.encoding || null - if (this[ENCODING] === 'buffer') - this[ENCODING] = null - this[ASYNC] = options && !!options.async || false + this[OBJECTMODE] = (options && options.objectMode) || false + if (this[OBJECTMODE]) this[ENCODING] = null + else this[ENCODING] = (options && options.encoding) || null + if (this[ENCODING] === 'buffer') this[ENCODING] = null + this[ASYNC] = (options && !!options.async) || false this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null this[EOF] = false this[EMITTED_END] = false @@ -124,15 +124,21 @@ module.exports = class Minipass extends Stream { } } - get bufferLength () { return this[BUFFERLENGTH] } + get bufferLength() { + return this[BUFFERLENGTH] + } - get encoding () { return this[ENCODING] } - set encoding (enc) { - if (this[OBJECTMODE]) - throw new Error('cannot set encoding in objectMode') + get encoding() { + return this[ENCODING] + } + set encoding(enc) { + if (this[OBJECTMODE]) throw new Error('cannot set encoding in objectMode') - if (this[ENCODING] && enc !== this[ENCODING] && - (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) + if ( + this[ENCODING] && + enc !== this[ENCODING] && + ((this[DECODER] && this[DECODER].lastNeed) || this[BUFFERLENGTH]) + ) throw new Error('cannot change encoding') if (this[ENCODING] !== enc) { @@ -144,33 +150,41 @@ module.exports = class Minipass extends Stream { this[ENCODING] = enc } - setEncoding (enc) { + setEncoding(enc) { this.encoding = enc } - get objectMode () { return this[OBJECTMODE] } - set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om } + get objectMode() { + return this[OBJECTMODE] + } + set objectMode(om) { + this[OBJECTMODE] = this[OBJECTMODE] || !!om + } - get ['async'] () { return this[ASYNC] } - set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a } + get ['async']() { + return this[ASYNC] + } + set ['async'](a) { + this[ASYNC] = this[ASYNC] || !!a + } - write (chunk, encoding, cb) { - if (this[EOF]) - throw new Error('write after end') + write(chunk, encoding, cb) { + if (this[EOF]) throw new Error('write after end') if (this[DESTROYED]) { - this.emit('error', Object.assign( - new Error('Cannot call write after a stream was destroyed'), - { code: 'ERR_STREAM_DESTROYED' } - )) + this.emit( + 'error', + Object.assign( + new Error('Cannot call write after a stream was destroyed'), + { code: 'ERR_STREAM_DESTROYED' } + ) + ) return true } - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' + if (typeof encoding === 'function') (cb = encoding), (encoding = 'utf8') - if (!encoding) - encoding = 'utf8' + if (!encoding) encoding = 'utf8' const fn = this[ASYNC] ? defer : f => f() @@ -181,8 +195,7 @@ module.exports = class Minipass extends Stream { if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { if (isArrayBufferView(chunk)) chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) - else if (isArrayBuffer(chunk)) - chunk = Buffer.from(chunk) + else if (isArrayBuffer(chunk)) chunk = Buffer.from(chunk) else if (typeof chunk !== 'string') // use the setter so we throw if we have encoding set this.objectMode = true @@ -192,19 +205,14 @@ module.exports = class Minipass extends Stream { // this yields better performance, fewer checks later. if (this[OBJECTMODE]) { /* istanbul ignore if - maybe impossible? */ - if (this.flowing && this[BUFFERLENGTH] !== 0) - this[FLUSH](true) + if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true) - if (this.flowing) - this.emit('data', chunk) - else - this[BUFFERPUSH](chunk) + if (this.flowing) this.emit('data', chunk) + else this[BUFFERPUSH](chunk) - if (this[BUFFERLENGTH] !== 0) - this.emit('readable') + if (this[BUFFERLENGTH] !== 0) this.emit('readable') - if (cb) - fn(cb) + if (cb) fn(cb) return this.flowing } @@ -212,18 +220,18 @@ module.exports = class Minipass extends Stream { // at this point the chunk is a buffer or string // don't buffer it up or send it to the decoder if (!chunk.length) { - if (this[BUFFERLENGTH] !== 0) - this.emit('readable') - if (cb) - fn(cb) + if (this[BUFFERLENGTH] !== 0) this.emit('readable') + if (cb) fn(cb) return this.flowing } // fast-path writing strings of same encoding to a stream with // an empty buffer, skipping the buffer/decoder dance - if (typeof chunk === 'string' && - // unless it is a string already ready for us to use - !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { + if ( + typeof chunk === 'string' && + // unless it is a string already ready for us to use + !(encoding === this[ENCODING] && !this[DECODER].lastNeed) + ) { chunk = Buffer.from(chunk, encoding) } @@ -231,40 +239,31 @@ module.exports = class Minipass extends Stream { chunk = this[DECODER].write(chunk) // Note: flushing CAN potentially switch us into not-flowing mode - if (this.flowing && this[BUFFERLENGTH] !== 0) - this[FLUSH](true) + if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true) - if (this.flowing) - this.emit('data', chunk) - else - this[BUFFERPUSH](chunk) + if (this.flowing) this.emit('data', chunk) + else this[BUFFERPUSH](chunk) - if (this[BUFFERLENGTH] !== 0) - this.emit('readable') + if (this[BUFFERLENGTH] !== 0) this.emit('readable') - if (cb) - fn(cb) + if (cb) fn(cb) return this.flowing } - read (n) { - if (this[DESTROYED]) - return null + read(n) { + if (this[DESTROYED]) return null if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) { this[MAYBE_EMIT_END]() return null } - if (this[OBJECTMODE]) - n = null + if (this[OBJECTMODE]) n = null if (this[BUFFER].length > 1 && !this[OBJECTMODE]) { - if (this.encoding) - this[BUFFER] = [this[BUFFER].join('')] - else - this[BUFFER] = [Buffer.concat(this[BUFFER], this[BUFFERLENGTH])] + if (this.encoding) this[BUFFER] = [this[BUFFER].join('')] + else this[BUFFER] = [Buffer.concat(this[BUFFER], this[BUFFERLENGTH])] } const ret = this[READ](n || null, this[BUFFER][0]) @@ -272,9 +271,8 @@ module.exports = class Minipass extends Stream { return ret } - [READ] (n, chunk) { - if (n === chunk.length || n === null) - this[BUFFERSHIFT]() + [READ](n, chunk) { + if (n === chunk.length || n === null) this[BUFFERSHIFT]() else { this[BUFFER][0] = chunk.slice(n) chunk = chunk.slice(0, n) @@ -283,21 +281,16 @@ module.exports = class Minipass extends Stream { this.emit('data', chunk) - if (!this[BUFFER].length && !this[EOF]) - this.emit('drain') + if (!this[BUFFER].length && !this[EOF]) this.emit('drain') return chunk } - end (chunk, encoding, cb) { - if (typeof chunk === 'function') - cb = chunk, chunk = null - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - if (chunk) - this.write(chunk, encoding) - if (cb) - this.once('end', cb) + end(chunk, encoding, cb) { + if (typeof chunk === 'function') (cb = chunk), (chunk = null) + if (typeof encoding === 'function') (cb = encoding), (encoding = 'utf8') + if (chunk) this.write(chunk, encoding) + if (cb) this.once('end', cb) this[EOF] = true this.writable = false @@ -305,106 +298,93 @@ module.exports = class Minipass extends Stream { // even if we're not reading. // we'll re-emit if a new 'end' listener is added anyway. // This makes MP more suitable to write-only use cases. - if (this.flowing || !this[PAUSED]) - this[MAYBE_EMIT_END]() + if (this.flowing || !this[PAUSED]) this[MAYBE_EMIT_END]() return this } // don't let the internal resume be overwritten - [RESUME] () { - if (this[DESTROYED]) - return + [RESUME]() { + if (this[DESTROYED]) return this[PAUSED] = false this[FLOWING] = true this.emit('resume') - if (this[BUFFER].length) - this[FLUSH]() - else if (this[EOF]) - this[MAYBE_EMIT_END]() - else - this.emit('drain') + if (this[BUFFER].length) this[FLUSH]() + else if (this[EOF]) this[MAYBE_EMIT_END]() + else this.emit('drain') } - resume () { + resume() { return this[RESUME]() } - pause () { + pause() { this[FLOWING] = false this[PAUSED] = true } - get destroyed () { + get destroyed() { return this[DESTROYED] } - get flowing () { + get flowing() { return this[FLOWING] } - get paused () { + get paused() { return this[PAUSED] } - [BUFFERPUSH] (chunk) { - if (this[OBJECTMODE]) - this[BUFFERLENGTH] += 1 - else - this[BUFFERLENGTH] += chunk.length + [BUFFERPUSH](chunk) { + if (this[OBJECTMODE]) this[BUFFERLENGTH] += 1 + else this[BUFFERLENGTH] += chunk.length this[BUFFER].push(chunk) } - [BUFFERSHIFT] () { + [BUFFERSHIFT]() { if (this[BUFFER].length) { - if (this[OBJECTMODE]) - this[BUFFERLENGTH] -= 1 - else - this[BUFFERLENGTH] -= this[BUFFER][0].length + if (this[OBJECTMODE]) this[BUFFERLENGTH] -= 1 + else this[BUFFERLENGTH] -= this[BUFFER][0].length } return this[BUFFER].shift() } - [FLUSH] (noDrain) { + [FLUSH](noDrain) { do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]())) - if (!noDrain && !this[BUFFER].length && !this[EOF]) - this.emit('drain') + if (!noDrain && !this[BUFFER].length && !this[EOF]) this.emit('drain') } - [FLUSHCHUNK] (chunk) { + [FLUSHCHUNK](chunk) { return chunk ? (this.emit('data', chunk), this.flowing) : false } - pipe (dest, opts) { - if (this[DESTROYED]) - return + pipe(dest, opts) { + if (this[DESTROYED]) return const ended = this[EMITTED_END] opts = opts || {} - if (dest === proc.stdout || dest === proc.stderr) - opts.end = false - else - opts.end = opts.end !== false + if (dest === proc.stdout || dest === proc.stderr) opts.end = false + else opts.end = opts.end !== false opts.proxyErrors = !!opts.proxyErrors // piping an ended stream ends immediately if (ended) { - if (opts.end) - dest.end() + if (opts.end) dest.end() } else { - this[PIPES].push(!opts.proxyErrors ? new Pipe(this, dest, opts) - : new PipeProxyErrors(this, dest, opts)) - if (this[ASYNC]) - defer(() => this[RESUME]()) - else - this[RESUME]() + this[PIPES].push( + !opts.proxyErrors + ? new Pipe(this, dest, opts) + : new PipeProxyErrors(this, dest, opts) + ) + if (this[ASYNC]) defer(() => this[RESUME]()) + else this[RESUME]() } return dest } - unpipe (dest) { + unpipe(dest) { const p = this[PIPES].find(p => p.dest === dest) if (p) { this[PIPES].splice(this[PIPES].indexOf(p), 1) @@ -412,68 +392,68 @@ module.exports = class Minipass extends Stream { } } - addListener (ev, fn) { + addListener(ev, fn) { return this.on(ev, fn) } - on (ev, fn) { + on(ev, fn) { const ret = super.on(ev, fn) - if (ev === 'data' && !this[PIPES].length && !this.flowing) - this[RESUME]() + if (ev === 'data' && !this[PIPES].length && !this.flowing) this[RESUME]() else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) super.emit('readable') else if (isEndish(ev) && this[EMITTED_END]) { super.emit(ev) this.removeAllListeners(ev) } else if (ev === 'error' && this[EMITTED_ERROR]) { - if (this[ASYNC]) - defer(() => fn.call(this, this[EMITTED_ERROR])) - else - fn.call(this, this[EMITTED_ERROR]) + if (this[ASYNC]) defer(() => fn.call(this, this[EMITTED_ERROR])) + else fn.call(this, this[EMITTED_ERROR]) } return ret } - get emittedEnd () { + get emittedEnd() { return this[EMITTED_END] } - [MAYBE_EMIT_END] () { - if (!this[EMITTING_END] && - !this[EMITTED_END] && - !this[DESTROYED] && - this[BUFFER].length === 0 && - this[EOF]) { + [MAYBE_EMIT_END]() { + if ( + !this[EMITTING_END] && + !this[EMITTED_END] && + !this[DESTROYED] && + this[BUFFER].length === 0 && + this[EOF] + ) { this[EMITTING_END] = true this.emit('end') this.emit('prefinish') this.emit('finish') - if (this[CLOSED]) - this.emit('close') + if (this[CLOSED]) this.emit('close') this[EMITTING_END] = false } } - emit (ev, data, ...extra) { + emit(ev, data, ...extra) { // error and close are only events allowed after calling destroy() if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED]) return else if (ev === 'data') { - return !data ? false - : this[ASYNC] ? defer(() => this[EMITDATA](data)) + return !data + ? false + : this[ASYNC] + ? defer(() => this[EMITDATA](data)) : this[EMITDATA](data) } else if (ev === 'end') { return this[EMITEND]() } else if (ev === 'close') { this[CLOSED] = true // don't emit close before 'end' and 'finish' - if (!this[EMITTED_END] && !this[DESTROYED]) - return + if (!this[EMITTED_END] && !this[DESTROYED]) return const ret = super.emit('close') this.removeAllListeners('close') return ret } else if (ev === 'error') { this[EMITTED_ERROR] = data + super.emit(ERROR, data) const ret = super.emit('error', data) this[MAYBE_EMIT_END]() return ret @@ -493,29 +473,25 @@ module.exports = class Minipass extends Stream { return ret } - [EMITDATA] (data) { + [EMITDATA](data) { for (const p of this[PIPES]) { - if (p.dest.write(data) === false) - this.pause() + if (p.dest.write(data) === false) this.pause() } const ret = super.emit('data', data) this[MAYBE_EMIT_END]() return ret } - [EMITEND] () { - if (this[EMITTED_END]) - return + [EMITEND]() { + if (this[EMITTED_END]) return this[EMITTED_END] = true this.readable = false - if (this[ASYNC]) - defer(() => this[EMITEND2]()) - else - this[EMITEND2]() + if (this[ASYNC]) defer(() => this[EMITEND2]()) + else this[EMITEND2]() } - [EMITEND2] () { + [EMITEND2]() { if (this[DECODER]) { const data = this[DECODER].end() if (data) { @@ -535,33 +511,34 @@ module.exports = class Minipass extends Stream { } // const all = await stream.collect() - collect () { + collect() { const buf = [] - if (!this[OBJECTMODE]) - buf.dataLength = 0 + if (!this[OBJECTMODE]) buf.dataLength = 0 // set the promise first, in case an error is raised // by triggering the flow here. const p = this.promise() this.on('data', c => { buf.push(c) - if (!this[OBJECTMODE]) - buf.dataLength += c.length + if (!this[OBJECTMODE]) buf.dataLength += c.length }) return p.then(() => buf) } // const data = await stream.concat() - concat () { + concat() { return this[OBJECTMODE] ? Promise.reject(new Error('cannot concat in objectMode')) : this.collect().then(buf => this[OBJECTMODE] ? Promise.reject(new Error('cannot concat in objectMode')) - : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength)) + : this[ENCODING] + ? buf.join('') + : Buffer.concat(buf, buf.dataLength) + ) } // stream.promise().then(() => done, er => emitted error) - promise () { + promise() { return new Promise((resolve, reject) => { this.on(DESTROYED, () => reject(new Error('stream destroyed'))) this.on('error', er => reject(er)) @@ -570,20 +547,26 @@ module.exports = class Minipass extends Stream { } // for await (let chunk of stream) - [ASYNCITERATOR] () { + [ASYNCITERATOR]() { + let stopped = false + const stop = () => { + this.pause() + stopped = true + return Promise.resolve({ done: true }) + } const next = () => { + if (stopped) return stop() const res = this.read() - if (res !== null) - return Promise.resolve({ done: false, value: res }) + if (res !== null) return Promise.resolve({ done: false, value: res }) - if (this[EOF]) - return Promise.resolve({ done: true }) + if (this[EOF]) return stop() let resolve = null let reject = null const onerr = er => { this.removeListener('data', ondata) this.removeListener('end', onend) + stop() reject(er) } const ondata = value => { @@ -595,6 +578,7 @@ module.exports = class Minipass extends Stream { const onend = () => { this.removeListener('error', onerr) this.removeListener('data', ondata) + stop() resolve({ done: true }) } const ondestroy = () => onerr(new Error('stream destroyed')) @@ -608,25 +592,49 @@ module.exports = class Minipass extends Stream { }) } - return { next } + return { + next, + throw: stop, + return: stop, + [ASYNCITERATOR]() { + return this + }, + } } // for (let chunk of stream) - [ITERATOR] () { + [ITERATOR]() { + let stopped = false + const stop = () => { + this.pause() + this.removeListener(ERROR, stop) + this.removeListener('end', stop) + stopped = true + return { done: true } + } + const next = () => { + if (stopped) return stop() const value = this.read() - const done = value === null - return { value, done } + return value === null ? stop() : { value } + } + this.once('end', stop) + this.once(ERROR, stop) + + return { + next, + throw: stop, + return: stop, + [ITERATOR]() { + return this + }, } - return { next } } - destroy (er) { + destroy(er) { if (this[DESTROYED]) { - if (er) - this.emit('error', er) - else - this.emit(DESTROYED) + if (er) this.emit('error', er) + else this.emit(DESTROYED) return this } @@ -636,22 +644,23 @@ module.exports = class Minipass extends Stream { this[BUFFER].length = 0 this[BUFFERLENGTH] = 0 - if (typeof this.close === 'function' && !this[CLOSED]) - this.close() + if (typeof this.close === 'function' && !this[CLOSED]) this.close() - if (er) - this.emit('error', er) - else // if no error to emit, still reject pending promises - this.emit(DESTROYED) + if (er) this.emit('error', er) + // if no error to emit, still reject pending promises + else this.emit(DESTROYED) return this } - static isStream (s) { - return !!s && (s instanceof Minipass || s instanceof Stream || - s instanceof EE && ( - typeof s.pipe === 'function' || // readable - (typeof s.write === 'function' && typeof s.end === 'function') // writable - )) + static isStream(s) { + return ( + !!s && + (s instanceof Minipass || + s instanceof Stream || + (s instanceof EE && + (typeof s.pipe === 'function' || // readable + (typeof s.write === 'function' && typeof s.end === 'function')))) // writable + ) } } diff --git a/deps/npm/node_modules/minipass/package.json b/deps/npm/node_modules/minipass/package.json index ca30e694aa4497..43051ad5b6c831 100644 --- a/deps/npm/node_modules/minipass/package.json +++ b/deps/npm/node_modules/minipass/package.json @@ -1,12 +1,9 @@ { "name": "minipass", - "version": "4.0.0", + "version": "4.0.3", "description": "minimal implementation of a PassThrough stream", "main": "index.js", "types": "index.d.ts", - "dependencies": { - "yallist": "^4.0.0" - }, "devDependencies": { "@types/node": "^17.0.41", "end-of-stream": "^1.4.0", @@ -14,13 +11,16 @@ "tap": "^16.2.0", "through2": "^2.0.3", "ts-node": "^10.8.1", + "typedoc": "^0.23.24", "typescript": "^4.7.3" }, "scripts": { "test": "tap", "preversion": "npm test", "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" + "postpublish": "git push origin --follow-tags", + "typedoc": "typedoc ./index.d.ts", + "format": "prettier --write . --loglevel warn" }, "repository": { "type": "git", diff --git a/deps/npm/node_modules/mute-stream/lib/index.js b/deps/npm/node_modules/mute-stream/lib/index.js new file mode 100644 index 00000000000000..368f727e2c3ed8 --- /dev/null +++ b/deps/npm/node_modules/mute-stream/lib/index.js @@ -0,0 +1,142 @@ +const Stream = require('stream') + +class MuteStream extends Stream { + #isTTY = null + + constructor (opts = {}) { + super(opts) + this.writable = this.readable = true + this.muted = false + this.on('pipe', this._onpipe) + this.replace = opts.replace + + // For readline-type situations + // This much at the start of a line being redrawn after a ctrl char + // is seen (such as backspace) won't be redrawn as the replacement + this._prompt = opts.prompt || null + this._hadControl = false + } + + #destSrc (key, def) { + if (this._dest) { + return this._dest[key] + } + if (this._src) { + return this._src[key] + } + return def + } + + #proxy (method, ...args) { + if (typeof this._dest?.[method] === 'function') { + this._dest[method](...args) + } + if (typeof this._src?.[method] === 'function') { + this._src[method](...args) + } + } + + get isTTY () { + if (this.#isTTY !== null) { + return this.#isTTY + } + return this.#destSrc('isTTY', false) + } + + // basically just get replace the getter/setter with a regular value + set isTTY (val) { + this.#isTTY = val + } + + get rows () { + return this.#destSrc('rows') + } + + get columns () { + return this.#destSrc('columns') + } + + mute () { + this.muted = true + } + + unmute () { + this.muted = false + } + + _onpipe (src) { + this._src = src + } + + pipe (dest, options) { + this._dest = dest + return super.pipe(dest, options) + } + + pause () { + if (this._src) { + return this._src.pause() + } + } + + resume () { + if (this._src) { + return this._src.resume() + } + } + + write (c) { + if (this.muted) { + if (!this.replace) { + return true + } + // eslint-disable-next-line no-control-regex + if (c.match(/^\u001b/)) { + if (c.indexOf(this._prompt) === 0) { + c = c.slice(this._prompt.length) + c = c.replace(/./g, this.replace) + c = this._prompt + c + } + this._hadControl = true + return this.emit('data', c) + } else { + if (this._prompt && this._hadControl && + c.indexOf(this._prompt) === 0) { + this._hadControl = false + this.emit('data', this._prompt) + c = c.slice(this._prompt.length) + } + c = c.toString().replace(/./g, this.replace) + } + } + this.emit('data', c) + } + + end (c) { + if (this.muted) { + if (c && this.replace) { + c = c.toString().replace(/./g, this.replace) + } else { + c = null + } + } + if (c) { + this.emit('data', c) + } + this.emit('end') + } + + destroy (...args) { + return this.#proxy('destroy', ...args) + } + + destroySoon (...args) { + return this.#proxy('destroySoon', ...args) + } + + close (...args) { + return this.#proxy('close', ...args) + } +} + +module.exports = MuteStream diff --git a/deps/npm/node_modules/mute-stream/mute.js b/deps/npm/node_modules/mute-stream/mute.js deleted file mode 100644 index a24fc09975bb32..00000000000000 --- a/deps/npm/node_modules/mute-stream/mute.js +++ /dev/null @@ -1,145 +0,0 @@ -var Stream = require('stream') - -module.exports = MuteStream - -// var out = new MuteStream(process.stdout) -// argument auto-pipes -function MuteStream (opts) { - Stream.apply(this) - opts = opts || {} - this.writable = this.readable = true - this.muted = false - this.on('pipe', this._onpipe) - this.replace = opts.replace - - // For readline-type situations - // This much at the start of a line being redrawn after a ctrl char - // is seen (such as backspace) won't be redrawn as the replacement - this._prompt = opts.prompt || null - this._hadControl = false -} - -MuteStream.prototype = Object.create(Stream.prototype) - -Object.defineProperty(MuteStream.prototype, 'constructor', { - value: MuteStream, - enumerable: false -}) - -MuteStream.prototype.mute = function () { - this.muted = true -} - -MuteStream.prototype.unmute = function () { - this.muted = false -} - -Object.defineProperty(MuteStream.prototype, '_onpipe', { - value: onPipe, - enumerable: false, - writable: true, - configurable: true -}) - -function onPipe (src) { - this._src = src -} - -Object.defineProperty(MuteStream.prototype, 'isTTY', { - get: getIsTTY, - set: setIsTTY, - enumerable: true, - configurable: true -}) - -function getIsTTY () { - return( (this._dest) ? this._dest.isTTY - : (this._src) ? this._src.isTTY - : false - ) -} - -// basically just get replace the getter/setter with a regular value -function setIsTTY (isTTY) { - Object.defineProperty(this, 'isTTY', { - value: isTTY, - enumerable: true, - writable: true, - configurable: true - }) -} - -Object.defineProperty(MuteStream.prototype, 'rows', { - get: function () { - return( this._dest ? this._dest.rows - : this._src ? this._src.rows - : undefined ) - }, enumerable: true, configurable: true }) - -Object.defineProperty(MuteStream.prototype, 'columns', { - get: function () { - return( this._dest ? this._dest.columns - : this._src ? this._src.columns - : undefined ) - }, enumerable: true, configurable: true }) - - -MuteStream.prototype.pipe = function (dest, options) { - this._dest = dest - return Stream.prototype.pipe.call(this, dest, options) -} - -MuteStream.prototype.pause = function () { - if (this._src) return this._src.pause() -} - -MuteStream.prototype.resume = function () { - if (this._src) return this._src.resume() -} - -MuteStream.prototype.write = function (c) { - if (this.muted) { - if (!this.replace) return true - if (c.match(/^\u001b/)) { - if(c.indexOf(this._prompt) === 0) { - c = c.substr(this._prompt.length); - c = c.replace(/./g, this.replace); - c = this._prompt + c; - } - this._hadControl = true - return this.emit('data', c) - } else { - if (this._prompt && this._hadControl && - c.indexOf(this._prompt) === 0) { - this._hadControl = false - this.emit('data', this._prompt) - c = c.substr(this._prompt.length) - } - c = c.toString().replace(/./g, this.replace) - } - } - this.emit('data', c) -} - -MuteStream.prototype.end = function (c) { - if (this.muted) { - if (c && this.replace) { - c = c.toString().replace(/./g, this.replace) - } else { - c = null - } - } - if (c) this.emit('data', c) - this.emit('end') -} - -function proxy (fn) { return function () { - var d = this._dest - var s = this._src - if (d && d[fn]) d[fn].apply(d, arguments) - if (s && s[fn]) s[fn].apply(s, arguments) -}} - -MuteStream.prototype.destroy = proxy('destroy') -MuteStream.prototype.destroySoon = proxy('destroySoon') -MuteStream.prototype.close = proxy('close') diff --git a/deps/npm/node_modules/mute-stream/package.json b/deps/npm/node_modules/mute-stream/package.json index 56ebb363b92511..37b2f5070ed69f 100644 --- a/deps/npm/node_modules/mute-stream/package.json +++ b/deps/npm/node_modules/mute-stream/package.json @@ -1,29 +1,52 @@ { "name": "mute-stream", - "version": "0.0.8", - "main": "mute.js", - "directories": { - "test": "test" - }, + "version": "1.0.0", + "main": "lib/index.js", "devDependencies": { - "tap": "^12.1.1" + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.0" }, "scripts": { - "test": "tap test/*.js --cov" + "test": "tap", + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "snap": "tap", + "posttest": "npm run lint" }, "repository": { "type": "git", - "url": "git://github.com/isaacs/mute-stream" + "url": "https://github.com/npm/mute-stream.git" }, "keywords": [ "mute", "stream", "pipe" ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "author": "GitHub Inc.", "license": "ISC", "description": "Bytes go in, but they don't come out (when muted).", "files": [ - "mute.js" - ] + "bin/", + "lib/" + ], + "tap": { + "statements": 70, + "branches": 60, + "functions": 81, + "lines": 70, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "4.11.0" + } } diff --git a/deps/npm/node_modules/node-gyp/.github/workflows/tests.yml b/deps/npm/node_modules/node-gyp/.github/workflows/tests.yml index a3b68bdd5d387d..8f34d4e11fdc6f 100644 --- a/deps/npm/node_modules/node-gyp/.github/workflows/tests.yml +++ b/deps/npm/node_modules/node-gyp/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: max-parallel: 15 matrix: node: [14.x, 16.x, 18.x] - python: ["3.6", "3.8", "3.10"] + python: ["3.7", "3.9", "3.11"] os: [macos-latest, ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: diff --git a/deps/npm/node_modules/node-gyp/CHANGELOG.md b/deps/npm/node_modules/node-gyp/CHANGELOG.md index 54f0b4f427a546..4131521515994e 100644 --- a/deps/npm/node_modules/node-gyp/CHANGELOG.md +++ b/deps/npm/node_modules/node-gyp/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +### [9.3.1](https://www.github.com/nodejs/node-gyp/compare/v9.3.0...v9.3.1) (2022-12-16) + + +### Bug Fixes + +* increase node 12 support to ^12.13 ([#2771](https://www.github.com/nodejs/node-gyp/issues/2771)) ([888efb9](https://www.github.com/nodejs/node-gyp/commit/888efb9055857afee6a6b54550722cf9ae3ee323)) + + +### Miscellaneous + +* update python test matrix ([#2774](https://www.github.com/nodejs/node-gyp/issues/2774)) ([38f01fa](https://www.github.com/nodejs/node-gyp/commit/38f01fa57d10fdb3db7697121d957bc2e0e96508)) + ## [9.3.0](https://www.github.com/nodejs/node-gyp/compare/v9.2.0...v9.3.0) (2022-10-10) diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/common.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/common.js index e094f750472f78..61a4452f097dcd 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/common.js +++ b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/common.js @@ -57,6 +57,12 @@ function setopts (self, pattern, options) { pattern = "**/" + pattern } + self.windowsPathsNoEscape = !!options.windowsPathsNoEscape || + options.allowWindowsEscape === false + if (self.windowsPathsNoEscape) { + pattern = pattern.replace(/\\/g, '/') + } + self.silent = !!options.silent self.pattern = pattern self.strict = options.strict !== false @@ -112,8 +118,6 @@ function setopts (self, pattern, options) { // Note that they are not supported in Glob itself anyway. options.nonegate = true options.nocomment = true - // always treat \ in patterns as escapes, not path separators - options.allowWindowsEscape = true self.minimatch = new Minimatch(pattern, options) self.options = self.minimatch.options diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/package.json b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/package.json index 5134253e32226f..ca0fd916211b51 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/package.json @@ -2,7 +2,7 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me/)", "name": "glob", "description": "a little globber", - "version": "8.0.3", + "version": "8.1.0", "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/LICENSE index 9517b7d995bb03..1493534e60dce4 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/LICENSE +++ b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors +Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/minimatch.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/minimatch.js index 71c96a1fb71cce..6c8bfc35181c6d 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/minimatch.js +++ b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/minimatch.js @@ -157,7 +157,9 @@ minimatch.match = (list, pattern, options = {}) => { // replace stuff like \* with * const globUnescape = s => s.replace(/\\(.)/g, '$1') +const charUnescape = s => s.replace(/\\([^-\]])/g, '$1') const regExpEscape = s => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +const braExpEscape = s => s.replace(/[[\]\\]/g, '\\$&') class Minimatch { constructor (pattern, options) { @@ -243,7 +245,7 @@ class Minimatch { negateOffset++ } - if (negateOffset) this.pattern = pattern.substr(negateOffset) + if (negateOffset) this.pattern = pattern.slice(negateOffset) this.negate = negate } @@ -425,7 +427,7 @@ class Minimatch { if (pattern === '') return '' let re = '' - let hasMagic = !!options.nocase + let hasMagic = false let escaping = false // ? => one single character const patternListStack = [] @@ -438,11 +440,23 @@ class Minimatch { let pl let sp // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - const patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' + // even when options.dot is set. However, if the pattern + // starts with ., then traversal patterns can match. + let dotTravAllowed = pattern.charAt(0) === '.' + let dotFileAllowed = options.dot || dotTravAllowed + const patternStart = () => + dotTravAllowed + ? '' + : dotFileAllowed + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)' + const subPatternStart = (p) => + p.charAt(0) === '.' + ? '' + : options.dot + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)' + const clearStateChar = () => { if (stateChar) { @@ -492,6 +506,11 @@ class Minimatch { } case '\\': + if (inClass && pattern.charAt(i + 1) === '-') { + re += c + continue + } + clearStateChar() escaping = true continue @@ -526,7 +545,7 @@ class Minimatch { if (options.noext) clearStateChar() continue - case '(': + case '(': { if (inClass) { re += '(' continue @@ -537,46 +556,64 @@ class Minimatch { continue } - patternListStack.push({ + const plEntry = { type: stateChar, start: i - 1, reStart: re.length, open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + close: plTypes[stateChar].close, + } + this.debug(this.pattern, '\t', plEntry) + patternListStack.push(plEntry) + // negation is (?:(?!(?:js)(?:))[^/]*) + re += plEntry.open + // next entry starts with a dot maybe? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true + re += subPatternStart(pattern.slice(i + 1)) + } this.debug('plType %j %j', stateChar, re) stateChar = false - continue + continue + } - case ')': - if (inClass || !patternListStack.length) { + case ')': { + const plEntry = patternListStack[patternListStack.length - 1] + if (inClass || !plEntry) { re += '\\)' continue } + patternListStack.pop() + // closing an extglob clearStateChar() hasMagic = true - pl = patternListStack.pop() + pl = plEntry // negation is (?:(?!js)[^/]*) // The others are (?:) re += pl.close if (pl.type === '!') { - negativeLists.push(pl) + negativeLists.push(Object.assign(pl, { reEnd: re.length })) } - pl.reEnd = re.length - continue + continue + } - case '|': - if (inClass || !patternListStack.length) { + case '|': { + const plEntry = patternListStack[patternListStack.length - 1] + if (inClass || !plEntry) { re += '\\|' continue } clearStateChar() re += '|' - continue + // next subpattern can start with a dot? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true + re += subPatternStart(pattern.slice(i + 1)) + } + continue + } // these are mostly the same in regexp and glob case '[': @@ -604,8 +641,6 @@ class Minimatch { continue } - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" // split where the last [ was, make sure we don't have // an invalid re. if so, re-walk the contents of the // would-be class to re-translate any characters that @@ -615,20 +650,16 @@ class Minimatch { // to do safely. For now, this is safe and works. cs = pattern.substring(classStart + 1, i) try { - RegExp('[' + cs + ']') + RegExp('[' + braExpEscape(charUnescape(cs)) + ']') + // looks good, finish up the class. + re += c } catch (er) { - // not a valid class! - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue + // out of order ranges in JS are errors, but in glob syntax, + // they're just a range that matches nothing. + re = re.substring(0, reClassStart) + '(?:$.)' // match nothing ever } - - // finish up the class. hasMagic = true inClass = false - re += c continue default: @@ -652,9 +683,9 @@ class Minimatch { // this is a huge pita. We now have to re-walk // the contents of the would-be class to re-translate // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) + cs = pattern.slice(classStart + 1) sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + re = re.substring(0, reClassStart) + '\\[' + sp[0] hasMagic = hasMagic || sp[1] } @@ -721,14 +752,16 @@ class Minimatch { // Handle nested stuff like *(*.js|!(*.json)), where open parens // mean that we should *not* include the ) in the bit that is considered // "after" the negated section. - const openParensBefore = nlBefore.split('(').length - 1 + const closeParensBefore = nlBefore.split(')').length + const openParensBefore = nlBefore.split('(').length - closeParensBefore let cleanAfter = nlAfter for (let i = 0; i < openParensBefore; i++) { cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') } nlAfter = cleanAfter - const dollar = nlAfter === '' && isSub !== SUBPARSE ? '$' : '' + const dollar = nlAfter === '' && isSub !== SUBPARSE ? '(?:$|\\/)' : '' + re = nlBefore + nlFirst + nlAfter + dollar + nlLast } @@ -740,7 +773,7 @@ class Minimatch { } if (addPatternStart) { - re = patternStart + re + re = patternStart() + re } // parsing just a piece of a larger pattern. @@ -748,6 +781,11 @@ class Minimatch { return [re, hasMagic] } + // if it's nocase, and the lcase/uppercase don't match, it's magic + if (options.nocase && !hasMagic) { + hasMagic = pattern.toUpperCase() !== pattern.toLowerCase() + } + // skip the regexp for non-magical patterns // unescape anything in it, though, so that it'll be // an exact match against a file etc. diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/package.json b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/package.json index 8e1a84285d38f3..c8809dbb3119d9 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/package.json @@ -2,7 +2,10 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me)", "name": "minimatch", "description": "a glob matcher in javascript", - "version": "5.1.0", + "publishConfig": { + "tag": "legacy-v5" + }, + "version": "5.1.6", "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" @@ -22,7 +25,7 @@ "brace-expansion": "^2.0.1" }, "devDependencies": { - "tap": "^15.1.6" + "tap": "^16.3.2" }, "license": "ISC", "files": [ diff --git a/deps/npm/node_modules/node-gyp/node_modules/fs-minipass/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/fs-minipass/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/fs-minipass/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/fs-minipass/index.js b/deps/npm/node_modules/node-gyp/node_modules/fs-minipass/index.js similarity index 100% rename from deps/npm/node_modules/fs-minipass/index.js rename to deps/npm/node_modules/node-gyp/node_modules/fs-minipass/index.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/fs-minipass/package.json b/deps/npm/node_modules/node-gyp/node_modules/fs-minipass/package.json new file mode 100644 index 00000000000000..2f2436cb5c3b1a --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/fs-minipass/package.json @@ -0,0 +1,39 @@ +{ + "name": "fs-minipass", + "version": "2.1.0", + "main": "index.js", + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags" + }, + "keywords": [], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/fs-minipass.git" + }, + "bugs": { + "url": "https://github.com/npm/fs-minipass/issues" + }, + "homepage": "https://github.com/npm/fs-minipass#readme", + "description": "fs read and write streams based on minipass", + "dependencies": { + "minipass": "^3.0.0" + }, + "devDependencies": { + "mutate-fs": "^2.0.1", + "tap": "^14.6.4" + }, + "files": [ + "index.js" + ], + "tap": { + "check-coverage": true + }, + "engines": { + "node": ">= 8" + } +} diff --git a/deps/npm/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/CONTRIBUTING.md similarity index 100% rename from deps/npm/node_modules/readable-stream/CONTRIBUTING.md rename to deps/npm/node_modules/node-gyp/node_modules/readable-stream/CONTRIBUTING.md diff --git a/deps/npm/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/GOVERNANCE.md similarity index 100% rename from deps/npm/node_modules/readable-stream/GOVERNANCE.md rename to deps/npm/node_modules/node-gyp/node_modules/readable-stream/GOVERNANCE.md diff --git a/deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/LICENSE similarity index 100% rename from deps/npm/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE rename to deps/npm/node_modules/node-gyp/node_modules/readable-stream/LICENSE diff --git a/deps/npm/node_modules/readable-stream/errors-browser.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/errors-browser.js similarity index 100% rename from deps/npm/node_modules/readable-stream/errors-browser.js rename to deps/npm/node_modules/node-gyp/node_modules/readable-stream/errors-browser.js diff --git a/deps/npm/node_modules/readable-stream/errors.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/errors.js similarity index 100% rename from deps/npm/node_modules/readable-stream/errors.js rename to deps/npm/node_modules/node-gyp/node_modules/readable-stream/errors.js diff --git a/deps/npm/node_modules/readable-stream/experimentalWarning.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/experimentalWarning.js similarity index 100% rename from deps/npm/node_modules/readable-stream/experimentalWarning.js rename to deps/npm/node_modules/node-gyp/node_modules/readable-stream/experimentalWarning.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 00000000000000..67525192250f6d --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,139 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. +'use strict'; +/**/ + +var objectKeys = Object.keys || function (obj) { + var keys = []; + + for (var key in obj) { + keys.push(key); + } + + return keys; +}; +/**/ + + +module.exports = Duplex; + +var Readable = require('./_stream_readable'); + +var Writable = require('./_stream_writable'); + +require('inherits')(Duplex, Readable); + +{ + // Allow the keys array to be GC'ed. + var keys = objectKeys(Writable.prototype); + + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + this.allowHalfOpen = true; + + if (options) { + if (options.readable === false) this.readable = false; + if (options.writable === false) this.writable = false; + + if (options.allowHalfOpen === false) { + this.allowHalfOpen = false; + this.once('end', onend); + } + } +} + +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } +}); +Object.defineProperty(Duplex.prototype, 'writableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } +}); +Object.defineProperty(Duplex.prototype, 'writableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } +}); // the no-half-open enforcer + +function onend() { + // If the writable side ended, then we're ok. + if (this._writableState.ended) return; // no more data can be written. + // But allow more writes to happen in this tick. + + process.nextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +Object.defineProperty(Duplex.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } // backward compatibility, the user is explicitly + // managing destroyed + + + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); \ No newline at end of file diff --git a/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 00000000000000..32e7414c5a8271 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,39 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +require('inherits')(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 00000000000000..192d451488f208 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,1124 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. +'use strict'; + +module.exports = Readable; +/**/ + +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; +/**/ + +var EE = require('events').EventEmitter; + +var EElistenerCount = function EElistenerCount(emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ + + +var Stream = require('./internal/streams/stream'); +/**/ + + +var Buffer = require('buffer').Buffer; + +var OurUint8Array = global.Uint8Array || function () {}; + +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} + +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} +/**/ + + +var debugUtil = require('util'); + +var debug; + +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function debug() {}; +} +/**/ + + +var BufferList = require('./internal/streams/buffer_list'); + +var destroyImpl = require('./internal/streams/destroy'); + +var _require = require('./internal/streams/state'), + getHighWaterMark = _require.getHighWaterMark; + +var _require$codes = require('../errors').codes, + ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, + ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance. + + +var StringDecoder; +var createReadableStreamAsyncIterator; +var from; + +require('inherits')(Readable, Stream); + +var errorOrDestroy = destroyImpl.errorOrDestroy; +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + +function ReadableState(options, stream, isDuplex) { + Duplex = Duplex || require('./_stream_duplex'); + options = options || {}; // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + + this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + + this.sync = true; // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.paused = true; // Should close be emitted on destroy. Defaults to true. + + this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish') + + this.autoDestroy = !!options.autoDestroy; // has it been destroyed + + this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + + this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s + + this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled + + this.readingMore = false; + this.decoder = null; + this.encoding = null; + + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside + // the ReadableState constructor, at least with V8 6.5 + + var isDuplex = this instanceof Duplex; + this._readableState = new ReadableState(options, this, isDuplex); // legacy + + this.readable = true; + + if (options) { + if (typeof options.read === 'function') this._read = options.read; + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + + Stream.call(this); +} + +Object.defineProperty(Readable.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === undefined) { + return false; + } + + return this._readableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } // backward compatibility, the user is explicitly + // managing destroyed + + + this._readableState.destroyed = value; + } +}); +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; + +Readable.prototype._destroy = function (err, cb) { + cb(err); +}; // Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. + + +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; // Unshift should *always* be something directly out of read() + + +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; + +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + debug('readableAddChunk', chunk); + var state = stream._readableState; + + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + + if (er) { + errorOrDestroy(stream, er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (addToFront) { + if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); + } else if (state.ended) { + errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); + } else if (state.destroyed) { + return false; + } else { + state.reading = false; + + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + maybeReadMore(stream, state); + } + } // We can push more data if we are below the highWaterMark. + // Also, if we have no data yet, we can stand some more bytes. + // This is to work around cases where hwm=0, such as the repl. + + + return !state.ended && (state.length < state.highWaterMark || state.length === 0); +} + +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + state.awaitDrain = 0; + stream.emit('data', chunk); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + if (state.needReadable) emitReadable(stream); + } + + maybeReadMore(stream, state); +} + +function chunkInvalid(state, chunk) { + var er; + + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); + } + + return er; +} + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; // backwards compatibility. + + +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + var decoder = new StringDecoder(enc); + this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8 + + this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers: + + var p = this._readableState.buffer.head; + var content = ''; + + while (p !== null) { + content += decoder.write(p.data); + p = p.next; + } + + this._readableState.buffer.clear(); + + if (content !== '') this._readableState.buffer.push(content); + this._readableState.length = content.length; + return this; +}; // Don't raise the hwm > 1GB + + +var MAX_HWM = 0x40000000; + +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + + return n; +} // This function is designed to be inlinable, so please take care when making +// changes to the function body. + + +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } // If we're asking for more than the current hwm, then raise the hwm. + + + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; // Don't have enough + + if (!state.ended) { + state.needReadable = true; + return 0; + } + + return state.length; +} // you can override either this method, or the async _read(n) below. + + +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + + if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up. + + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + // if we need a readable event, then we need to do some reading. + + + var doRead = state.needReadable; + debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some + + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + + + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; // if the length is currently zero, then we *need* a readable event. + + if (state.length === 0) state.needReadable = true; // call internal read method + + this._read(state.highWaterMark); + + state.sync = false; // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = state.length <= state.highWaterMark; + n = 0; + } else { + state.length -= n; + state.awaitDrain = 0; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick. + + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + return ret; +}; + +function onEofChunk(stream, state) { + debug('onEofChunk'); + if (state.ended) return; + + if (state.decoder) { + var chunk = state.decoder.end(); + + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + + state.ended = true; + + if (state.sync) { + // if we are sync, wait until next tick to emit the data. + // Otherwise we risk emitting data in the flow() + // the readable code triggers during a read() call + emitReadable(stream); + } else { + // emit 'readable' now to make sure it gets picked up. + state.needReadable = false; + + if (!state.emittedReadable) { + state.emittedReadable = true; + emitReadable_(stream); + } + } +} // Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. + + +function emitReadable(stream) { + var state = stream._readableState; + debug('emitReadable', state.needReadable, state.emittedReadable); + state.needReadable = false; + + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + process.nextTick(emitReadable_, stream); + } +} + +function emitReadable_(stream) { + var state = stream._readableState; + debug('emitReadable_', state.destroyed, state.length, state.ended); + + if (!state.destroyed && (state.length || state.ended)) { + stream.emit('readable'); + state.emittedReadable = false; + } // The stream needs another readable event if + // 1. It is not flowing, as the flow mechanism will take + // care of it. + // 2. It is not ended. + // 3. It is below the highWaterMark, so we can schedule + // another readable later. + + + state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; + flow(stream); +} // at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. + + +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + // Attempt to read more data if we should. + // + // The conditions for reading more data are (one of): + // - Not enough data buffered (state.length < state.highWaterMark). The loop + // is responsible for filling the buffer with enough data if such data + // is available. If highWaterMark is 0 and we are not in the flowing mode + // we should _not_ attempt to buffer any extra data. We'll get more data + // when the stream consumer calls read() instead. + // - No data in the buffer, and the stream is in flowing mode. In this mode + // the loop below is responsible for ensuring read() is called. Failing to + // call read here would abort the flow and there's no other mechanism for + // continuing the flow if the stream consumer has just subscribed to the + // 'data' event. + // + // In addition to the above conditions to keep reading data, the following + // conditions prevent the data from being read: + // - The stream has ended (state.ended). + // - There is already a pending 'read' operation (state.reading). This is a + // case where the the stream has called the implementation defined _read() + // method, but they are processing the call asynchronously and have _not_ + // called push() with new data. In this case we skip performing more + // read()s. The execution ends in this method again after the _read() ends + // up calling push() with more data. + while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { + var len = state.length; + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) // didn't get any data, stop spinning. + break; + } + + state.readingMore = false; +} // abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. + + +Readable.prototype._read = function (n) { + errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + + case 1: + state.pipes = [state.pipes, dest]; + break; + + default: + state.pipes.push(dest); + break; + } + + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); + dest.on('unpipe', onunpipe); + + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + + function onend() { + debug('onend'); + dest.end(); + } // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + + + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + var cleanedUp = false; + + function cleanup() { + debug('cleanup'); // cleanup event handlers once the pipe is broken + + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + cleanedUp = true; // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + src.on('data', ondata); + + function ondata(chunk) { + debug('ondata'); + var ret = dest.write(chunk); + debug('dest.write', ret); + + if (ret === false) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', state.awaitDrain); + state.awaitDrain++; + } + + src.pause(); + } + } // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + + + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); + } // Make sure our error handler is attached before userland ones. + + + prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once. + + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + + dest.once('close', onclose); + + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } // tell the dest that it's being piped to + + + dest.emit('pipe', src); // start the flow if it hasn't been started already. + + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function pipeOnDrainFunctionResult() { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { + hasUnpiped: false + }; // if we're not piping anywhere, then do nothing. + + if (state.pipesCount === 0) return this; // just one destination. most common case. + + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + if (!dest) dest = state.pipes; // got a match. + + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } // slow case. multiple pipe destinations. + + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, { + hasUnpiped: false + }); + } + + return this; + } // try to find the right one. + + + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + dest.emit('unpipe', this, unpipeInfo); + return this; +}; // set up data events if they are asked for +// Ensure readable listeners eventually get something + + +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + var state = this._readableState; + + if (ev === 'data') { + // update readableListening so that resume() may be a no-op + // a few lines down. This is needed to support once('readable'). + state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused + + if (state.flowing !== false) this.resume(); + } else if (ev === 'readable') { + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.flowing = false; + state.emittedReadable = false; + debug('on readable', state.length, state.reading); + + if (state.length) { + emitReadable(this); + } else if (!state.reading) { + process.nextTick(nReadingNextTick, this); + } + } + } + + return res; +}; + +Readable.prototype.addListener = Readable.prototype.on; + +Readable.prototype.removeListener = function (ev, fn) { + var res = Stream.prototype.removeListener.call(this, ev, fn); + + if (ev === 'readable') { + // We need to check if there is someone still listening to + // readable and reset the state. However this needs to happen + // after readable has been emitted but before I/O (nextTick) to + // support once('readable', fn) cycles. This means that calling + // resume within the same tick will have no + // effect. + process.nextTick(updateReadableListening, this); + } + + return res; +}; + +Readable.prototype.removeAllListeners = function (ev) { + var res = Stream.prototype.removeAllListeners.apply(this, arguments); + + if (ev === 'readable' || ev === undefined) { + // We need to check if there is someone still listening to + // readable and reset the state. However this needs to happen + // after readable has been emitted but before I/O (nextTick) to + // support once('readable', fn) cycles. This means that calling + // resume within the same tick will have no + // effect. + process.nextTick(updateReadableListening, this); + } + + return res; +}; + +function updateReadableListening(self) { + var state = self._readableState; + state.readableListening = self.listenerCount('readable') > 0; + + if (state.resumeScheduled && !state.paused) { + // flowing needs to be set to true now, otherwise + // the upcoming resume will not flow. + state.flowing = true; // crude way to check if we should resume + } else if (self.listenerCount('data') > 0) { + self.resume(); + } +} + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} // pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. + + +Readable.prototype.resume = function () { + var state = this._readableState; + + if (!state.flowing) { + debug('resume'); // we flow only if there is no one listening + // for readable, but we still have to call + // resume() + + state.flowing = !state.readableListening; + resume(this, state); + } + + state.paused = false; + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + debug('resume', state.reading); + + if (!state.reading) { + stream.read(0); + } + + state.resumeScheduled = false; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + + if (this._readableState.flowing !== false) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + + this._readableState.paused = true; + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + + while (state.flowing && stream.read() !== null) { + ; + } +} // wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. + + +Readable.prototype.wrap = function (stream) { + var _this = this; + + var state = this._readableState; + var paused = false; + stream.on('end', function () { + debug('wrapped end'); + + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + + _this.push(null); + }); + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode + + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = _this.push(chunk); + + if (!ret) { + paused = true; + stream.pause(); + } + }); // proxy all the other methods. + // important when wrapping filters and duplexes. + + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function methodWrap(method) { + return function methodWrapReturnFunction() { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } // proxy certain important events. + + + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } // when we try to consume some more bytes, simply unpause the + // underlying stream. + + + this._read = function (n) { + debug('wrapped _read', n); + + if (paused) { + paused = false; + stream.resume(); + } + }; + + return this; +}; + +if (typeof Symbol === 'function') { + Readable.prototype[Symbol.asyncIterator] = function () { + if (createReadableStreamAsyncIterator === undefined) { + createReadableStreamAsyncIterator = require('./internal/streams/async_iterator'); + } + + return createReadableStreamAsyncIterator(this); + }; +} + +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.highWaterMark; + } +}); +Object.defineProperty(Readable.prototype, 'readableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState && this._readableState.buffer; + } +}); +Object.defineProperty(Readable.prototype, 'readableFlowing', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.flowing; + }, + set: function set(state) { + if (this._readableState) { + this._readableState.flowing = state; + } + } +}); // exposed for testing purposes only. + +Readable._fromList = fromList; +Object.defineProperty(Readable.prototype, 'readableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.length; + } +}); // Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. + +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = state.buffer.consume(n, state.decoder); + } + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + debug('endReadable', state.endEmitted); + + if (!state.endEmitted) { + state.ended = true; + process.nextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift. + + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + + if (state.autoDestroy) { + // In case of duplex streams we need a way to detect + // if the writable side is ready for autoDestroy as well + var wState = stream._writableState; + + if (!wState || wState.autoDestroy && wState.finished) { + stream.destroy(); + } + } + } +} + +if (typeof Symbol === 'function') { + Readable.from = function (iterable, opts) { + if (from === undefined) { + from = require('./internal/streams/from'); + } + + return from(Readable, iterable, opts); + }; +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + + return -1; +} \ No newline at end of file diff --git a/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 00000000000000..41a738c4e93599 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,201 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. +'use strict'; + +module.exports = Transform; + +var _require$codes = require('../errors').codes, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, + ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, + ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; + +var Duplex = require('./_stream_duplex'); + +require('inherits')(Transform, Duplex); + +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + + if (cb === null) { + return this.emit('error', new ERR_MULTIPLE_CALLBACK()); + } + + ts.writechunk = null; + ts.writecb = null; + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + Duplex.call(this, options); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; // start out asking for a readable event once data is transformed. + + this._readableState.needReadable = true; // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + if (typeof options.flush === 'function') this._flush = options.flush; + } // When the writable side finishes, then flush out anything remaining. + + + this.on('prefinish', prefinish); +} + +function prefinish() { + var _this = this; + + if (typeof this._flush === 'function' && !this._readableState.destroyed) { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; // This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. + + +Transform.prototype._transform = function (chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; // Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. + + +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && !ts.transforming) { + ts.transforming = true; + + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +Transform.prototype._destroy = function (err, cb) { + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + }); +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); // TODO(BridgeAR): Write a test for these two error cases + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + + if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); + if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); + return stream.push(null); +} \ No newline at end of file diff --git a/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 00000000000000..a2634d7c24fd5e --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,697 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. +'use strict'; + +module.exports = Writable; +/* */ + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} // It seems a linked list but it is not +// there will be only 2 of these for each stream + + +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ + + +var Duplex; +/**/ + +Writable.WritableState = WritableState; +/**/ + +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ + +var Stream = require('./internal/streams/stream'); +/**/ + + +var Buffer = require('buffer').Buffer; + +var OurUint8Array = global.Uint8Array || function () {}; + +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} + +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +var destroyImpl = require('./internal/streams/destroy'); + +var _require = require('./internal/streams/state'), + getHighWaterMark = _require.getHighWaterMark; + +var _require$codes = require('../errors').codes, + ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, + ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, + ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, + ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, + ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; + +var errorOrDestroy = destroyImpl.errorOrDestroy; + +require('inherits')(Writable, Stream); + +function nop() {} + +function WritableState(options, stream, isDuplex) { + Duplex = Duplex || require('./_stream_duplex'); + options = options || {}; // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream, + // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. + + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream + // contains buffers or objects. + + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + + this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called + + this.finalCalled = false; // drain event flag. + + this.needDrain = false; // at the start of calling end() + + this.ending = false; // when end() has been called, and returned + + this.ended = false; // when 'finish' is emitted + + this.finished = false; // has it been destroyed + + this.destroyed = false; // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + + this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + + this.length = 0; // a flag to see when we're in the middle of a write. + + this.writing = false; // when true all writes will be buffered until .uncork() call + + this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + + this.sync = true; // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + + this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb) + + this.onwrite = function (er) { + onwrite(stream, er); + }; // the callback that the user supplies to write(chunk,encoding,cb) + + + this.writecb = null; // the amount that is being written when _write is called. + + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + + this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + + this.prefinished = false; // True if the error was already emitted and should not be thrown again + + this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true. + + this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end') + + this.autoDestroy = !!options.autoDestroy; // count buffered requests + + this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + + while (current) { + out.push(current); + current = current.next; + } + + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function writableStateBufferGetter() { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); // Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. + + +var realHasInstance; + +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function value(object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function realHasInstance(object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + // Checking for a Stream.Duplex instance is faster here instead of inside + // the WritableState constructor, at least with V8 6.5 + + var isDuplex = this instanceof Duplex; + if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); + this._writableState = new WritableState(options, this, isDuplex); // legacy. + + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + if (typeof options.writev === 'function') this._writev = options.writev; + if (typeof options.destroy === 'function') this._destroy = options.destroy; + if (typeof options.final === 'function') this._final = options.final; + } + + Stream.call(this); +} // Otherwise people can pipe Writable streams, which is just wrong. + + +Writable.prototype.pipe = function () { + errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); +}; + +function writeAfterEnd(stream, cb) { + var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb + + errorOrDestroy(stream, er); + process.nextTick(cb, er); +} // Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. + + +function validChunk(stream, state, chunk, cb) { + var er; + + if (chunk === null) { + er = new ERR_STREAM_NULL_VALUES(); + } else if (typeof chunk !== 'string' && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); + } + + if (er) { + errorOrDestroy(stream, er); + process.nextTick(cb, er); + return false; + } + + return true; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + var isBuf = !state.objectMode && _isUint8Array(chunk); + + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + if (typeof cb !== 'function') cb = nop; + if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret; +}; + +Writable.prototype.cork = function () { + this._writableState.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +Object.defineProperty(Writable.prototype, 'writableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } +}); + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + + return chunk; +} + +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } +}); // if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. + +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false. + + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + process.nextTick(cb, er); // this can emit finish, and it will always happen + // after error + + process.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); // this can emit finish, but finish must + // always follow error + + finishMaybe(stream, state); + } +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); + onwriteStateUpdate(state); + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state) || stream.destroyed; + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + process.nextTick(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} // Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. + + +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} // if there's something in the buffer waiting, then process it + + +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + + state.pendingcb++; + state.lastBufferedRequest = null; + + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks + + if (state.corked) { + state.corked = 1; + this.uncork(); + } // ignore unnecessary end() calls. + + + if (!state.ending) endWritable(this, state, cb); + return this; +}; + +Object.defineProperty(Writable.prototype, 'writableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } +}); + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} + +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + + if (err) { + errorOrDestroy(stream, err); + } + + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} + +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function' && !state.destroyed) { + state.pendingcb++; + state.finalCalled = true; + process.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + + if (need) { + prefinish(stream, state); + + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + + if (state.autoDestroy) { + // In case of duplex streams we need a way to detect + // if the readable side is ready for autoDestroy as well + var rState = stream._readableState; + + if (!rState || rState.autoDestroy && rState.endEmitted) { + stream.destroy(); + } + } + } + } + + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + + if (cb) { + if (state.finished) process.nextTick(cb);else stream.once('finish', cb); + } + + state.ended = true; + stream.writable = false; +} + +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } // reuse the free corkReq. + + + state.corkedRequestsFree.next = corkReq; +} + +Object.defineProperty(Writable.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._writableState === undefined) { + return false; + } + + return this._writableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } // backward compatibility, the user is explicitly + // managing destroyed + + + this._writableState.destroyed = value; + } +}); +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; + +Writable.prototype._destroy = function (err, cb) { + cb(err); +}; \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/async_iterator.js similarity index 100% rename from deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js rename to deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/async_iterator.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/buffer_list.js new file mode 100644 index 00000000000000..cdea425f19dd96 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/buffer_list.js @@ -0,0 +1,210 @@ +'use strict'; + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var _require = require('buffer'), + Buffer = _require.Buffer; + +var _require2 = require('util'), + inspect = _require2.inspect; + +var custom = inspect && inspect.custom || 'inspect'; + +function copyBuffer(src, target, offset) { + Buffer.prototype.copy.call(src, target, offset); +} + +module.exports = +/*#__PURE__*/ +function () { + function BufferList() { + _classCallCheck(this, BufferList); + + this.head = null; + this.tail = null; + this.length = 0; + } + + _createClass(BufferList, [{ + key: "push", + value: function push(v) { + var entry = { + data: v, + next: null + }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + } + }, { + key: "unshift", + value: function unshift(v) { + var entry = { + data: v, + next: this.head + }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + } + }, { + key: "shift", + value: function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + } + }, { + key: "clear", + value: function clear() { + this.head = this.tail = null; + this.length = 0; + } + }, { + key: "join", + value: function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + + while (p = p.next) { + ret += s + p.data; + } + + return ret; + } + }, { + key: "concat", + value: function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + + return ret; + } // Consumes a specified amount of bytes or characters from the buffered data. + + }, { + key: "consume", + value: function consume(n, hasStrings) { + var ret; + + if (n < this.head.data.length) { + // `slice` is the same for buffers and strings. + ret = this.head.data.slice(0, n); + this.head.data = this.head.data.slice(n); + } else if (n === this.head.data.length) { + // First chunk is a perfect match. + ret = this.shift(); + } else { + // Result spans more than one buffer. + ret = hasStrings ? this._getString(n) : this._getBuffer(n); + } + + return ret; + } + }, { + key: "first", + value: function first() { + return this.head.data; + } // Consumes a specified amount of characters from the buffered data. + + }, { + key: "_getString", + value: function _getString(n) { + var p = this.head; + var c = 1; + var ret = p.data; + n -= ret.length; + + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) this.head = p.next;else this.head = this.tail = null; + } else { + this.head = p; + p.data = str.slice(nb); + } + + break; + } + + ++c; + } + + this.length -= c; + return ret; + } // Consumes a specified amount of bytes from the buffered data. + + }, { + key: "_getBuffer", + value: function _getBuffer(n) { + var ret = Buffer.allocUnsafe(n); + var p = this.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) this.head = p.next;else this.head = this.tail = null; + } else { + this.head = p; + p.data = buf.slice(nb); + } + + break; + } + + ++c; + } + + this.length -= c; + return ret; + } // Make sure the linked list only shows the minimal necessary information. + + }, { + key: custom, + value: function value(_, options) { + return inspect(this, _objectSpread({}, options, { + // Only inspect one level. + depth: 0, + // It should not recurse. + customInspect: false + })); + } + }]); + + return BufferList; +}(); \ No newline at end of file diff --git a/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/destroy.js new file mode 100644 index 00000000000000..3268a16f3b6f23 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/destroy.js @@ -0,0 +1,105 @@ +'use strict'; // undocumented cb() API, needed for core, not for public API + +function destroy(err, cb) { + var _this = this; + + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + process.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + process.nextTick(emitErrorNT, this, err); + } + } + + return this; + } // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + + if (this._readableState) { + this._readableState.destroyed = true; + } // if this is a duplex stream mark the writable part as destroyed as well + + + if (this._writableState) { + this._writableState.destroyed = true; + } + + this._destroy(err || null, function (err) { + if (!cb && err) { + if (!_this._writableState) { + process.nextTick(emitErrorAndCloseNT, _this, err); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + process.nextTick(emitErrorAndCloseNT, _this, err); + } else { + process.nextTick(emitCloseNT, _this); + } + } else if (cb) { + process.nextTick(emitCloseNT, _this); + cb(err); + } else { + process.nextTick(emitCloseNT, _this); + } + }); + + return this; +} + +function emitErrorAndCloseNT(self, err) { + emitErrorNT(self, err); + emitCloseNT(self); +} + +function emitCloseNT(self) { + if (self._writableState && !self._writableState.emitClose) return; + if (self._readableState && !self._readableState.emitClose) return; + self.emit('close'); +} + +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} + +function emitErrorNT(self, err) { + self.emit('error', err); +} + +function errorOrDestroy(stream, err) { + // We have tests that rely on errors being emitted + // in the same tick, so changing this is semver major. + // For now when you opt-in to autoDestroy we allow + // the error to be emitted nextTick. In a future + // semver major update we should change the default to this. + var rState = stream._readableState; + var wState = stream._writableState; + if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); +} + +module.exports = { + destroy: destroy, + undestroy: undestroy, + errorOrDestroy: errorOrDestroy +}; \ No newline at end of file diff --git a/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/end-of-stream.js new file mode 100644 index 00000000000000..831f286d98fa95 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/end-of-stream.js @@ -0,0 +1,104 @@ +// Ported from https://github.com/mafintosh/end-of-stream with +// permission from the author, Mathias Buus (@mafintosh). +'use strict'; + +var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE; + +function once(callback) { + var called = false; + return function () { + if (called) return; + called = true; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + callback.apply(this, args); + }; +} + +function noop() {} + +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +} + +function eos(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + callback = once(callback || noop); + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + + var onlegacyfinish = function onlegacyfinish() { + if (!stream.writable) onfinish(); + }; + + var writableEnded = stream._writableState && stream._writableState.finished; + + var onfinish = function onfinish() { + writable = false; + writableEnded = true; + if (!readable) callback.call(stream); + }; + + var readableEnded = stream._readableState && stream._readableState.endEmitted; + + var onend = function onend() { + readable = false; + readableEnded = true; + if (!writable) callback.call(stream); + }; + + var onerror = function onerror(err) { + callback.call(stream, err); + }; + + var onclose = function onclose() { + var err; + + if (readable && !readableEnded) { + if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + + if (writable && !writableEnded) { + if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + }; + + var onrequest = function onrequest() { + stream.req.on('finish', onfinish); + }; + + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest();else stream.on('request', onrequest); + } else if (writable && !stream._writableState) { + // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + return function () { + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +} + +module.exports = eos; \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/from-browser.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/from-browser.js similarity index 100% rename from deps/npm/node_modules/readable-stream/lib/internal/streams/from-browser.js rename to deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/from-browser.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/from.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/from.js new file mode 100644 index 00000000000000..6c41284416799c --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/from.js @@ -0,0 +1,64 @@ +'use strict'; + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var ERR_INVALID_ARG_TYPE = require('../../../errors').codes.ERR_INVALID_ARG_TYPE; + +function from(Readable, iterable, opts) { + var iterator; + + if (iterable && typeof iterable.next === 'function') { + iterator = iterable; + } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); + + var readable = new Readable(_objectSpread({ + objectMode: true + }, opts)); // Reading boolean to protect against _read + // being called before last iteration completion. + + var reading = false; + + readable._read = function () { + if (!reading) { + reading = true; + next(); + } + }; + + function next() { + return _next2.apply(this, arguments); + } + + function _next2() { + _next2 = _asyncToGenerator(function* () { + try { + var _ref = yield iterator.next(), + value = _ref.value, + done = _ref.done; + + if (done) { + readable.push(null); + } else if (readable.push((yield value))) { + next(); + } else { + reading = false; + } + } catch (err) { + readable.destroy(err); + } + }); + return _next2.apply(this, arguments); + } + + return readable; +} + +module.exports = from; \ No newline at end of file diff --git a/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/pipeline.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/pipeline.js new file mode 100644 index 00000000000000..6589909889c585 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/pipeline.js @@ -0,0 +1,97 @@ +// Ported from https://github.com/mafintosh/pump with +// permission from the author, Mathias Buus (@mafintosh). +'use strict'; + +var eos; + +function once(callback) { + var called = false; + return function () { + if (called) return; + called = true; + callback.apply(void 0, arguments); + }; +} + +var _require$codes = require('../../../errors').codes, + ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; + +function noop(err) { + // Rethrow the error if it exists to avoid swallowing it + if (err) throw err; +} + +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +} + +function destroyer(stream, reading, writing, callback) { + callback = once(callback); + var closed = false; + stream.on('close', function () { + closed = true; + }); + if (eos === undefined) eos = require('./end-of-stream'); + eos(stream, { + readable: reading, + writable: writing + }, function (err) { + if (err) return callback(err); + closed = true; + callback(); + }); + var destroyed = false; + return function (err) { + if (closed) return; + if (destroyed) return; + destroyed = true; // request.destroy just do .end - .abort is what we want + + if (isRequest(stream)) return stream.abort(); + if (typeof stream.destroy === 'function') return stream.destroy(); + callback(err || new ERR_STREAM_DESTROYED('pipe')); + }; +} + +function call(fn) { + fn(); +} + +function pipe(from, to) { + return from.pipe(to); +} + +function popCallback(streams) { + if (!streams.length) return noop; + if (typeof streams[streams.length - 1] !== 'function') return noop; + return streams.pop(); +} + +function pipeline() { + for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { + streams[_key] = arguments[_key]; + } + + var callback = popCallback(streams); + if (Array.isArray(streams[0])) streams = streams[0]; + + if (streams.length < 2) { + throw new ERR_MISSING_ARGS('streams'); + } + + var error; + var destroys = streams.map(function (stream, i) { + var reading = i < streams.length - 1; + var writing = i > 0; + return destroyer(stream, reading, writing, function (err) { + if (!error) error = err; + if (err) destroys.forEach(call); + if (reading) return; + destroys.forEach(call); + callback(error); + }); + }); + return streams.reduce(pipe); +} + +module.exports = pipeline; \ No newline at end of file diff --git a/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/state.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/state.js new file mode 100644 index 00000000000000..19887eb8a9070e --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/state.js @@ -0,0 +1,27 @@ +'use strict'; + +var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE; + +function highWaterMarkFrom(options, isDuplex, duplexKey) { + return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; +} + +function getHighWaterMark(state, options, duplexKey, isDuplex) { + var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); + + if (hwm != null) { + if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { + var name = isDuplex ? duplexKey : 'highWaterMark'; + throw new ERR_INVALID_OPT_VALUE(name, hwm); + } + + return Math.floor(hwm); + } // Default value + + + return state.objectMode ? 16 : 16 * 1024; +} + +module.exports = { + getHighWaterMark: getHighWaterMark +}; \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/stream-browser.js similarity index 100% rename from deps/npm/node_modules/readable-stream/lib/internal/streams/stream-browser.js rename to deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/stream-browser.js diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/stream.js similarity index 100% rename from deps/npm/node_modules/readable-stream/lib/internal/streams/stream.js rename to deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/internal/streams/stream.js diff --git a/deps/npm/node_modules/node-gyp/node_modules/readable-stream/package.json b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/package.json new file mode 100644 index 00000000000000..0b0c4bd207ace3 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/package.json @@ -0,0 +1,68 @@ +{ + "name": "readable-stream", + "version": "3.6.0", + "description": "Streams3, a user-land copy of the stream library from Node.js", + "main": "readable.js", + "engines": { + "node": ">= 6" + }, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "devDependencies": { + "@babel/cli": "^7.2.0", + "@babel/core": "^7.2.0", + "@babel/polyfill": "^7.0.0", + "@babel/preset-env": "^7.2.0", + "airtap": "0.0.9", + "assert": "^1.4.0", + "bl": "^2.0.0", + "deep-strict-equal": "^0.2.0", + "events.once": "^2.0.2", + "glob": "^7.1.2", + "gunzip-maybe": "^1.4.1", + "hyperquest": "^2.1.3", + "lolex": "^2.6.0", + "nyc": "^11.0.0", + "pump": "^3.0.0", + "rimraf": "^2.6.2", + "tap": "^12.0.0", + "tape": "^4.9.0", + "tar-fs": "^1.16.2", + "util-promisify": "^2.1.0" + }, + "scripts": { + "test": "tap -J --no-esm test/parallel/*.js test/ours/*.js", + "ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap", + "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js", + "test-browser-local": "airtap --open --local -- test/browser.js", + "cover": "nyc npm test", + "report": "nyc report --reporter=lcov", + "update-browser-errors": "babel -o errors-browser.js errors.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "browser": { + "util": false, + "worker_threads": false, + "./errors": "./errors-browser.js", + "./readable.js": "./readable-browser.js", + "./lib/internal/streams/from.js": "./lib/internal/streams/from-browser.js", + "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" + }, + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "license": "MIT" +} diff --git a/deps/npm/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/readable-browser.js similarity index 100% rename from deps/npm/node_modules/readable-stream/readable-browser.js rename to deps/npm/node_modules/node-gyp/node_modules/readable-stream/readable-browser.js diff --git a/deps/npm/node_modules/readable-stream/readable.js b/deps/npm/node_modules/node-gyp/node_modules/readable-stream/readable.js similarity index 100% rename from deps/npm/node_modules/readable-stream/readable.js rename to deps/npm/node_modules/node-gyp/node_modules/readable-stream/readable.js diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json index 932e8cb3b35553..f95ebeadecd70d 100644 --- a/deps/npm/node_modules/node-gyp/package.json +++ b/deps/npm/node_modules/node-gyp/package.json @@ -11,7 +11,7 @@ "bindings", "gyp" ], - "version": "9.3.0", + "version": "9.3.1", "installVersion": 9, "author": "Nathan Rajlich (http://tootallnate.net)", "repository": { @@ -34,7 +34,7 @@ "which": "^2.0.2" }, "engines": { - "node": "^12.22 || ^14.13 || >=16" + "node": "^12.13 || ^14.13 || >=16" }, "devDependencies": { "bindings": "^1.5.0", diff --git a/deps/npm/node_modules/npm-user-validate/npm-user-validate.js b/deps/npm/node_modules/npm-user-validate/lib/index.js similarity index 90% rename from deps/npm/node_modules/npm-user-validate/npm-user-validate.js rename to deps/npm/node_modules/npm-user-validate/lib/index.js index ffd8791c7eb95d..379a31d2720e39 100644 --- a/deps/npm/node_modules/npm-user-validate/npm-user-validate.js +++ b/deps/npm/node_modules/npm-user-validate/lib/index.js @@ -7,17 +7,17 @@ var requirements = exports.requirements = { lowerCase: 'Name must be lowercase', urlSafe: 'Name may not contain non-url-safe chars', dot: 'Name may not start with "."', - illegal: 'Name may not contain illegal character' + illegal: 'Name may not contain illegal character', }, password: {}, email: { length: 'Email length must be less then or equal to 254 characters long', - valid: 'Email must be an email address' - } + valid: 'Email must be an email address', + }, } var illegalCharacterRe = new RegExp('([' + [ - "'" + "'", ].join() + '])') function username (un) { @@ -56,6 +56,6 @@ function email (em) { return null } -function pw (pw) { +function pw () { return null } diff --git a/deps/npm/node_modules/npm-user-validate/package.json b/deps/npm/node_modules/npm-user-validate/package.json index ffcf1be7f5c62b..8cf48f80f86a8e 100644 --- a/deps/npm/node_modules/npm-user-validate/package.json +++ b/deps/npm/node_modules/npm-user-validate/package.json @@ -1,29 +1,48 @@ { "name": "npm-user-validate", - "version": "1.0.1", + "version": "2.0.0", "description": "User validations for npm", - "main": "npm-user-validate.js", + "main": "lib/index.js", "devDependencies": { - "standard": "^8.4.0", - "standard-version": "^3.0.0", - "tap": "^7.1.2" + "@npmcli/eslint-config": "^4.0.1", + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.2" }, "scripts": { - "pretest": "standard", - "test": "tap --100 test/*.js" + "test": "tap", + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "snap": "tap", + "posttest": "npm run lint" }, "repository": { "type": "git", - "url": "git://github.com/npm/npm-user-validate.git" + "url": "https://github.com/npm/npm-user-validate.git" }, "keywords": [ "npm", "validation", "registry" ], - "author": "Robert Kowalski ", + "author": "GitHub Inc.", "license": "BSD-2-Clause", "files": [ - "npm-user-validate.js" - ] + "bin/", + "lib/" + ], + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "4.11.0" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] + } } diff --git a/deps/npm/node_modules/pacote/README.md b/deps/npm/node_modules/pacote/README.md index 75581c857e43dc..64480b254239a1 100644 --- a/deps/npm/node_modules/pacote/README.md +++ b/deps/npm/node_modules/pacote/README.md @@ -172,7 +172,9 @@ resolved, and other properties, as they are determined. integrity signature of a manifest, if present. There must be a configured `_keys` entry in the config that is scoped to the registry the manifest is being fetched from. - +* `verifyAttestations` A boolean that will make pacote verify Sigstore + attestations, if present. There must be a configured `_keys` entry in the + config that is scoped to the registry the manifest is being fetched from. ### Advanced API diff --git a/deps/npm/node_modules/pacote/lib/registry.js b/deps/npm/node_modules/pacote/lib/registry.js index c4c9df8e4096c9..625bedc9a77369 100644 --- a/deps/npm/node_modules/pacote/lib/registry.js +++ b/deps/npm/node_modules/pacote/lib/registry.js @@ -7,6 +7,8 @@ const rpj = require('read-package-json-fast') const pickManifest = require('npm-pick-manifest') const ssri = require('ssri') const crypto = require('crypto') +const npa = require('npm-package-arg') +const { sigstore } = require('sigstore') // Corgis are cute. 🐕🐶 const corgiDoc = 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*' @@ -203,7 +205,118 @@ class RegistryFetcher extends Fetcher { mani._signatures = dist.signatures } } + + if (dist.attestations) { + if (this.opts.verifyAttestations) { + // Always fetch attestations from the current registry host + const attestationsPath = new URL(dist.attestations.url).pathname + const attestationsUrl = removeTrailingSlashes(this.registry) + attestationsPath + const res = await fetch(attestationsUrl, { + ...this.opts, + // disable integrity check for attestations json payload, we check the + // integrity in the verification steps below + integrity: null, + }) + const { attestations } = await res.json() + const bundles = attestations.map(({ predicateType, bundle }) => { + const statement = JSON.parse( + Buffer.from(bundle.dsseEnvelope.payload, 'base64').toString('utf8') + ) + const keyid = bundle.dsseEnvelope.signatures[0].keyid + const signature = bundle.dsseEnvelope.signatures[0].sig + + return { + predicateType, + bundle, + statement, + keyid, + signature, + } + }) + + const attestationKeyIds = bundles.map((b) => b.keyid).filter((k) => !!k) + const attestationRegistryKeys = (this.registryKeys || []) + .filter(key => attestationKeyIds.includes(key.keyid)) + if (!attestationRegistryKeys.length) { + throw Object.assign(new Error( + `${mani._id} has attestations but no corresponding public key(s) can be found` + ), { code: 'EMISSINGSIGNATUREKEY' }) + } + + for (const { predicateType, bundle, keyid, signature, statement } of bundles) { + const publicKey = attestationRegistryKeys.find(key => key.keyid === keyid) + // Publish attestations have a keyid set and a valid public key must be found + if (keyid) { + if (!publicKey) { + throw Object.assign(new Error( + `${mani._id} has attestations with keyid: ${keyid} ` + + 'but no corresponding public key can be found' + ), { code: 'EMISSINGSIGNATUREKEY' }) + } + + const validPublicKey = + !publicKey.expires || (Date.parse(publicKey.expires) > Date.now()) + if (!validPublicKey) { + throw Object.assign(new Error( + `${mani._id} has attestations with keyid: ${keyid} ` + + `but the corresponding public key has expired ${publicKey.expires}` + ), { code: 'EEXPIREDSIGNATUREKEY' }) + } + } + + const subject = { + name: statement.subject[0].name, + sha512: statement.subject[0].digest.sha512, + } + + // Only type 'version' can be turned into a PURL + const purl = this.spec.type === 'version' ? npa.toPurl(this.spec) : this.spec + // Verify the statement subject matches the package, version + if (subject.name !== purl) { + throw Object.assign(new Error( + `${mani._id} package name and version (PURL): ${purl} ` + + `doesn't match what was signed: ${subject.name}` + ), { code: 'EATTESTATIONSUBJECT' }) + } + + // Verify the statement subject matches the tarball integrity + const integrityHexDigest = ssri.parse(this.integrity).hexDigest() + if (subject.sha512 !== integrityHexDigest) { + throw Object.assign(new Error( + `${mani._id} package integrity (hex digest): ` + + `${integrityHexDigest} ` + + `doesn't match what was signed: ${subject.sha512}` + ), { code: 'EATTESTATIONSUBJECT' }) + } + + try { + // Provenance attestations are signed with a signing certificate + // (including the key) so we don't need to return a public key. + // + // Publish attestations are signed with a keyid so we need to + // specify a public key from the keys endpoint: `registry-host.tld/-/npm/v1/keys` + const options = { keySelector: publicKey ? () => publicKey.pemkey : undefined } + await sigstore.verify(bundle, null, options) + } catch (e) { + throw Object.assign(new Error( + `${mani._id} failed to verify attestation: ${e.message}` + ), { + code: 'EATTESTATIONVERIFY', + predicateType, + keyid, + signature, + resolved: mani._resolved, + integrity: mani._integrity, + }) + } + } + mani._attestations = dist.attestations + } else { + mani._attestations = dist.attestations + } + } } + this.package = mani return this.package } diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json index 77675134099853..c09fbda86aa1dd 100644 --- a/deps/npm/node_modules/pacote/package.json +++ b/deps/npm/node_modules/pacote/package.json @@ -1,6 +1,6 @@ { "name": "pacote", - "version": "15.0.7", + "version": "15.1.0", "description": "JavaScript package downloader", "author": "GitHub Inc.", "bin": { @@ -27,7 +27,7 @@ "devDependencies": { "@npmcli/arborist": "^6.0.0 || ^6.0.0-pre.0", "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.10.0", + "@npmcli/template-oss": "4.11.4", "hosted-git-info": "^6.0.0", "mutate-fs": "^2.1.1", "nock": "^13.2.4", @@ -49,7 +49,7 @@ "@npmcli/promise-spawn": "^6.0.1", "@npmcli/run-script": "^6.0.0", "cacache": "^17.0.0", - "fs-minipass": "^2.1.0", + "fs-minipass": "^3.0.0", "minipass": "^4.0.0", "npm-package-arg": "^10.0.0", "npm-packlist": "^7.0.0", @@ -59,6 +59,7 @@ "promise-retry": "^2.0.1", "read-package-json": "^6.0.0", "read-package-json-fast": "^3.0.0", + "sigstore": "^1.0.0", "ssri": "^10.0.0", "tar": "^6.1.11" }, @@ -71,7 +72,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.10.0", + "version": "4.11.4", "windowsCI": false } } diff --git a/deps/npm/node_modules/postcss-selector-parser/API.md b/deps/npm/node_modules/postcss-selector-parser/API.md index 6aa1f1438f1be4..36c7298fc9753c 100644 --- a/deps/npm/node_modules/postcss-selector-parser/API.md +++ b/deps/npm/node_modules/postcss-selector-parser/API.md @@ -395,16 +395,18 @@ Arguments: ### `container.atPosition(line, column)` -Returns the node at the source position `index`. +Returns the node at the source position `line` and `column`. ```js -selector.at(0) === selector.first; -selector.at(0) === selector.nodes[0]; +// Input: :not(.foo),\n#foo > :matches(ol, ul) +selector.atPosition(1, 1); // => :not(.foo) +selector.atPosition(2, 1); // => \n#foo ``` Arguments: -* `index`: The index of the node to return. +* `line`: The line number of the node to return. +* `column`: The column number of the node to return. ### `container.index(node)` diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/parser.js b/deps/npm/node_modules/postcss-selector-parser/dist/parser.js index 8af1cff1ba07ed..b97a0fab366488 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/parser.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/parser.js @@ -344,7 +344,7 @@ var Parser = /*#__PURE__*/function () { } lastAdded = 'attribute'; - } else if (!node.value && node.value !== "" || lastAdded === "value" && !spaceAfterMeaningfulToken) { + } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) { var _unescaped = (0, _util.unesc)(content); var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || ''; diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/attribute.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/attribute.js index 8f535e5d731299..9edc30bf133dc5 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/attribute.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/attribute.js @@ -441,7 +441,8 @@ var Attribute = /*#__PURE__*/function (_Namespace) { key: "value", get: function get() { return this._value; - } + }, + set: /** * Before 3.0, the value had to be set to an escaped value including any wrapped * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value @@ -454,8 +455,7 @@ var Attribute = /*#__PURE__*/function (_Namespace) { * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe * how the new value is quoted. */ - , - set: function set(v) { + function set(v) { if (this._constructed) { var _unescapeValue2 = unescapeValue(v), deprecatedUsage = _unescapeValue2.deprecatedUsage, @@ -478,6 +478,31 @@ var Attribute = /*#__PURE__*/function (_Namespace) { this._value = v; } } + }, { + key: "insensitive", + get: function get() { + return this._insensitive; + } + /** + * Set the case insensitive flag. + * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag` + * of the attribute is updated accordingly. + * + * @param {true | false} insensitive true if the attribute should match case-insensitively. + */ + , + set: function set(insensitive) { + if (!insensitive) { + this._insensitive = false; // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation. + // When setting `attr.insensitive = false` both should be erased to ensure correct serialization. + + if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) { + this.raws.insensitiveFlag = undefined; + } + } + + this._insensitive = insensitive; + } }, { key: "attribute", get: function get() { diff --git a/deps/npm/node_modules/postcss-selector-parser/package.json b/deps/npm/node_modules/postcss-selector-parser/package.json index a6f33589ba051d..9655072779a29e 100644 --- a/deps/npm/node_modules/postcss-selector-parser/package.json +++ b/deps/npm/node_modules/postcss-selector-parser/package.json @@ -1,6 +1,6 @@ { "name": "postcss-selector-parser", - "version": "6.0.10", + "version": "6.0.11", "devDependencies": { "@babel/cli": "^7.11.6", "@babel/core": "^7.11.6", diff --git a/deps/npm/node_modules/promzard/example/buffer.js b/deps/npm/node_modules/promzard/example/buffer.js deleted file mode 100644 index 828f9d1df9da2f..00000000000000 --- a/deps/npm/node_modules/promzard/example/buffer.js +++ /dev/null @@ -1,12 +0,0 @@ -var pz = require('../promzard') - -var path = require('path') -var file = path.resolve(__dirname, 'substack-input.js') -var buf = require('fs').readFileSync(file) -var ctx = { basename: path.basename(path.dirname(file)) } - -pz.fromBuffer(buf, ctx, function (er, res) { - if (er) - throw er - console.error(JSON.stringify(res, null, 2)) -}) diff --git a/deps/npm/node_modules/promzard/example/index.js b/deps/npm/node_modules/promzard/example/index.js deleted file mode 100644 index 435131f3a6d1e2..00000000000000 --- a/deps/npm/node_modules/promzard/example/index.js +++ /dev/null @@ -1,11 +0,0 @@ -var pz = require('../promzard') - -var path = require('path') -var file = path.resolve(__dirname, 'substack-input.js') -var ctx = { basename: path.basename(path.dirname(file)) } - -pz(file, ctx, function (er, res) { - if (er) - throw er - console.error(JSON.stringify(res, null, 2)) -}) diff --git a/deps/npm/node_modules/promzard/example/npm-init/init-input.js b/deps/npm/node_modules/promzard/example/npm-init/init-input.js deleted file mode 100644 index ba7781b3539e4d..00000000000000 --- a/deps/npm/node_modules/promzard/example/npm-init/init-input.js +++ /dev/null @@ -1,191 +0,0 @@ -var fs = require('fs') -var path = require('path'); - -module.exports = { - "name" : prompt('name', - typeof name === 'undefined' - ? basename.replace(/^node-|[.-]js$/g, ''): name), - "version" : prompt('version', typeof version !== "undefined" - ? version : '0.0.0'), - "description" : (function () { - if (typeof description !== 'undefined' && description) { - return description - } - var value; - try { - var src = fs.readFileSync('README.md', 'utf8'); - value = src.split('\n').filter(function (line) { - return /\s+/.test(line) - && line.trim() !== basename.replace(/^node-/, '') - && !line.trim().match(/^#/) - ; - })[0] - .trim() - .replace(/^./, function (c) { return c.toLowerCase() }) - .replace(/\.$/, '') - ; - } - catch (e) { - try { - // Wouldn't it be nice if that file mattered? - var d = fs.readFileSync('.git/description', 'utf8') - } catch (e) {} - if (d.trim() && !value) value = d - } - return prompt('description', value); - })(), - "main" : (function () { - var f - try { - f = fs.readdirSync(dirname).filter(function (f) { - return f.match(/\.js$/) - }) - if (f.indexOf('index.js') !== -1) - f = 'index.js' - else if (f.indexOf('main.js') !== -1) - f = 'main.js' - else if (f.indexOf(basename + '.js') !== -1) - f = basename + '.js' - else - f = f[0] - } catch (e) {} - - return prompt('entry point', f || 'index.js') - })(), - "bin" : function (cb) { - fs.readdir(dirname + '/bin', function (er, d) { - // no bins - if (er) return cb() - // just take the first js file we find there, or nada - return cb(null, d.filter(function (f) { - return f.match(/\.js$/) - })[0]) - }) - }, - "directories" : function (cb) { - fs.readdir('.', function (er, dirs) { - if (er) return cb(er) - var res = {} - dirs.forEach(function (d) { - switch (d) { - case 'example': case 'examples': return res.example = d - case 'test': case 'tests': return res.test = d - case 'doc': case 'docs': return res.doc = d - case 'man': return res.man = d - } - }) - if (Object.keys(res).length === 0) res = undefined - return cb(null, res) - }) - }, - "dependencies" : typeof dependencies !== 'undefined' ? dependencies - : function (cb) { - fs.readdir('node_modules', function (er, dir) { - if (er) return cb() - var deps = {} - var n = dir.length - dir.forEach(function (d) { - if (d.match(/^\./)) return next() - if (d.match(/^(expresso|mocha|tap|coffee-script|coco|streamline)$/)) - return next() - fs.readFile('node_modules/' + d + '/package.json', function (er, p) { - if (er) return next() - try { p = JSON.parse(p) } catch (e) { return next() } - if (!p.version) return next() - deps[d] = '~' + p.version - return next() - }) - }) - function next () { - if (--n === 0) return cb(null, deps) - } - }) - }, - "devDependencies" : typeof devDependencies !== 'undefined' ? devDependencies - : function (cb) { - // same as dependencies but for dev deps - fs.readdir('node_modules', function (er, dir) { - if (er) return cb() - var deps = {} - var n = dir.length - dir.forEach(function (d) { - if (d.match(/^\./)) return next() - if (!d.match(/^(expresso|mocha|tap|coffee-script|coco|streamline)$/)) - return next() - fs.readFile('node_modules/' + d + '/package.json', function (er, p) { - if (er) return next() - try { p = JSON.parse(p) } catch (e) { return next() } - if (!p.version) return next() - deps[d] = '~' + p.version - return next() - }) - }) - function next () { - if (--n === 0) return cb(null, deps) - } - }) - }, - "scripts" : (function () { - // check to see what framework is in use, if any - try { var d = fs.readdirSync('node_modules') } - catch (e) { d = [] } - var s = typeof scripts === 'undefined' ? {} : scripts - - if (d.indexOf('coffee-script') !== -1) - s.prepublish = prompt('build command', - s.prepublish || 'coffee src/*.coffee -o lib') - - var notest = 'echo "Error: no test specified" && exit 1' - function tx (test) { - return test || notest - } - - if (!s.test || s.test === notest) { - if (d.indexOf('tap') !== -1) - s.test = prompt('test command', 'tap test/*.js', tx) - else if (d.indexOf('expresso') !== -1) - s.test = prompt('test command', 'expresso test', tx) - else if (d.indexOf('mocha') !== -1) - s.test = prompt('test command', 'mocha', tx) - else - s.test = prompt('test command', tx) - } - - return s - - })(), - - "repository" : (function () { - try { var gconf = fs.readFileSync('.git/config') } - catch (e) { gconf = null } - if (gconf) { - gconf = gconf.split(/\r?\n/) - var i = gconf.indexOf('[remote "origin"]') - if (i !== -1) { - var u = gconf[i + 1] - if (!u.match(/^\s*url =/)) u = gconf[i + 2] - if (!u.match(/^\s*url =/)) u = null - else u = u.replace(/^\s*url = /, '') - } - if (u && u.match(/^git@github.com:/)) - u = u.replace(/^git@github.com:/, 'git://github.com/') - } - - return prompt('git repository', u) - })(), - - "keywords" : prompt(function (s) { - if (!s) return undefined - if (Array.isArray(s)) s = s.join(' ') - if (typeof s !== 'string') return s - return s.split(/[\s,]+/) - }), - "author" : config['init.author.name'] - ? { - "name" : config['init.author.name'], - "email" : config['init.author.email'], - "url" : config['init.author.url'] - } - : undefined, - "license" : prompt('license', 'BSD') -} diff --git a/deps/npm/node_modules/promzard/example/npm-init/init.js b/deps/npm/node_modules/promzard/example/npm-init/init.js deleted file mode 100644 index 09484cd1c19911..00000000000000 --- a/deps/npm/node_modules/promzard/example/npm-init/init.js +++ /dev/null @@ -1,37 +0,0 @@ -var PZ = require('../../promzard').PromZard -var path = require('path') -var input = path.resolve(__dirname, 'init-input.js') - -var fs = require('fs') -var package = path.resolve(__dirname, 'package.json') -var pkg - -fs.readFile(package, 'utf8', function (er, d) { - if (er) ctx = {} - try { ctx = JSON.parse(d); pkg = JSON.parse(d) } - catch (e) { ctx = {} } - - ctx.dirname = path.dirname(package) - ctx.basename = path.basename(ctx.dirname) - if (!ctx.version) ctx.version = undefined - - // this should be replaced with the npm conf object - ctx.config = {} - - console.error('ctx=', ctx) - - var pz = new PZ(input, ctx) - - pz.on('data', function (data) { - console.error('pz data', data) - if (!pkg) pkg = {} - Object.keys(data).forEach(function (k) { - if (data[k] !== undefined && data[k] !== null) pkg[k] = data[k] - }) - console.error('package data %s', JSON.stringify(data, null, 2)) - fs.writeFile(package, JSON.stringify(pkg, null, 2), function (er) { - if (er) throw er - console.log('ok') - }) - }) -}) diff --git a/deps/npm/node_modules/promzard/example/npm-init/package.json b/deps/npm/node_modules/promzard/example/npm-init/package.json deleted file mode 100644 index 89c6d1fb6e2acf..00000000000000 --- a/deps/npm/node_modules/promzard/example/npm-init/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "npm-init", - "version": "0.0.0", - "description": "an initter you init wit, innit?", - "main": "index.js", - "scripts": { - "test": "asdf" - }, - "license": "BSD" -} \ No newline at end of file diff --git a/deps/npm/node_modules/promzard/example/substack-input.js b/deps/npm/node_modules/promzard/example/substack-input.js deleted file mode 100644 index bf7aedb82d41fd..00000000000000 --- a/deps/npm/node_modules/promzard/example/substack-input.js +++ /dev/null @@ -1,61 +0,0 @@ -module.exports = { - "name" : basename.replace(/^node-/, ''), - "version" : "0.0.0", - "description" : (function (cb) { - var fs = require('fs'); - var value; - try { - var src = fs.readFileSync('README.markdown', 'utf8'); - value = src.split('\n').filter(function (line) { - return /\s+/.test(line) - && line.trim() !== basename.replace(/^node-/, '') - ; - })[0] - .trim() - .replace(/^./, function (c) { return c.toLowerCase() }) - .replace(/\.$/, '') - ; - } - catch (e) {} - - return prompt('description', value); - })(), - "main" : prompt('entry point', 'index.js'), - "bin" : function (cb) { - var path = require('path'); - var fs = require('fs'); - var exists = fs.exists || path.exists; - exists('bin/cmd.js', function (ex) { - var bin - if (ex) { - var bin = {} - bin[basename.replace(/^node-/, '')] = 'bin/cmd.js' - } - cb(null, bin); - }); - }, - "directories" : { - "example" : "example", - "test" : "test" - }, - "dependencies" : {}, - "devDependencies" : { - "tap" : "~0.2.5" - }, - "scripts" : { - "test" : "tap test/*.js" - }, - "repository" : { - "type" : "git", - "url" : "git://github.com/substack/" + basename + ".git" - }, - "homepage" : "https://github.com/substack/" + basename, - "keywords" : prompt(function (s) { return s.split(/\s+/) }), - "author" : { - "name" : "James Halliday", - "email" : "mail@substack.net", - "url" : "http://substack.net" - }, - "license" : "MIT", - "engine" : { "node" : ">=0.6" } -} diff --git a/deps/npm/node_modules/promzard/lib/index.js b/deps/npm/node_modules/promzard/lib/index.js new file mode 100644 index 00000000000000..2244cbbbacdb02 --- /dev/null +++ b/deps/npm/node_modules/promzard/lib/index.js @@ -0,0 +1,175 @@ +const fs = require('fs/promises') +const { runInThisContext } = require('vm') +const { promisify } = require('util') +const { randomBytes } = require('crypto') +const { Module } = require('module') +const { dirname, basename } = require('path') +const read = require('read') + +const files = {} + +class PromZard { + #file = null + #backupFile = null + #ctx = null + #unique = randomBytes(8).toString('hex') + #prompts = [] + + constructor (file, ctx = {}, options = {}) { + this.#file = file + this.#ctx = ctx + this.#backupFile = options.backupFile + } + + static async promzard (file, ctx, options) { + const pz = new PromZard(file, ctx, options) + return pz.load() + } + + static async fromBuffer (buf, ctx, options) { + let filename = 0 + do { + filename = '\0' + Math.random() + } while (files[filename]) + files[filename] = buf + const ret = await PromZard.promzard(filename, ctx, options) + delete files[filename] + return ret + } + + async load () { + if (files[this.#file]) { + return this.#loaded() + } + + try { + files[this.#file] = await fs.readFile(this.#file, 'utf8') + } catch (er) { + if (er && this.#backupFile) { + this.#file = this.#backupFile + this.#backupFile = null + return this.load() + } + throw er + } + + return this.#loaded() + } + + async #loaded () { + const mod = new Module(this.#file, module) + mod.loaded = true + mod.filename = this.#file + mod.id = this.#file + mod.paths = Module._nodeModulePaths(dirname(this.#file)) + + this.#ctx.prompt = this.#makePrompt() + this.#ctx.__filename = this.#file + this.#ctx.__dirname = dirname(this.#file) + this.#ctx.__basename = basename(this.#file) + this.#ctx.module = mod + this.#ctx.require = (p) => mod.require(p) + this.#ctx.require.resolve = (p) => Module._resolveFilename(p, mod) + this.#ctx.exports = mod.exports + + const body = `(function(${Object.keys(this.#ctx).join(', ')}) { ${files[this.#file]}\n })` + runInThisContext(body, this.#file).apply(this.#ctx, Object.values(this.#ctx)) + this.#ctx.res = mod.exports + + return this.#walk() + } + + #makePrompt () { + return (...args) => { + let p, d, t + for (let i = 0; i < args.length; i++) { + const a = args[i] + if (typeof a === 'string') { + if (p) { + d = a + } else { + p = a + } + } else if (typeof a === 'function') { + t = a + } else if (a && typeof a === 'object') { + p = a.prompt || p + d = a.default || d + t = a.transform || t + } + } + try { + return `${this.#unique}-${this.#prompts.length}` + } finally { + this.#prompts.push([p, d, t]) + } + } + } + + async #walk (o = this.#ctx.res) { + const keys = Object.keys(o) + + const len = keys.length + let i = 0 + + while (i < len) { + const k = keys[i] + const v = o[k] + i++ + + if (v && typeof v === 'object') { + o[k] = await this.#walk(v) + continue + } + + if (v && typeof v === 'string' && v.startsWith(this.#unique)) { + const n = +v.slice(this.#unique.length + 1) + + // default to the key + // default to the ctx value, if there is one + const [prompt = k, def = this.#ctx[k], tx] = this.#prompts[n] + + try { + o[k] = await this.#prompt(prompt, def, tx) + } catch (er) { + if (er.notValid) { + console.log(er.message) + i-- + } else { + throw er + } + } + continue + } + + if (typeof v === 'function') { + // XXX: remove v.length check to remove cb from functions + // would be a breaking change for `npm init` + // XXX: if cb is no longer an argument then this.#ctx should + // be passed in to allow arrow fns to be used and still access ctx + const fn = v.length ? promisify(v) : v + o[k] = await fn.call(this.#ctx) + // back up so that we process this one again. + // this is because it might return a prompt() call in the cb. + i-- + continue + } + } + + return o + } + + async #prompt (prompt, def, tx) { + const res = await read({ prompt: prompt + ':', default: def }).then((r) => tx ? tx(r) : r) + // XXX: remove this to require throwing an error instead of + // returning it. would be a breaking change for `npm init` + if (res instanceof Error && res.notValid) { + throw res + } + return res + } +} + +module.exports = PromZard.promzard +module.exports.fromBuffer = PromZard.fromBuffer +module.exports.PromZard = PromZard diff --git a/deps/npm/node_modules/promzard/package.json b/deps/npm/node_modules/promzard/package.json index 77e3bd65513c92..a48764dd5441b8 100644 --- a/deps/npm/node_modules/promzard/package.json +++ b/deps/npm/node_modules/promzard/package.json @@ -1,20 +1,48 @@ { - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "author": "GitHub Inc.", "name": "promzard", "description": "prompting wizardly", - "version": "0.3.0", + "version": "1.0.0", "repository": { - "url": "git://github.com/isaacs/promzard" + "url": "https://github.com/npm/promzard.git", + "type": "git" }, "dependencies": { - "read": "1" + "read": "^2.0.0" }, "devDependencies": { - "tap": "~0.2.5" + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.11.0", + "tap": "^16.3.0" }, - "main": "promzard.js", + "main": "lib/index.js", "scripts": { - "test": "tap test/*.js" + "test": "tap", + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "snap": "tap", + "posttest": "npm run lint" }, - "license": "ISC" + "license": "ISC", + "files": [ + "bin/", + "lib/" + ], + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "4.11.0" + }, + "tap": { + "jobs": 1, + "test-ignore": "fixtures/", + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] + } } diff --git a/deps/npm/node_modules/promzard/promzard.js b/deps/npm/node_modules/promzard/promzard.js deleted file mode 100644 index da1abca9535e4f..00000000000000 --- a/deps/npm/node_modules/promzard/promzard.js +++ /dev/null @@ -1,238 +0,0 @@ -module.exports = promzard -promzard.PromZard = PromZard - -var fs = require('fs') -var vm = require('vm') -var util = require('util') -var files = {} -var crypto = require('crypto') -var EventEmitter = require('events').EventEmitter -var read = require('read') - -var Module = require('module').Module -var path = require('path') - -function promzard (file, ctx, cb) { - if (typeof ctx === 'function') cb = ctx, ctx = null; - if (!ctx) ctx = {}; - var pz = new PromZard(file, ctx) - pz.on('error', cb) - pz.on('data', function (data) { - cb(null, data) - }) -} -promzard.fromBuffer = function (buf, ctx, cb) { - var filename = 0 - do { - filename = '\0' + Math.random(); - } while (files[filename]) - files[filename] = buf - var ret = promzard(filename, ctx, cb) - delete files[filename] - return ret -} - -function PromZard (file, ctx) { - if (!(this instanceof PromZard)) - return new PromZard(file, ctx) - EventEmitter.call(this) - this.file = file - this.ctx = ctx - this.unique = crypto.randomBytes(8).toString('hex') - this.load() -} - -PromZard.prototype = Object.create( - EventEmitter.prototype, - { constructor: { - value: PromZard, - readable: true, - configurable: true, - writable: true, - enumerable: false } } ) - -PromZard.prototype.load = function () { - if (files[this.file]) - return this.loaded() - - fs.readFile(this.file, 'utf8', function (er, d) { - if (er && this.backupFile) { - this.file = this.backupFile - delete this.backupFile - return this.load() - } - if (er) - return this.emit('error', this.error = er) - files[this.file] = d - this.loaded() - }.bind(this)) -} - -PromZard.prototype.loaded = function () { - this.ctx.prompt = this.makePrompt() - this.ctx.__filename = this.file - this.ctx.__dirname = path.dirname(this.file) - this.ctx.__basename = path.basename(this.file) - var mod = this.ctx.module = this.makeModule() - this.ctx.require = function (path) { - return mod.require(path) - } - this.ctx.require.resolve = function(path) { - return Module._resolveFilename(path, mod); - } - this.ctx.exports = mod.exports - - this.script = this.wrap(files[this.file]) - var fn = vm.runInThisContext(this.script, this.file) - var args = Object.keys(this.ctx).map(function (k) { - return this.ctx[k] - }.bind(this)) - try { var res = fn.apply(this.ctx, args) } - catch (er) { this.emit('error', er) } - if (res && - typeof res === 'object' && - exports === mod.exports && - Object.keys(exports).length === 1) { - this.result = res - } else { - this.result = mod.exports - } - this.walk() -} - -PromZard.prototype.makeModule = function () { - var mod = new Module(this.file, module) - mod.loaded = true - mod.filename = this.file - mod.id = this.file - mod.paths = Module._nodeModulePaths(path.dirname(this.file)) - return mod -} - -PromZard.prototype.wrap = function (body) { - var s = '(function( %s ) { %s\n })' - var args = Object.keys(this.ctx).join(', ') - return util.format(s, args, body) -} - -PromZard.prototype.makePrompt = function () { - this.prompts = [] - return prompt.bind(this) - function prompt () { - var p, d, t - for (var i = 0; i < arguments.length; i++) { - var a = arguments[i] - if (typeof a === 'string' && p) - d = a - else if (typeof a === 'string') - p = a - else if (typeof a === 'function') - t = a - else if (a && typeof a === 'object') { - p = a.prompt || p - d = a.default || d - t = a.transform || t - } - } - - try { return this.unique + '-' + this.prompts.length } - finally { this.prompts.push([p, d, t]) } - } -} - -PromZard.prototype.walk = function (o, cb) { - o = o || this.result - cb = cb || function (er, res) { - if (er) - return this.emit('error', this.error = er) - this.result = res - return this.emit('data', res) - } - cb = cb.bind(this) - var keys = Object.keys(o) - var i = 0 - var len = keys.length - - L.call(this) - function L () { - if (this.error) - return - while (i < len) { - var k = keys[i] - var v = o[k] - i++ - - if (v && typeof v === 'object') { - return this.walk(v, function (er, res) { - if (er) return cb(er) - o[k] = res - L.call(this) - }.bind(this)) - } else if (v && - typeof v === 'string' && - v.indexOf(this.unique) === 0) { - var n = +v.substr(this.unique.length + 1) - var prompt = this.prompts[n] - if (isNaN(n) || !prompt) - continue - - // default to the key - if (undefined === prompt[0]) - prompt[0] = k - - // default to the ctx value, if there is one - if (undefined === prompt[1]) - prompt[1] = this.ctx[k] - - return this.prompt(prompt, function (er, res) { - if (er) { - if (!er.notValid) { - return this.emit('error', this.error = er); - } - console.log(er.message) - i -- - return L.call(this) - } - o[k] = res - L.call(this) - }.bind(this)) - } else if (typeof v === 'function') { - try { return v.call(this.ctx, function (er, res) { - if (er) - return this.emit('error', this.error = er) - o[k] = res - // back up so that we process this one again. - // this is because it might return a prompt() call in the cb. - i -- - L.call(this) - }.bind(this)) } - catch (er) { this.emit('error', er) } - } - } - // made it to the end of the loop, maybe - if (i >= len) - return cb(null, o) - } -} - -PromZard.prototype.prompt = function (pdt, cb) { - var prompt = pdt[0] - var def = pdt[1] - var tx = pdt[2] - - if (tx) { - cb = function (cb) { return function (er, data) { - try { - var res = tx(data) - if (!er && res instanceof Error && !!res.notValid) { - return cb(res, null) - } - return cb(er, res) - } - catch (er) { this.emit('error', er) } - }}(cb).bind(this) - } - - read({ prompt: prompt + ':' , default: def }, cb) -} - diff --git a/deps/npm/node_modules/promzard/test/basic.js b/deps/npm/node_modules/promzard/test/basic.js deleted file mode 100644 index ad1c92df9c4c05..00000000000000 --- a/deps/npm/node_modules/promzard/test/basic.js +++ /dev/null @@ -1,91 +0,0 @@ -var tap = require('tap') -var pz = require('../promzard.js') -var spawn = require('child_process').spawn - -tap.test('run the example', function (t) { - - var example = require.resolve('../example/index.js') - var node = process.execPath - - var expect = { - "name": "example", - "version": "0.0.0", - "description": "testing description", - "main": "test-entry.js", - "directories": { - "example": "example", - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.2.5" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/example.git" - }, - "homepage": "https://github.com/substack/example", - "keywords": [ - "fugazi", - "function", - "waiting", - "room" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "engine": { - "node": ">=0.6" - } - } - - console.error('%s %s', node, example) - var c = spawn(node, [example], { customFds: [-1,-1,-1] }) - var output = '' - c.stdout.on('data', function (d) { - output += d - respond() - }) - - var actual = '' - c.stderr.on('data', function (d) { - actual += d - }) - - function respond () { - console.error('respond', output) - if (output.match(/description: $/)) { - c.stdin.write('testing description\n') - return - } - if (output.match(/entry point: \(index\.js\) $/)) { - c.stdin.write('test-entry.js\n') - return - } - if (output.match(/keywords: $/)) { - c.stdin.write('fugazi function waiting room\n') - // "read" module is weird on node >= 0.10 when not a TTY - // requires explicit ending for reasons. - // could dig in, but really just wanna make tests pass, whatever. - c.stdin.end() - return - } - } - - c.on('exit', function () { - console.error('exit event') - }) - - c.on('close', function () { - console.error('actual', actual) - actual = JSON.parse(actual) - t.deepEqual(actual, expect) - t.end() - }) -}) diff --git a/deps/npm/node_modules/promzard/test/buffer.js b/deps/npm/node_modules/promzard/test/buffer.js deleted file mode 100644 index e1d240e2e4f480..00000000000000 --- a/deps/npm/node_modules/promzard/test/buffer.js +++ /dev/null @@ -1,84 +0,0 @@ -var tap = require('tap') -var pz = require('../promzard.js') -var spawn = require('child_process').spawn - -tap.test('run the example using a buffer', function (t) { - - var example = require.resolve('../example/buffer.js') - var node = process.execPath - - var expect = { - "name": "example", - "version": "0.0.0", - "description": "testing description", - "main": "test-entry.js", - "directories": { - "example": "example", - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.2.5" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/example.git" - }, - "homepage": "https://github.com/substack/example", - "keywords": [ - "fugazi", - "function", - "waiting", - "room" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "engine": { - "node": ">=0.6" - } - } - - var c = spawn(node, [example], { customFds: [-1,-1,-1] }) - var output = '' - c.stdout.on('data', function (d) { - output += d - respond() - }) - - var actual = '' - c.stderr.on('data', function (d) { - actual += d - }) - - function respond () { - if (output.match(/description: $/)) { - c.stdin.write('testing description\n') - return - } - if (output.match(/entry point: \(index\.js\) $/)) { - c.stdin.write('test-entry.js\n') - return - } - if (output.match(/keywords: $/)) { - c.stdin.write('fugazi function waiting room\n') - // "read" module is weird on node >= 0.10 when not a TTY - // requires explicit ending for reasons. - // could dig in, but really just wanna make tests pass, whatever. - c.stdin.end() - return - } - } - - c.on('close', function () { - actual = JSON.parse(actual) - t.deepEqual(actual, expect) - t.end() - }) -}) diff --git a/deps/npm/node_modules/promzard/test/exports.input b/deps/npm/node_modules/promzard/test/exports.input deleted file mode 100644 index 061cbfe1055aa2..00000000000000 --- a/deps/npm/node_modules/promzard/test/exports.input +++ /dev/null @@ -1,5 +0,0 @@ -exports.a = 1 + 2 -exports.b = prompt('To be or not to be?', '!2b') -exports.c = {} -exports.c.x = prompt() -exports.c.y = tmpdir + "/y/file.txt" diff --git a/deps/npm/node_modules/promzard/test/exports.js b/deps/npm/node_modules/promzard/test/exports.js deleted file mode 100644 index c17993a4e9e754..00000000000000 --- a/deps/npm/node_modules/promzard/test/exports.js +++ /dev/null @@ -1,48 +0,0 @@ -var test = require('tap').test; -var promzard = require('../'); - -if (process.argv[2] === 'child') { - return child() -} - -test('exports', function (t) { - t.plan(1); - - var spawn = require('child_process').spawn - var child = spawn(process.execPath, [__filename, 'child']) - - var output = '' - child.stderr.on('data', function (c) { - output += c - }) - - setTimeout(function () { - child.stdin.write('\n'); - }, 100) - setTimeout(function () { - child.stdin.end('55\n'); - }, 200) - - child.on('close', function () { - console.error('output=%j', output) - output = JSON.parse(output) - t.same({ - a : 3, - b : '!2b', - c : { - x : 55, - y : '/tmp/y/file.txt', - } - }, output); - t.end() - }) -}); - -function child () { - var ctx = { tmpdir : '/tmp' } - var file = __dirname + '/exports.input'; - - promzard(file, ctx, function (err, output) { - console.error(JSON.stringify(output)) - }); -} diff --git a/deps/npm/node_modules/promzard/test/fn.input b/deps/npm/node_modules/promzard/test/fn.input deleted file mode 100644 index ed6c3f1c80c5b5..00000000000000 --- a/deps/npm/node_modules/promzard/test/fn.input +++ /dev/null @@ -1,18 +0,0 @@ -var fs = require('fs') - -module.exports = { - "a": 1 + 2, - "b": prompt('To be or not to be?', '!2b', function (s) { - return s.toUpperCase() + '...' - }), - "c": { - "x": prompt(function (x) { return x * 100 }), - "y": tmpdir + "/y/file.txt" - }, - a_function: function (cb) { - fs.readFile(__filename, 'utf8', cb) - }, - asyncPrompt: function (cb) { - return cb(null, prompt('a prompt at any other time would smell as sweet')) - } -} diff --git a/deps/npm/node_modules/promzard/test/fn.js b/deps/npm/node_modules/promzard/test/fn.js deleted file mode 100644 index 899ebedbdd010c..00000000000000 --- a/deps/npm/node_modules/promzard/test/fn.js +++ /dev/null @@ -1,56 +0,0 @@ -var test = require('tap').test; -var promzard = require('../'); -var fs = require('fs') -var file = __dirname + '/fn.input'; - -var expect = { - a : 3, - b : '!2B...', - c : { - x : 5500, - y : '/tmp/y/file.txt', - } -} -expect.a_function = fs.readFileSync(file, 'utf8') -expect.asyncPrompt = 'async prompt' - -if (process.argv[2] === 'child') { - return child() -} - -test('prompt callback param', function (t) { - t.plan(1); - - var spawn = require('child_process').spawn - var child = spawn(process.execPath, [__filename, 'child']) - - var output = '' - child.stderr.on('data', function (c) { - output += c - }) - - child.on('close', function () { - console.error('output=%j', output) - output = JSON.parse(output) - t.same(output, expect); - t.end() - }) - - setTimeout(function () { - child.stdin.write('\n') - }, 100) - setTimeout(function () { - child.stdin.write('55\n') - }, 150) - setTimeout(function () { - child.stdin.end('async prompt\n') - }, 200) -}) - -function child () { - var ctx = { tmpdir : '/tmp' } - var file = __dirname + '/fn.input'; - promzard(file, ctx, function (err, output) { - console.error(JSON.stringify(output)) - }) -} diff --git a/deps/npm/node_modules/promzard/test/simple.input b/deps/npm/node_modules/promzard/test/simple.input deleted file mode 100644 index e49def6470d599..00000000000000 --- a/deps/npm/node_modules/promzard/test/simple.input +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - "a": 1 + 2, - "b": prompt('To be or not to be?', '!2b'), - "c": { - "x": prompt(), - "y": tmpdir + "/y/file.txt" - } -} diff --git a/deps/npm/node_modules/promzard/test/simple.js b/deps/npm/node_modules/promzard/test/simple.js deleted file mode 100644 index 034a86475afbd5..00000000000000 --- a/deps/npm/node_modules/promzard/test/simple.js +++ /dev/null @@ -1,30 +0,0 @@ -var test = require('tap').test; -var promzard = require('../'); - -test('simple', function (t) { - t.plan(1); - - var ctx = { tmpdir : '/tmp' } - var file = __dirname + '/simple.input'; - promzard(file, ctx, function (err, output) { - t.same( - { - a : 3, - b : '!2b', - c : { - x : 55, - y : '/tmp/y/file.txt', - } - }, - output - ); - }); - - setTimeout(function () { - process.stdin.emit('data', '\n'); - }, 100); - - setTimeout(function () { - process.stdin.emit('data', '55\n'); - }, 200); -}); diff --git a/deps/npm/node_modules/promzard/test/validate.input b/deps/npm/node_modules/promzard/test/validate.input deleted file mode 100644 index 839c0652294ac0..00000000000000 --- a/deps/npm/node_modules/promzard/test/validate.input +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - "name": prompt("name", function (data) { - if (data === 'cool') return data - var er = new Error('not cool') - er.notValid = true - return er - }) -} diff --git a/deps/npm/node_modules/promzard/test/validate.js b/deps/npm/node_modules/promzard/test/validate.js deleted file mode 100644 index a120681494e60d..00000000000000 --- a/deps/npm/node_modules/promzard/test/validate.js +++ /dev/null @@ -1,20 +0,0 @@ - -var promzard = require('../') -var test = require('tap').test - -test('validate', function (t) { - t.plan(2) - var ctx = { tmpdir : '/tmp' } - var file = __dirname + '/validate.input' - promzard(file, ctx, function (er, found) { - t.ok(!er) - var wanted = { name: 'cool' } - t.same(found, wanted) - }) - setTimeout(function () { - process.stdin.emit('data', 'not cool\n') - }, 100) - setTimeout(function () { - process.stdin.emit('data', 'cool\n') - }, 200) -}) diff --git a/deps/npm/node_modules/read-package-json-fast/lib/index.js b/deps/npm/node_modules/read-package-json-fast/lib/index.js index c5c896ffec0046..beb089db8d53ec 100644 --- a/deps/npm/node_modules/read-package-json-fast/lib/index.js +++ b/deps/npm/node_modules/read-package-json-fast/lib/index.js @@ -1,10 +1,6 @@ -const { promisify } = require('util') -const fs = require('fs') -const readFile = promisify(fs.readFile) -const lstat = promisify(fs.lstat) -const readdir = promisify(fs.readdir) +const { readFile, lstat, readdir } = require('fs/promises') const parse = require('json-parse-even-better-errors') - +const normalizePackageBin = require('npm-normalize-package-bin') const { resolve, dirname, join, relative } = require('path') const rpj = path => readFile(path, 'utf8') @@ -14,8 +10,6 @@ const rpj = path => readFile(path, 'utf8') throw er }) -const normalizePackageBin = require('npm-normalize-package-bin') - // load the directories.bin folder as a 'bin' object const readBinDir = async (path, data) => { if (data.bin) { diff --git a/deps/npm/node_modules/read-package-json-fast/package.json b/deps/npm/node_modules/read-package-json-fast/package.json index 7baa36cfbeb9e9..4964bb0a934cb8 100644 --- a/deps/npm/node_modules/read-package-json-fast/package.json +++ b/deps/npm/node_modules/read-package-json-fast/package.json @@ -1,6 +1,6 @@ { "name": "read-package-json-fast", - "version": "3.0.1", + "version": "3.0.2", "description": "Like read-package-json, but faster", "main": "lib/index.js", "author": "GitHub Inc.", @@ -19,7 +19,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.5.1", + "@npmcli/template-oss": "4.11.0", "tap": "^16.3.0" }, "dependencies": { @@ -36,7 +36,7 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.1" + "version": "4.11.0" }, "tap": { "nyc-arg": [ diff --git a/deps/npm/node_modules/read/lib/read.js b/deps/npm/node_modules/read/lib/read.js index a93d1b3b532c08..882b11c285bcf3 100644 --- a/deps/npm/node_modules/read/lib/read.js +++ b/deps/npm/node_modules/read/lib/read.js @@ -1,113 +1,82 @@ - -module.exports = read - -var readline = require('readline') -var Mute = require('mute-stream') - -function read (opts, cb) { - if (opts.num) { - throw new Error('read() no longer accepts a char number limit') - } - - if (typeof opts.default !== 'undefined' && - typeof opts.default !== 'string' && - typeof opts.default !== 'number') { +const readline = require('readline') +const Mute = require('mute-stream') + +module.exports = async function read ({ + default: def = '', + input = process.stdin, + output = process.stdout, + prompt = '', + silent, + timeout, + edit, + terminal, + replace, +}) { + if (typeof def !== 'undefined' && typeof def !== 'string' && typeof def !== 'number') { throw new Error('default value must be string or number') } - var input = opts.input || process.stdin - var output = opts.output || process.stdout - var prompt = (opts.prompt || '').trim() + ' ' - var silent = opts.silent - var editDef = false - var timeout = opts.timeout + let editDef = false + prompt = prompt.trim() + ' ' + terminal = !!(terminal || output.isTTY) - var def = opts.default || '' if (def) { if (silent) { prompt += '(