diff --git a/deps/npm/docs/content/commands/npm-cache.md b/deps/npm/docs/content/commands/npm-cache.md index 1697be92adb7f1..c61e2ac2555bf8 100644 --- a/deps/npm/docs/content/commands/npm-cache.md +++ b/deps/npm/docs/content/commands/npm-cache.md @@ -11,59 +11,56 @@ npm cache add npm cache clean [] npm cache ls [@] npm cache verify +npm cache npx ls +npm cache npx rm [...] +npm cache npx info ... ``` Note: This command is unaware of workspaces. ### Description -Used to add, list, or clean the npm cache folder. +Used to add, list, or clean the `npm cache` folder. +Also used to view info about entries in the `npm exec` (aka `npx`) cache folder. + +#### `npm cache` * add: - Add the specified packages to the local cache. This command is primarily - intended to be used internally by npm, but it can provide a way to - add data to the local installation cache explicitly. + Add the specified packages to the local cache. This command is primarily intended to be used internally by npm, but it can provide a way to add data to the local installation cache explicitly. * clean: - Delete all data out of the cache folder. Note that this is typically - unnecessary, as npm's cache is self-healing and resistant to data - corruption issues. + Delete a single entry or all entries out of the cache folder. Note that this is typically unnecessary, as npm's cache is self-healing and resistant to data corruption issues. + +* ls: + List given entries or all entries in the local cache. * verify: - Verify the contents of the cache folder, garbage collecting any unneeded - data, and verifying the integrity of the cache index and all cached data. + Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data. + +#### `npm cache npx` + +* ls: + List all entries in the npx cache. + +* rm: + Remove given entries or all entries from the npx cache. + +* info: + Get detailed information about given entries in the npx cache. ### Details -npm stores cache data in an opaque directory within the configured `cache`, -named `_cacache`. This directory is a -[`cacache`](http://npm.im/cacache)-based content-addressable cache that -stores all http request data as well as other package-related data. This -directory is primarily accessed through `pacote`, the library responsible -for all package fetching as of npm@5. +npm stores cache data in an opaque directory within the configured `cache`, named `_cacache`. This directory is a [`cacache`](http://npm.im/cacache)-based content-addressable cache that stores all http request data as well as other package-related data. This directory is primarily accessed through `pacote`, the library responsible for all package fetching as of npm@5. -All data that passes through the cache is fully verified for integrity on -both insertion and extraction. Cache corruption will either trigger an -error, or signal to `pacote` that the data must be refetched, which it will -do automatically. For this reason, it should never be necessary to clear -the cache for any reason other than reclaiming disk space, thus why `clean` -now requires `--force` to run. +All data that passes through the cache is fully verified for integrity on both insertion and extraction. Cache corruption will either trigger an error, or signal to `pacote` that the data must be refetched, which it will do automatically. For this reason, it should never be necessary to clear the cache for any reason other than reclaiming disk space, thus why `clean` now requires `--force` to run. -There is currently no method exposed through npm to inspect or directly -manage the contents of this cache. In order to access it, `cacache` must be -used directly. +There is currently no method exposed through npm to inspect or directly manage the contents of this cache. In order to access it, `cacache` must be used directly. -npm will not remove data by itself: the cache will grow as new packages are -installed. +npm will not remove data by itself: the cache will grow as new packages are installed. ### A note about the cache's design -The npm cache is strictly a cache: it should not be relied upon as a -persistent and reliable data store for package data. npm makes no guarantee -that a previously-cached piece of data will be available later, and will -automatically delete corrupted contents. The primary guarantee that the -cache makes is that, if it does return data, that data will be exactly the -data that was inserted. +The npm cache is strictly a cache: it should not be relied upon as a persistent and reliable data store for package data. npm makes no guarantee that a previously-cached piece of data will be available later, and will automatically delete corrupted contents. The primary guarantee that the cache makes is that, if it does return data, that data will be exactly the data that was inserted. To run an offline verification of existing cache contents, use `npm cache verify`. @@ -88,6 +85,7 @@ The location of npm's cache directory. * [npm install](/commands/npm-install) * [npm publish](/commands/npm-publish) * [npm pack](/commands/npm-pack) +* [npm exec](/commands/npm-exec) * https://npm.im/cacache * https://npm.im/pacote * https://npm.im/@npmcli/arborist diff --git a/deps/npm/docs/content/commands/npm-init.md b/deps/npm/docs/content/commands/npm-init.md index 870f846761e4e3..bbf0fd8518386f 100644 --- a/deps/npm/docs/content/commands/npm-init.md +++ b/deps/npm/docs/content/commands/npm-init.md @@ -196,6 +196,16 @@ more information, or [npm init](/commands/npm-init). +#### `init-type` + +* Default: "commonjs" +* Type: String + +The value that `npm init` should use by default for the package.json type +field. + + + #### `init-version` * Default: "1.0.0" diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md index 9e9a4891144849..660886a35982fe 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@11.1.0 /path/to/npm +npm@11.2.0 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 ``` diff --git a/deps/npm/docs/content/commands/npm.md b/deps/npm/docs/content/commands/npm.md index 30e48bcfd2ac94..25318f3977cbb7 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 -11.1.0 +11.2.0 ### Description diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md index 98875dfa324459..3c2fa25de4ec51 100644 --- a/deps/npm/docs/content/using-npm/config.md +++ b/deps/npm/docs/content/using-npm/config.md @@ -809,6 +809,16 @@ more information, or [npm init](/commands/npm-init). +#### `init-type` + +* Default: "commonjs" +* Type: String + +The value that `npm init` should use by default for the package.json type +field. + + + #### `init-version` * Default: "1.0.0" diff --git a/deps/npm/docs/output/commands/npm-access.html b/deps/npm/docs/output/commands/npm-access.html index 1e1ac9581dcdd3..497cbac14690fe 100644 --- a/deps/npm/docs/output/commands/npm-access.html +++ b/deps/npm/docs/output/commands/npm-access.html @@ -141,9 +141,9 @@
-

+

npm-access - @11.1.0 + @11.2.0

Set access level on published packages
diff --git a/deps/npm/docs/output/commands/npm-adduser.html b/deps/npm/docs/output/commands/npm-adduser.html index efb7054b83f967..10958399922c94 100644 --- a/deps/npm/docs/output/commands/npm-adduser.html +++ b/deps/npm/docs/output/commands/npm-adduser.html @@ -141,9 +141,9 @@
-

+

npm-adduser - @11.1.0 + @11.2.0

Add a registry user account
diff --git a/deps/npm/docs/output/commands/npm-audit.html b/deps/npm/docs/output/commands/npm-audit.html index 31ddedcdef361c..824d4c986edb8e 100644 --- a/deps/npm/docs/output/commands/npm-audit.html +++ b/deps/npm/docs/output/commands/npm-audit.html @@ -141,9 +141,9 @@
-

+

npm-audit - @11.1.0 + @11.2.0

Run a security audit
diff --git a/deps/npm/docs/output/commands/npm-bugs.html b/deps/npm/docs/output/commands/npm-bugs.html index 4ca7bf0f028e24..f179bc9b72329c 100644 --- a/deps/npm/docs/output/commands/npm-bugs.html +++ b/deps/npm/docs/output/commands/npm-bugs.html @@ -141,9 +141,9 @@
-

+

npm-bugs - @11.1.0 + @11.2.0

Report bugs for a package in a web browser
diff --git a/deps/npm/docs/output/commands/npm-cache.html b/deps/npm/docs/output/commands/npm-cache.html index 4f55c5eb53a01c..2b5e4c6e54afe3 100644 --- a/deps/npm/docs/output/commands/npm-cache.html +++ b/deps/npm/docs/output/commands/npm-cache.html @@ -141,16 +141,16 @@
-

+

npm-cache - @11.1.0 + @11.2.0

Manipulates packages cache

Table of contents

- +

Synopsis

@@ -158,54 +158,55 @@

Table of contents

npm cache clean [<key>] npm cache ls [<name>@<version>] npm cache verify +npm cache npx ls +npm cache npx rm [<key>...] +npm cache npx info <key>...

Note: This command is unaware of workspaces.

Description

-

Used to add, list, or clean the npm cache folder.

+

Used to add, list, or clean the npm cache folder. +Also used to view info about entries in the npm exec (aka npx) cache folder.

+

npm cache

  • add: -Add the specified packages to the local cache. This command is primarily -intended to be used internally by npm, but it can provide a way to -add data to the local installation cache explicitly.

    +Add the specified packages to the local cache. This command is primarily intended to be used internally by npm, but it can provide a way to add data to the local installation cache explicitly.

  • clean: -Delete all data out of the cache folder. Note that this is typically -unnecessary, as npm's cache is self-healing and resistant to data -corruption issues.

    +Delete a single entry or all entries out of the cache folder. Note that this is typically unnecessary, as npm's cache is self-healing and resistant to data corruption issues.

    +
  • +
  • +

    ls: +List given entries or all entries in the local cache.

  • verify: -Verify the contents of the cache folder, garbage collecting any unneeded -data, and verifying the integrity of the cache index and all cached data.

    +Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data.

    +
  • +
+

npm cache npx

+
    +
  • +

    ls: +List all entries in the npx cache.

    +
  • +
  • +

    rm: +Remove given entries or all entries from the npx cache.

    +
  • +
  • +

    info: +Get detailed information about given entries in the npx cache.

Details

-

npm stores cache data in an opaque directory within the configured cache, -named _cacache. This directory is a -cacache-based content-addressable cache that -stores all http request data as well as other package-related data. This -directory is primarily accessed through pacote, the library responsible -for all package fetching as of npm@5.

-

All data that passes through the cache is fully verified for integrity on -both insertion and extraction. Cache corruption will either trigger an -error, or signal to pacote that the data must be refetched, which it will -do automatically. For this reason, it should never be necessary to clear -the cache for any reason other than reclaiming disk space, thus why clean -now requires --force to run.

-

There is currently no method exposed through npm to inspect or directly -manage the contents of this cache. In order to access it, cacache must be -used directly.

-

npm will not remove data by itself: the cache will grow as new packages are -installed.

+

npm stores cache data in an opaque directory within the configured cache, named _cacache. This directory is a cacache-based content-addressable cache that stores all http request data as well as other package-related data. This directory is primarily accessed through pacote, the library responsible for all package fetching as of npm@5.

+

All data that passes through the cache is fully verified for integrity on both insertion and extraction. Cache corruption will either trigger an error, or signal to pacote that the data must be refetched, which it will do automatically. For this reason, it should never be necessary to clear the cache for any reason other than reclaiming disk space, thus why clean now requires --force to run.

+

There is currently no method exposed through npm to inspect or directly manage the contents of this cache. In order to access it, cacache must be used directly.

+

npm will not remove data by itself: the cache will grow as new packages are installed.

A note about the cache's design

-

The npm cache is strictly a cache: it should not be relied upon as a -persistent and reliable data store for package data. npm makes no guarantee -that a previously-cached piece of data will be available later, and will -automatically delete corrupted contents. The primary guarantee that the -cache makes is that, if it does return data, that data will be exactly the -data that was inserted.

+

The npm cache is strictly a cache: it should not be relied upon as a persistent and reliable data store for package data. npm makes no guarantee that a previously-cached piece of data will be available later, and will automatically delete corrupted contents. The primary guarantee that the cache makes is that, if it does return data, that data will be exactly the data that was inserted.

To run an offline verification of existing cache contents, use npm cache verify.

Configuration

cache

@@ -223,6 +224,7 @@

See Also

  • npm install
  • npm publish
  • npm pack
  • +
  • npm exec
  • https://npm.im/cacache
  • https://npm.im/pacote
  • https://npm.im/@npmcli/arborist
  • diff --git a/deps/npm/docs/output/commands/npm-ci.html b/deps/npm/docs/output/commands/npm-ci.html index 5425950065866c..245a9a30e682a6 100644 --- a/deps/npm/docs/output/commands/npm-ci.html +++ b/deps/npm/docs/output/commands/npm-ci.html @@ -141,9 +141,9 @@
    -

    +

    npm-ci - @11.1.0 + @11.2.0

    Clean install a project
    diff --git a/deps/npm/docs/output/commands/npm-completion.html b/deps/npm/docs/output/commands/npm-completion.html index b3d0830b63d716..48dc9fa3fbe18e 100644 --- a/deps/npm/docs/output/commands/npm-completion.html +++ b/deps/npm/docs/output/commands/npm-completion.html @@ -141,9 +141,9 @@
    -

    +

    npm-completion - @11.1.0 + @11.2.0

    Tab Completion for npm
    diff --git a/deps/npm/docs/output/commands/npm-config.html b/deps/npm/docs/output/commands/npm-config.html index 7dadee19db7a33..62a08bedf33bf4 100644 --- a/deps/npm/docs/output/commands/npm-config.html +++ b/deps/npm/docs/output/commands/npm-config.html @@ -141,9 +141,9 @@
    -

    +

    npm-config - @11.1.0 + @11.2.0

    Manage the npm configuration files
    diff --git a/deps/npm/docs/output/commands/npm-dedupe.html b/deps/npm/docs/output/commands/npm-dedupe.html index 6cb3a894676fd5..0b98938ddb4293 100644 --- a/deps/npm/docs/output/commands/npm-dedupe.html +++ b/deps/npm/docs/output/commands/npm-dedupe.html @@ -141,9 +141,9 @@
    -

    +

    npm-dedupe - @11.1.0 + @11.2.0

    Reduce duplication in the package tree
    diff --git a/deps/npm/docs/output/commands/npm-deprecate.html b/deps/npm/docs/output/commands/npm-deprecate.html index 38cd75f7f063e6..23166ac2c0e037 100644 --- a/deps/npm/docs/output/commands/npm-deprecate.html +++ b/deps/npm/docs/output/commands/npm-deprecate.html @@ -141,9 +141,9 @@
    -

    +

    npm-deprecate - @11.1.0 + @11.2.0

    Deprecate a version of a package
    diff --git a/deps/npm/docs/output/commands/npm-diff.html b/deps/npm/docs/output/commands/npm-diff.html index 08df918242b6fb..689a61d7a0e648 100644 --- a/deps/npm/docs/output/commands/npm-diff.html +++ b/deps/npm/docs/output/commands/npm-diff.html @@ -141,9 +141,9 @@
    -

    +

    npm-diff - @11.1.0 + @11.2.0

    The registry diff command
    diff --git a/deps/npm/docs/output/commands/npm-dist-tag.html b/deps/npm/docs/output/commands/npm-dist-tag.html index 2b9edfe90a7d80..52f8bf6b2f9ed5 100644 --- a/deps/npm/docs/output/commands/npm-dist-tag.html +++ b/deps/npm/docs/output/commands/npm-dist-tag.html @@ -141,9 +141,9 @@
    -

    +

    npm-dist-tag - @11.1.0 + @11.2.0

    Modify package distribution tags
    diff --git a/deps/npm/docs/output/commands/npm-docs.html b/deps/npm/docs/output/commands/npm-docs.html index 50f16c96a975b7..a074ad25c0f19f 100644 --- a/deps/npm/docs/output/commands/npm-docs.html +++ b/deps/npm/docs/output/commands/npm-docs.html @@ -141,9 +141,9 @@
    -

    +

    npm-docs - @11.1.0 + @11.2.0

    Open documentation for a package in a web browser
    diff --git a/deps/npm/docs/output/commands/npm-doctor.html b/deps/npm/docs/output/commands/npm-doctor.html index fa3519fd6129cf..650f1cc16cc371 100644 --- a/deps/npm/docs/output/commands/npm-doctor.html +++ b/deps/npm/docs/output/commands/npm-doctor.html @@ -141,9 +141,9 @@
    -

    +

    npm-doctor - @11.1.0 + @11.2.0

    Check the health of your npm environment
    diff --git a/deps/npm/docs/output/commands/npm-edit.html b/deps/npm/docs/output/commands/npm-edit.html index de834e216dcec2..abf6d4bd18e8be 100644 --- a/deps/npm/docs/output/commands/npm-edit.html +++ b/deps/npm/docs/output/commands/npm-edit.html @@ -141,9 +141,9 @@
    -

    +

    npm-edit - @11.1.0 + @11.2.0

    Edit an installed package
    diff --git a/deps/npm/docs/output/commands/npm-exec.html b/deps/npm/docs/output/commands/npm-exec.html index e0fef9ffdcde7f..e6a9b421dd8d24 100644 --- a/deps/npm/docs/output/commands/npm-exec.html +++ b/deps/npm/docs/output/commands/npm-exec.html @@ -141,9 +141,9 @@
    -

    +

    npm-exec - @11.1.0 + @11.2.0

    Run a command from a local or remote npm package
    diff --git a/deps/npm/docs/output/commands/npm-explain.html b/deps/npm/docs/output/commands/npm-explain.html index 4b90870653f61a..57bbcaf21d8709 100644 --- a/deps/npm/docs/output/commands/npm-explain.html +++ b/deps/npm/docs/output/commands/npm-explain.html @@ -141,9 +141,9 @@
    -

    +

    npm-explain - @11.1.0 + @11.2.0

    Explain installed packages
    diff --git a/deps/npm/docs/output/commands/npm-explore.html b/deps/npm/docs/output/commands/npm-explore.html index d4dd7049129e75..4594fbf11186f0 100644 --- a/deps/npm/docs/output/commands/npm-explore.html +++ b/deps/npm/docs/output/commands/npm-explore.html @@ -141,9 +141,9 @@
    -

    +

    npm-explore - @11.1.0 + @11.2.0

    Browse an installed package
    diff --git a/deps/npm/docs/output/commands/npm-find-dupes.html b/deps/npm/docs/output/commands/npm-find-dupes.html index 01dd00adfbd9a4..bbbf8f578d067b 100644 --- a/deps/npm/docs/output/commands/npm-find-dupes.html +++ b/deps/npm/docs/output/commands/npm-find-dupes.html @@ -141,9 +141,9 @@
    -

    +

    npm-find-dupes - @11.1.0 + @11.2.0

    Find duplication in the package tree
    diff --git a/deps/npm/docs/output/commands/npm-fund.html b/deps/npm/docs/output/commands/npm-fund.html index 1335b9a4a45651..6146d4d1cab3d1 100644 --- a/deps/npm/docs/output/commands/npm-fund.html +++ b/deps/npm/docs/output/commands/npm-fund.html @@ -141,9 +141,9 @@
    -

    +

    npm-fund - @11.1.0 + @11.2.0

    Retrieve funding information
    diff --git a/deps/npm/docs/output/commands/npm-help-search.html b/deps/npm/docs/output/commands/npm-help-search.html index 8d26d3109386e4..fe184f32df40f1 100644 --- a/deps/npm/docs/output/commands/npm-help-search.html +++ b/deps/npm/docs/output/commands/npm-help-search.html @@ -141,9 +141,9 @@
    -

    +

    npm-help-search - @11.1.0 + @11.2.0

    Search npm help documentation
    diff --git a/deps/npm/docs/output/commands/npm-help.html b/deps/npm/docs/output/commands/npm-help.html index 2b2cba996e4311..81e89b1f8e5304 100644 --- a/deps/npm/docs/output/commands/npm-help.html +++ b/deps/npm/docs/output/commands/npm-help.html @@ -141,9 +141,9 @@
    -

    +

    npm-help - @11.1.0 + @11.2.0

    Get help on npm
    diff --git a/deps/npm/docs/output/commands/npm-init.html b/deps/npm/docs/output/commands/npm-init.html index ce7826f6d2d7b3..91052c0ceb726f 100644 --- a/deps/npm/docs/output/commands/npm-init.html +++ b/deps/npm/docs/output/commands/npm-init.html @@ -141,16 +141,16 @@
    -

    +

    npm-init - @11.1.0 + @11.2.0

    Create a package.json file

    Table of contents

    - +

    Synopsis

    @@ -292,6 +292,13 @@

    init-module

    documentation for the init-package-json module for more information, or npm init.

    +

    init-type

    +
      +
    • Default: "commonjs"
    • +
    • Type: String
    • +
    +

    The value that npm init should use by default for the package.json type +field.

    init-version

    • Default: "1.0.0"
    • 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 bb4fbe65d7c617..a9701e405cdc8d 100644 --- a/deps/npm/docs/output/commands/npm-install-ci-test.html +++ b/deps/npm/docs/output/commands/npm-install-ci-test.html @@ -141,9 +141,9 @@
      -

      +

      npm-install-ci-test - @11.1.0 + @11.2.0

      Install a project with a clean slate and run tests
      diff --git a/deps/npm/docs/output/commands/npm-install-test.html b/deps/npm/docs/output/commands/npm-install-test.html index fde6444dc6d836..e3c0c16c74f287 100644 --- a/deps/npm/docs/output/commands/npm-install-test.html +++ b/deps/npm/docs/output/commands/npm-install-test.html @@ -141,9 +141,9 @@
      -

      +

      npm-install-test - @11.1.0 + @11.2.0

      Install package(s) and run tests
      diff --git a/deps/npm/docs/output/commands/npm-install.html b/deps/npm/docs/output/commands/npm-install.html index aa41a8a80c6cac..a78b983c63fd95 100644 --- a/deps/npm/docs/output/commands/npm-install.html +++ b/deps/npm/docs/output/commands/npm-install.html @@ -141,9 +141,9 @@
      -

      +

      npm-install - @11.1.0 + @11.2.0

      Install a package
      diff --git a/deps/npm/docs/output/commands/npm-link.html b/deps/npm/docs/output/commands/npm-link.html index 939fccc74b2bfe..b951ce576891ba 100644 --- a/deps/npm/docs/output/commands/npm-link.html +++ b/deps/npm/docs/output/commands/npm-link.html @@ -141,9 +141,9 @@
      -

      +

      npm-link - @11.1.0 + @11.2.0

      Symlink a package folder
      diff --git a/deps/npm/docs/output/commands/npm-login.html b/deps/npm/docs/output/commands/npm-login.html index 90120e5dc25f12..d45aa9b5005a44 100644 --- a/deps/npm/docs/output/commands/npm-login.html +++ b/deps/npm/docs/output/commands/npm-login.html @@ -141,9 +141,9 @@
      -

      +

      npm-login - @11.1.0 + @11.2.0

      Login to a registry user account
      diff --git a/deps/npm/docs/output/commands/npm-logout.html b/deps/npm/docs/output/commands/npm-logout.html index 50b66742c5d5a2..59313c4c358b4b 100644 --- a/deps/npm/docs/output/commands/npm-logout.html +++ b/deps/npm/docs/output/commands/npm-logout.html @@ -141,9 +141,9 @@
      -

      +

      npm-logout - @11.1.0 + @11.2.0

      Log out of the registry
      diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html index eeb76ce0f20a0c..749e71109c384c 100644 --- a/deps/npm/docs/output/commands/npm-ls.html +++ b/deps/npm/docs/output/commands/npm-ls.html @@ -141,9 +141,9 @@
      -

      +

      npm-ls - @11.1.0 + @11.2.0

      List installed packages
      @@ -168,7 +168,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@11.1.0 /path/to/npm
      +
      npm@11.2.0 /path/to/npm
       └─┬ init-package-json@0.0.4
         └── promzard@0.1.5
       
      diff --git a/deps/npm/docs/output/commands/npm-org.html b/deps/npm/docs/output/commands/npm-org.html index bd23376c48d545..80dd3aaaa6e575 100644 --- a/deps/npm/docs/output/commands/npm-org.html +++ b/deps/npm/docs/output/commands/npm-org.html @@ -141,9 +141,9 @@
      -

      +

      npm-org - @11.1.0 + @11.2.0

      Manage orgs
      diff --git a/deps/npm/docs/output/commands/npm-outdated.html b/deps/npm/docs/output/commands/npm-outdated.html index 3445a283f61e37..4761abb845ae1d 100644 --- a/deps/npm/docs/output/commands/npm-outdated.html +++ b/deps/npm/docs/output/commands/npm-outdated.html @@ -141,9 +141,9 @@
      -

      +

      npm-outdated - @11.1.0 + @11.2.0

      Check for outdated packages
      diff --git a/deps/npm/docs/output/commands/npm-owner.html b/deps/npm/docs/output/commands/npm-owner.html index 1c6159f6e4f6e7..236b761f719010 100644 --- a/deps/npm/docs/output/commands/npm-owner.html +++ b/deps/npm/docs/output/commands/npm-owner.html @@ -141,9 +141,9 @@
      -

      +

      npm-owner - @11.1.0 + @11.2.0

      Manage package owners
      diff --git a/deps/npm/docs/output/commands/npm-pack.html b/deps/npm/docs/output/commands/npm-pack.html index 810b344b466954..231e654d1080ba 100644 --- a/deps/npm/docs/output/commands/npm-pack.html +++ b/deps/npm/docs/output/commands/npm-pack.html @@ -141,9 +141,9 @@
      -

      +

      npm-pack - @11.1.0 + @11.2.0

      Create a tarball from a package
      diff --git a/deps/npm/docs/output/commands/npm-ping.html b/deps/npm/docs/output/commands/npm-ping.html index 5b53c9c4eb2bc8..782aded239b7b8 100644 --- a/deps/npm/docs/output/commands/npm-ping.html +++ b/deps/npm/docs/output/commands/npm-ping.html @@ -141,9 +141,9 @@
      -

      +

      npm-ping - @11.1.0 + @11.2.0

      Ping npm registry
      diff --git a/deps/npm/docs/output/commands/npm-pkg.html b/deps/npm/docs/output/commands/npm-pkg.html index 56a49e456c8bc3..aaff761d9ced9a 100644 --- a/deps/npm/docs/output/commands/npm-pkg.html +++ b/deps/npm/docs/output/commands/npm-pkg.html @@ -141,9 +141,9 @@
      -

      +

      npm-pkg - @11.1.0 + @11.2.0

      Manages your package.json
      diff --git a/deps/npm/docs/output/commands/npm-prefix.html b/deps/npm/docs/output/commands/npm-prefix.html index 11bcf4499ea8e0..d3777318f71293 100644 --- a/deps/npm/docs/output/commands/npm-prefix.html +++ b/deps/npm/docs/output/commands/npm-prefix.html @@ -141,9 +141,9 @@
      -

      +

      npm-prefix - @11.1.0 + @11.2.0

      Display prefix
      diff --git a/deps/npm/docs/output/commands/npm-profile.html b/deps/npm/docs/output/commands/npm-profile.html index 5ef47cb6f54c5e..593f0990d5b976 100644 --- a/deps/npm/docs/output/commands/npm-profile.html +++ b/deps/npm/docs/output/commands/npm-profile.html @@ -141,9 +141,9 @@
      -

      +

      npm-profile - @11.1.0 + @11.2.0

      Change settings on your registry profile
      diff --git a/deps/npm/docs/output/commands/npm-prune.html b/deps/npm/docs/output/commands/npm-prune.html index b293a9afee8c01..22a5381d7fb066 100644 --- a/deps/npm/docs/output/commands/npm-prune.html +++ b/deps/npm/docs/output/commands/npm-prune.html @@ -141,9 +141,9 @@
      -

      +

      npm-prune - @11.1.0 + @11.2.0

      Remove extraneous packages
      diff --git a/deps/npm/docs/output/commands/npm-publish.html b/deps/npm/docs/output/commands/npm-publish.html index 072de8db1b815a..db7f13a03e6177 100644 --- a/deps/npm/docs/output/commands/npm-publish.html +++ b/deps/npm/docs/output/commands/npm-publish.html @@ -141,9 +141,9 @@
      -

      +

      npm-publish - @11.1.0 + @11.2.0

      Publish a package
      diff --git a/deps/npm/docs/output/commands/npm-query.html b/deps/npm/docs/output/commands/npm-query.html index bbf8e375729138..857a0b26d68919 100644 --- a/deps/npm/docs/output/commands/npm-query.html +++ b/deps/npm/docs/output/commands/npm-query.html @@ -141,9 +141,9 @@
      -

      +

      npm-query - @11.1.0 + @11.2.0

      Dependency selector query
      diff --git a/deps/npm/docs/output/commands/npm-rebuild.html b/deps/npm/docs/output/commands/npm-rebuild.html index e9f18ad34917b6..15aa8dc8c72832 100644 --- a/deps/npm/docs/output/commands/npm-rebuild.html +++ b/deps/npm/docs/output/commands/npm-rebuild.html @@ -141,9 +141,9 @@
      -

      +

      npm-rebuild - @11.1.0 + @11.2.0

      Rebuild a package
      diff --git a/deps/npm/docs/output/commands/npm-repo.html b/deps/npm/docs/output/commands/npm-repo.html index 371720e49d3eb6..6f6e5bf8b28312 100644 --- a/deps/npm/docs/output/commands/npm-repo.html +++ b/deps/npm/docs/output/commands/npm-repo.html @@ -141,9 +141,9 @@
      -

      +

      npm-repo - @11.1.0 + @11.2.0

      Open package repository page in the browser
      diff --git a/deps/npm/docs/output/commands/npm-restart.html b/deps/npm/docs/output/commands/npm-restart.html index 4e9ae5b9c19005..970b88ac60d907 100644 --- a/deps/npm/docs/output/commands/npm-restart.html +++ b/deps/npm/docs/output/commands/npm-restart.html @@ -141,9 +141,9 @@
      -

      +

      npm-restart - @11.1.0 + @11.2.0

      Restart a package
      diff --git a/deps/npm/docs/output/commands/npm-root.html b/deps/npm/docs/output/commands/npm-root.html index 82a80daeea2575..9e2fd63a3e78a4 100644 --- a/deps/npm/docs/output/commands/npm-root.html +++ b/deps/npm/docs/output/commands/npm-root.html @@ -141,9 +141,9 @@
      -

      +

      npm-root - @11.1.0 + @11.2.0

      Display npm root
      diff --git a/deps/npm/docs/output/commands/npm-run-script.html b/deps/npm/docs/output/commands/npm-run-script.html index 358d05de63e85d..730380a954f0dd 100644 --- a/deps/npm/docs/output/commands/npm-run-script.html +++ b/deps/npm/docs/output/commands/npm-run-script.html @@ -141,9 +141,9 @@
      -

      +

      npm-run-script - @11.1.0 + @11.2.0

      Run arbitrary package scripts
      diff --git a/deps/npm/docs/output/commands/npm-sbom.html b/deps/npm/docs/output/commands/npm-sbom.html index 8539a60d11bc6a..a6b07138ee9471 100644 --- a/deps/npm/docs/output/commands/npm-sbom.html +++ b/deps/npm/docs/output/commands/npm-sbom.html @@ -141,9 +141,9 @@
      -

      +

      npm-sbom - @11.1.0 + @11.2.0

      Generate a Software Bill of Materials (SBOM)
      diff --git a/deps/npm/docs/output/commands/npm-search.html b/deps/npm/docs/output/commands/npm-search.html index 156b625d78f627..9cfdd40b868122 100644 --- a/deps/npm/docs/output/commands/npm-search.html +++ b/deps/npm/docs/output/commands/npm-search.html @@ -141,9 +141,9 @@
      -

      +

      npm-search - @11.1.0 + @11.2.0

      Search for packages
      diff --git a/deps/npm/docs/output/commands/npm-shrinkwrap.html b/deps/npm/docs/output/commands/npm-shrinkwrap.html index a192b67b2263a4..c1d76411ba674c 100644 --- a/deps/npm/docs/output/commands/npm-shrinkwrap.html +++ b/deps/npm/docs/output/commands/npm-shrinkwrap.html @@ -141,9 +141,9 @@
      -

      +

      npm-shrinkwrap - @11.1.0 + @11.2.0

      Lock down dependency versions for publication
      diff --git a/deps/npm/docs/output/commands/npm-star.html b/deps/npm/docs/output/commands/npm-star.html index e0d7524f196021..cba3bab2631e6f 100644 --- a/deps/npm/docs/output/commands/npm-star.html +++ b/deps/npm/docs/output/commands/npm-star.html @@ -141,9 +141,9 @@
      -

      +

      npm-star - @11.1.0 + @11.2.0

      Mark your favorite packages
      diff --git a/deps/npm/docs/output/commands/npm-stars.html b/deps/npm/docs/output/commands/npm-stars.html index 9151a43fdf675a..b919f4dc58f5fe 100644 --- a/deps/npm/docs/output/commands/npm-stars.html +++ b/deps/npm/docs/output/commands/npm-stars.html @@ -141,9 +141,9 @@
      -

      +

      npm-stars - @11.1.0 + @11.2.0

      View packages marked as favorites
      diff --git a/deps/npm/docs/output/commands/npm-start.html b/deps/npm/docs/output/commands/npm-start.html index 4f90b59e76af91..482004cb25514f 100644 --- a/deps/npm/docs/output/commands/npm-start.html +++ b/deps/npm/docs/output/commands/npm-start.html @@ -141,9 +141,9 @@
      -

      +

      npm-start - @11.1.0 + @11.2.0

      Start a package
      diff --git a/deps/npm/docs/output/commands/npm-stop.html b/deps/npm/docs/output/commands/npm-stop.html index 33828a29e1d56b..51afd1708ef203 100644 --- a/deps/npm/docs/output/commands/npm-stop.html +++ b/deps/npm/docs/output/commands/npm-stop.html @@ -141,9 +141,9 @@
      -

      +

      npm-stop - @11.1.0 + @11.2.0

      Stop a package
      diff --git a/deps/npm/docs/output/commands/npm-team.html b/deps/npm/docs/output/commands/npm-team.html index 25263f98e4406c..93e1e99505f41c 100644 --- a/deps/npm/docs/output/commands/npm-team.html +++ b/deps/npm/docs/output/commands/npm-team.html @@ -141,9 +141,9 @@
      -

      +

      npm-team - @11.1.0 + @11.2.0

      Manage organization teams and team memberships
      diff --git a/deps/npm/docs/output/commands/npm-test.html b/deps/npm/docs/output/commands/npm-test.html index 11003d31716054..09fd282ac67a62 100644 --- a/deps/npm/docs/output/commands/npm-test.html +++ b/deps/npm/docs/output/commands/npm-test.html @@ -141,9 +141,9 @@
      -

      +

      npm-test - @11.1.0 + @11.2.0

      Test a package
      diff --git a/deps/npm/docs/output/commands/npm-token.html b/deps/npm/docs/output/commands/npm-token.html index 8623e38d30f9a0..52f3842a31ddcb 100644 --- a/deps/npm/docs/output/commands/npm-token.html +++ b/deps/npm/docs/output/commands/npm-token.html @@ -141,9 +141,9 @@
      -

      +

      npm-token - @11.1.0 + @11.2.0

      Manage your authentication tokens
      diff --git a/deps/npm/docs/output/commands/npm-undeprecate.html b/deps/npm/docs/output/commands/npm-undeprecate.html index 2c90d8bd469edd..fb031ede1cca27 100644 --- a/deps/npm/docs/output/commands/npm-undeprecate.html +++ b/deps/npm/docs/output/commands/npm-undeprecate.html @@ -141,9 +141,9 @@
      -

      +

      npm-undeprecate - @11.1.0 + @11.2.0

      Undeprecate a version of a package
      diff --git a/deps/npm/docs/output/commands/npm-uninstall.html b/deps/npm/docs/output/commands/npm-uninstall.html index b93a3824046542..c08ea8481af6af 100644 --- a/deps/npm/docs/output/commands/npm-uninstall.html +++ b/deps/npm/docs/output/commands/npm-uninstall.html @@ -141,9 +141,9 @@
      -

      +

      npm-uninstall - @11.1.0 + @11.2.0

      Remove a package
      diff --git a/deps/npm/docs/output/commands/npm-unpublish.html b/deps/npm/docs/output/commands/npm-unpublish.html index 003809d7c80f0f..c27bda97b016a9 100644 --- a/deps/npm/docs/output/commands/npm-unpublish.html +++ b/deps/npm/docs/output/commands/npm-unpublish.html @@ -141,9 +141,9 @@
      -

      +

      npm-unpublish - @11.1.0 + @11.2.0

      Remove a package from the registry
      diff --git a/deps/npm/docs/output/commands/npm-unstar.html b/deps/npm/docs/output/commands/npm-unstar.html index 1880eacf691729..e6b74f6187eae8 100644 --- a/deps/npm/docs/output/commands/npm-unstar.html +++ b/deps/npm/docs/output/commands/npm-unstar.html @@ -141,9 +141,9 @@
      -

      +

      npm-unstar - @11.1.0 + @11.2.0

      Remove an item from your favorite packages
      diff --git a/deps/npm/docs/output/commands/npm-update.html b/deps/npm/docs/output/commands/npm-update.html index 565078ef619284..f5f15e06f345d8 100644 --- a/deps/npm/docs/output/commands/npm-update.html +++ b/deps/npm/docs/output/commands/npm-update.html @@ -141,9 +141,9 @@
      -

      +

      npm-update - @11.1.0 + @11.2.0

      Update packages
      diff --git a/deps/npm/docs/output/commands/npm-version.html b/deps/npm/docs/output/commands/npm-version.html index 3e397adbcde66f..566e6ce22d2bcd 100644 --- a/deps/npm/docs/output/commands/npm-version.html +++ b/deps/npm/docs/output/commands/npm-version.html @@ -141,9 +141,9 @@
      -

      +

      npm-version - @11.1.0 + @11.2.0

      Bump a package version
      diff --git a/deps/npm/docs/output/commands/npm-view.html b/deps/npm/docs/output/commands/npm-view.html index 878260eab54e0d..a140139784a2ad 100644 --- a/deps/npm/docs/output/commands/npm-view.html +++ b/deps/npm/docs/output/commands/npm-view.html @@ -141,9 +141,9 @@
      -

      +

      npm-view - @11.1.0 + @11.2.0

      View registry info
      diff --git a/deps/npm/docs/output/commands/npm-whoami.html b/deps/npm/docs/output/commands/npm-whoami.html index 64a60c0db8220a..43c92070ad4b61 100644 --- a/deps/npm/docs/output/commands/npm-whoami.html +++ b/deps/npm/docs/output/commands/npm-whoami.html @@ -141,9 +141,9 @@
      -

      +

      npm-whoami - @11.1.0 + @11.2.0

      Display npm username
      diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html index c4f6974a44a77b..41e09c7f606697 100644 --- a/deps/npm/docs/output/commands/npm.html +++ b/deps/npm/docs/output/commands/npm.html @@ -141,9 +141,9 @@
      -

      +

      npm - @11.1.0 + @11.2.0

      javascript package manager
      @@ -158,7 +158,7 @@

      Table of contents

      Note: This command is unaware of workspaces.

      Version

      -

      11.1.0

      +

      11.2.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/commands/npx.html b/deps/npm/docs/output/commands/npx.html index b5d74b9ee77638..3fdb954214b565 100644 --- a/deps/npm/docs/output/commands/npx.html +++ b/deps/npm/docs/output/commands/npx.html @@ -141,9 +141,9 @@

      -

      +

      npx - @11.1.0 + @11.2.0

      Run a command from a local or remote npm package
      diff --git a/deps/npm/docs/output/configuring-npm/folders.html b/deps/npm/docs/output/configuring-npm/folders.html index d64148aaac1fa8..60689e8c505583 100644 --- a/deps/npm/docs/output/configuring-npm/folders.html +++ b/deps/npm/docs/output/configuring-npm/folders.html @@ -141,9 +141,9 @@
      -

      +

      folders - @11.1.0 + @11.2.0

      Folder Structures Used by npm
      diff --git a/deps/npm/docs/output/configuring-npm/install.html b/deps/npm/docs/output/configuring-npm/install.html index 8233ac9ff5fa0f..58af5b2a605561 100644 --- a/deps/npm/docs/output/configuring-npm/install.html +++ b/deps/npm/docs/output/configuring-npm/install.html @@ -141,9 +141,9 @@
      -

      +

      install - @11.1.0 + @11.2.0

      Download and install node and npm
      diff --git a/deps/npm/docs/output/configuring-npm/npm-global.html b/deps/npm/docs/output/configuring-npm/npm-global.html index d64148aaac1fa8..60689e8c505583 100644 --- a/deps/npm/docs/output/configuring-npm/npm-global.html +++ b/deps/npm/docs/output/configuring-npm/npm-global.html @@ -141,9 +141,9 @@
      -

      +

      folders - @11.1.0 + @11.2.0

      Folder Structures Used by npm
      diff --git a/deps/npm/docs/output/configuring-npm/npm-json.html b/deps/npm/docs/output/configuring-npm/npm-json.html index 492bbc66909fe9..47dc45511241e5 100644 --- a/deps/npm/docs/output/configuring-npm/npm-json.html +++ b/deps/npm/docs/output/configuring-npm/npm-json.html @@ -141,9 +141,9 @@
      -

      +

      package.json - @11.1.0 + @11.2.0

      Specifics of npm's package.json handling
      diff --git a/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html b/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html index bfb2af36b3fcc4..18e3c97cc50a75 100644 --- a/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html +++ b/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html @@ -141,9 +141,9 @@
      -

      +

      npm-shrinkwrap.json - @11.1.0 + @11.2.0

      A publishable lockfile
      diff --git a/deps/npm/docs/output/configuring-npm/npmrc.html b/deps/npm/docs/output/configuring-npm/npmrc.html index 47235d09e67534..fc7df7c57f8b7f 100644 --- a/deps/npm/docs/output/configuring-npm/npmrc.html +++ b/deps/npm/docs/output/configuring-npm/npmrc.html @@ -141,9 +141,9 @@
      -

      +

      npmrc - @11.1.0 + @11.2.0

      The npm config files
      diff --git a/deps/npm/docs/output/configuring-npm/package-json.html b/deps/npm/docs/output/configuring-npm/package-json.html index 492bbc66909fe9..47dc45511241e5 100644 --- a/deps/npm/docs/output/configuring-npm/package-json.html +++ b/deps/npm/docs/output/configuring-npm/package-json.html @@ -141,9 +141,9 @@
      -

      +

      package.json - @11.1.0 + @11.2.0

      Specifics of npm's package.json handling
      diff --git a/deps/npm/docs/output/configuring-npm/package-lock-json.html b/deps/npm/docs/output/configuring-npm/package-lock-json.html index 7f9499ad8a33af..12157641201cf3 100644 --- a/deps/npm/docs/output/configuring-npm/package-lock-json.html +++ b/deps/npm/docs/output/configuring-npm/package-lock-json.html @@ -141,9 +141,9 @@
      -

      +

      package-lock.json - @11.1.0 + @11.2.0

      A manifestation of the manifest
      diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html index 1bf8079a0d87b5..7c41e407770cfe 100644 --- a/deps/npm/docs/output/using-npm/config.html +++ b/deps/npm/docs/output/using-npm/config.html @@ -141,16 +141,16 @@
      -

      +

      config - @11.1.0 + @11.2.0

      More than you probably want to know about npm configuration

      Table of contents

      -
      +

      Description

      @@ -739,6 +739,13 @@

      init-module

      documentation for the init-package-json module for more information, or npm init.

      +

      init-type

      +
        +
      • Default: "commonjs"
      • +
      • Type: String
      • +
      +

      The value that npm init should use by default for the package.json type +field.

      init-version

      • Default: "1.0.0"
      • diff --git a/deps/npm/docs/output/using-npm/dependency-selectors.html b/deps/npm/docs/output/using-npm/dependency-selectors.html index 45262830219e34..0835ec903544ff 100644 --- a/deps/npm/docs/output/using-npm/dependency-selectors.html +++ b/deps/npm/docs/output/using-npm/dependency-selectors.html @@ -141,9 +141,9 @@
        -

        +

        Dependency Selector Syntax & Querying - @11.1.0 + @11.2.0

        Dependency Selector Syntax & Querying
        diff --git a/deps/npm/docs/output/using-npm/developers.html b/deps/npm/docs/output/using-npm/developers.html index 59d26b8d749070..8f9b6b826feb8d 100644 --- a/deps/npm/docs/output/using-npm/developers.html +++ b/deps/npm/docs/output/using-npm/developers.html @@ -141,9 +141,9 @@
        -

        +

        developers - @11.1.0 + @11.2.0

        Developer Guide
        diff --git a/deps/npm/docs/output/using-npm/logging.html b/deps/npm/docs/output/using-npm/logging.html index be1ba729fe7fb7..86b4325c3c1220 100644 --- a/deps/npm/docs/output/using-npm/logging.html +++ b/deps/npm/docs/output/using-npm/logging.html @@ -141,9 +141,9 @@
        -

        +

        Logging - @11.1.0 + @11.2.0

        Why, What & How We Log
        diff --git a/deps/npm/docs/output/using-npm/orgs.html b/deps/npm/docs/output/using-npm/orgs.html index 27973694d39f94..f2d240d552d5a1 100644 --- a/deps/npm/docs/output/using-npm/orgs.html +++ b/deps/npm/docs/output/using-npm/orgs.html @@ -141,9 +141,9 @@
        -

        +

        orgs - @11.1.0 + @11.2.0

        Working with Teams & Orgs
        diff --git a/deps/npm/docs/output/using-npm/package-spec.html b/deps/npm/docs/output/using-npm/package-spec.html index b228b96c7878aa..73f1afd3b5f50e 100644 --- a/deps/npm/docs/output/using-npm/package-spec.html +++ b/deps/npm/docs/output/using-npm/package-spec.html @@ -141,9 +141,9 @@
        -

        +

        package-spec - @11.1.0 + @11.2.0

        Package name specifier
        diff --git a/deps/npm/docs/output/using-npm/registry.html b/deps/npm/docs/output/using-npm/registry.html index 809ed4eb11e97c..7568de964e6454 100644 --- a/deps/npm/docs/output/using-npm/registry.html +++ b/deps/npm/docs/output/using-npm/registry.html @@ -141,9 +141,9 @@
        -

        +

        registry - @11.1.0 + @11.2.0

        The JavaScript Package Registry
        diff --git a/deps/npm/docs/output/using-npm/removal.html b/deps/npm/docs/output/using-npm/removal.html index a2aa9d804e065c..168f8daa800a05 100644 --- a/deps/npm/docs/output/using-npm/removal.html +++ b/deps/npm/docs/output/using-npm/removal.html @@ -141,9 +141,9 @@
        -

        +

        removal - @11.1.0 + @11.2.0

        Cleaning the Slate
        diff --git a/deps/npm/docs/output/using-npm/scope.html b/deps/npm/docs/output/using-npm/scope.html index 4cc380f33d17e3..0ee600e6a77d3b 100644 --- a/deps/npm/docs/output/using-npm/scope.html +++ b/deps/npm/docs/output/using-npm/scope.html @@ -141,9 +141,9 @@
        -

        +

        scope - @11.1.0 + @11.2.0

        Scoped packages
        diff --git a/deps/npm/docs/output/using-npm/scripts.html b/deps/npm/docs/output/using-npm/scripts.html index f5ad43cf55c674..c54e4aa2560a18 100644 --- a/deps/npm/docs/output/using-npm/scripts.html +++ b/deps/npm/docs/output/using-npm/scripts.html @@ -141,9 +141,9 @@
        -

        +

        scripts - @11.1.0 + @11.2.0

        How npm handles the "scripts" field
        diff --git a/deps/npm/docs/output/using-npm/workspaces.html b/deps/npm/docs/output/using-npm/workspaces.html index 631be4072c03be..0ad845548b441b 100644 --- a/deps/npm/docs/output/using-npm/workspaces.html +++ b/deps/npm/docs/output/using-npm/workspaces.html @@ -141,9 +141,9 @@
        -

        +

        workspaces - @11.1.0 + @11.2.0

        Working with workspaces
        diff --git a/deps/npm/lib/cli/update-notifier.js b/deps/npm/lib/cli/update-notifier.js index 32cac18350be9f..ffe51af1feea69 100644 --- a/deps/npm/lib/cli/update-notifier.js +++ b/deps/npm/lib/cli/update-notifier.js @@ -40,7 +40,7 @@ const updateCheck = async (npm, spec, version, current) => { // and should get the updates from that release train. // Note that this isn't another http request over the network, because // the packument will be cached by pacote from previous request. - if (gt(version, latest) && spec === 'latest') { + if (gt(version, latest) && spec === '*') { return updateNotifier(npm, `^${version}`) } @@ -71,7 +71,7 @@ const updateCheck = async (npm, spec, version, current) => { return message } -const updateNotifier = async (npm, spec = 'latest') => { +const updateNotifier = async (npm, spec = '*') => { // if we're on a prerelease train, then updates are coming fast // check for a new one daily. otherwise, weekly. const { version } = npm @@ -83,7 +83,7 @@ const updateNotifier = async (npm, spec = 'latest') => { } // while on a beta train, get updates daily - const duration = spec !== 'latest' ? DAILY : WEEKLY + const duration = current.prerelease.length ? DAILY : WEEKLY const t = new Date(Date.now() - duration) // if we don't have a file, then definitely check it. diff --git a/deps/npm/lib/commands/cache.js b/deps/npm/lib/commands/cache.js index ddfeeb818a8174..35b87bef16c238 100644 --- a/deps/npm/lib/commands/cache.js +++ b/deps/npm/lib/commands/cache.js @@ -1,13 +1,15 @@ -const cacache = require('cacache') -const pacote = require('pacote') const fs = require('node:fs/promises') const { join } = require('node:path') +const cacache = require('cacache') +const pacote = require('pacote') const semver = require('semver') -const BaseCommand = require('../base-cmd.js') const npa = require('npm-package-arg') const jsonParse = require('json-parse-even-better-errors') const localeCompare = require('@isaacs/string-locale-compare')('en') const { log, output } = require('proc-log') +const PkgJson = require('@npmcli/package-json') +const abbrev = require('abbrev') +const BaseCommand = require('../base-cmd.js') const searchCachePackage = async (path, parsed, cacheKeys) => { const searchMFH = new RegExp(`^make-fetch-happen:request-cache:.*(? { } class Cache extends BaseCommand { - static description = 'Manipulates packages cache' + static description = 'Manipulates packages and npx cache' static name = 'cache' static params = ['cache'] static usage = [ @@ -70,12 +72,15 @@ class Cache extends BaseCommand { 'clean []', 'ls [@]', 'verify', + 'npx ls', + 'npx rm [...]', + 'npx info ...', ] static async completion (opts) { const argv = opts.conf.argv.remain if (argv.length === 2) { - return ['add', 'clean', 'verify', 'ls'] + return ['add', 'clean', 'verify', 'ls', 'npx'] } // TODO - eventually... @@ -99,14 +104,31 @@ class Cache extends BaseCommand { return await this.verify() case 'ls': return await this.ls(args) + case 'npx': + return await this.npx(args) + default: + throw this.usageError() + } + } + + // npm cache npx + async npx ([cmd, ...keys]) { + switch (cmd) { + case 'ls': + return await this.npxLs(keys) + case 'rm': + return await this.npxRm(keys) + case 'info': + return await this.npxInfo(keys) default: throw this.usageError() } } - // npm cache clean [pkg]* + // npm cache clean [spec]* async clean (args) { - const cachePath = join(this.npm.cache, '_cacache') + // this is a derived value + const cachePath = this.npm.flatOptions.cache if (args.length === 0) { if (!this.npm.config.get('force')) { throw new Error(`As of npm@5, the npm cache self-heals from corruption issues @@ -169,11 +191,12 @@ class Cache extends BaseCommand { } async verify () { - const cache = join(this.npm.cache, '_cacache') - const prefix = cache.indexOf(process.env.HOME) === 0 - ? `~${cache.slice(process.env.HOME.length)}` - : cache - const stats = await cacache.verify(cache) + // this is a derived value + const cachePath = this.npm.flatOptions.cache + const prefix = cachePath.indexOf(process.env.HOME) === 0 + ? `~${cachePath.slice(process.env.HOME.length)}` + : cachePath + const stats = await cacache.verify(cachePath) output.standard(`Cache verified and compressed (${prefix})`) output.standard(`Content verified: ${stats.verifiedContent} (${stats.keptSize} bytes)`) if (stats.badContentCount) { @@ -189,9 +212,10 @@ class Cache extends BaseCommand { output.standard(`Finished in ${stats.runTime.total / 1000}s`) } - // npm cache ls [--package ...] + // npm cache ls [ ...] async ls (specs) { - const cachePath = join(this.npm.cache, '_cacache') + // This is a derived value + const { cache: cachePath } = this.npm.flatOptions const cacheKeys = Object.keys(await cacache.ls(cachePath)) if (specs.length > 0) { // get results for each package spec specified @@ -211,6 +235,136 @@ class Cache extends BaseCommand { } cacheKeys.sort(localeCompare).forEach(key => output.standard(key)) } + + async #npxCache (keys = []) { + // This is a derived value + const { npxCache } = this.npm.flatOptions + let dirs + try { + dirs = await fs.readdir(npxCache, { encoding: 'utf-8' }) + } catch { + output.standard('npx cache does not exist') + return + } + const cache = {} + const { default: pMap } = await import('p-map') + await pMap(dirs, async e => { + const pkgPath = join(npxCache, e) + cache[e] = { + hash: e, + path: pkgPath, + valid: false, + } + try { + const pkgJson = await PkgJson.load(pkgPath) + cache[e].package = pkgJson.content + cache[e].valid = true + } catch { + // Defaults to not valid already + } + }, { concurrency: 20 }) + if (!keys.length) { + return cache + } + const result = {} + const abbrevs = abbrev(Object.keys(cache)) + for (const key of keys) { + if (!abbrevs[key]) { + throw this.usageError(`Invalid npx key ${key}`) + } + result[abbrevs[key]] = cache[abbrevs[key]] + } + return result + } + + async npxLs () { + const cache = await this.#npxCache() + for (const key in cache) { + const { hash, valid, package: pkg } = cache[key] + let result = `${hash}:` + if (!valid) { + result = `${result} (empty/invalid)` + } else if (pkg?._npx) { + result = `${result} ${pkg._npx.packages.join(', ')}` + } else { + result = `${result} (unknown)` + } + output.standard(result) + } + } + + async npxRm (keys) { + if (!keys.length) { + if (!this.npm.config.get('force')) { + throw this.usageError('Please use --force to remove entire npx cache') + } + const { npxCache } = this.npm.flatOptions + if (!this.npm.config.get('dry-run')) { + return fs.rm(npxCache, { recursive: true, force: true }) + } + } + + const cache = await this.#npxCache(keys) + for (const key in cache) { + const { path: cachePath } = cache[key] + output.standard(`Removing npx key at ${cachePath}`) + if (!this.npm.config.get('dry-run')) { + await fs.rm(cachePath, { recursive: true }) + } + } + } + + async npxInfo (keys) { + const chalk = this.npm.chalk + if (!keys.length) { + throw this.usageError() + } + const cache = await this.#npxCache(keys) + const Arborist = require('@npmcli/arborist') + for (const key in cache) { + const { hash, path, package: pkg } = cache[key] + let valid = cache[key].valid + const results = [] + try { + if (valid) { + const arb = new Arborist({ path }) + const tree = await arb.loadVirtual() + if (pkg._npx) { + results.push('packages:') + for (const p of pkg._npx.packages) { + const parsed = npa(p) + if (parsed.type === 'directory') { + // in the tree the spec is relative, even if the dependency spec is absolute, so we can't find it by name or spec. + results.push(`- ${chalk.cyan(p)}`) + } else { + results.push(`- ${chalk.cyan(p)} (${chalk.blue(tree.children.get(parsed.name).pkgid)})`) + } + } + } else { + results.push('packages: (unknown)') + results.push(`dependencies:`) + for (const dep in pkg.dependencies) { + const child = tree.children.get(dep) + if (child.isLink) { + results.push(`- ${chalk.cyan(child.realpath)}`) + } else { + results.push(`- ${chalk.cyan(child.pkgid)}`) + } + } + } + } + } catch (ex) { + valid = false + } + const v = valid ? chalk.green('valid') : chalk.red('invalid') + output.standard(`${v} npx cache entry with key ${chalk.blue(hash)}`) + output.standard(`location: ${chalk.blue(path)}`) + if (valid) { + output.standard(results.join('\n')) + } + output.standard('') + } + } } module.exports = Cache diff --git a/deps/npm/lib/commands/config.js b/deps/npm/lib/commands/config.js index 6b1447d7e84268..31dbc074a83726 100644 --- a/deps/npm/lib/commands/config.js +++ b/deps/npm/lib/commands/config.js @@ -4,23 +4,11 @@ const { spawn } = require('node:child_process') const { EOL } = require('node:os') const localeCompare = require('@isaacs/string-locale-compare')('en') const pkgJson = require('@npmcli/package-json') -const { defaults, definitions } = require('@npmcli/config/lib/definitions') +const { defaults, definitions, nerfDarts } = require('@npmcli/config/lib/definitions') const { log, output } = require('proc-log') const BaseCommand = require('../base-cmd.js') const { redact } = require('@npmcli/redact') -// These are the configs that we can nerf-dart. Not all of them currently even -// *have* config definitions so we have to explicitly validate them here. -// This is used to validate during "npm config set" -const nerfDarts = [ - '_auth', - '_authToken', - '_password', - 'certfile', - 'email', - 'keyfile', - 'username', -] // These are the config values to swap with "protected". It does not catch // every single sensitive thing a user may put in the npmrc file but it gets // the common ones. This is distinct from nerfDarts because that is used to @@ -125,7 +113,7 @@ class Config extends BaseCommand { const action = argv[2] switch (action) { case 'set': - // todo: complete with valid values, if possible. + // TODO: complete with valid values, if possible. if (argv.length > 3) { return [] } @@ -378,6 +366,9 @@ ${defData} const { content } = await pkgJson.normalize(this.npm.prefix).catch(() => ({ content: {} })) if (content.publishConfig) { + for (const key in content.publishConfig) { + this.npm.config.checkUnknown('publishConfig', key) + } const pkgPath = resolve(this.npm.prefix, 'package.json') msg.push(`; "publishConfig" from ${pkgPath}`) msg.push('; This set of config values will be used at publish-time.', '') diff --git a/deps/npm/lib/commands/diff.js b/deps/npm/lib/commands/diff.js index a97eed92c83cba..0ab7f6fccc9c6a 100644 --- a/deps/npm/lib/commands/diff.js +++ b/deps/npm/lib/commands/diff.js @@ -106,7 +106,7 @@ class Diff extends BaseCommand { const pkgName = await this.packageName() return [ `${pkgName}@${this.npm.config.get('tag')}`, - `file:${this.prefix.replace(/#/g, '%23')}`, + `file:${this.prefix}`, ] } @@ -134,7 +134,7 @@ class Diff extends BaseCommand { } return [ `${pkgName}@${a}`, - `file:${this.prefix.replace(/#/g, '%23')}`, + `file:${this.prefix}`, ] } @@ -166,7 +166,7 @@ class Diff extends BaseCommand { } return [ `${spec.name}@${spec.fetchSpec}`, - `file:${this.prefix.replace(/#/g, '%23')}`, + `file:${this.prefix}`, ] } @@ -179,7 +179,7 @@ class Diff extends BaseCommand { } } - const aSpec = `file:${node.realpath.replace(/#/g, '%23')}` + const aSpec = `file:${node.realpath}` // finds what version of the package to compare against, if a exact // version or tag was passed than it should use that, otherwise @@ -212,8 +212,8 @@ class Diff extends BaseCommand { ] } else if (spec.type === 'directory') { return [ - `file:${spec.fetchSpec.replace(/#/g, '%23')}`, - `file:${this.prefix.replace(/#/g, '%23')}`, + `file:${spec.fetchSpec}`, + `file:${this.prefix}`, ] } else { throw this.usageError(`Spec type ${spec.type} not supported.`) @@ -281,7 +281,7 @@ class Diff extends BaseCommand { const res = !node || !node.package || !node.package.version ? spec.fetchSpec - : `file:${node.realpath.replace(/#/g, '%23')}` + : `file:${node.realpath}` return `${spec.name}@${res}` }) diff --git a/deps/npm/lib/commands/init.js b/deps/npm/lib/commands/init.js index bef54b0e4138d9..db33345d9427e5 100644 --- a/deps/npm/lib/commands/init.js +++ b/deps/npm/lib/commands/init.js @@ -19,6 +19,7 @@ class Init extends BaseCommand { 'init-author-url', 'init-license', 'init-module', + 'init-type', 'init-version', 'yes', 'force', diff --git a/deps/npm/lib/commands/link.js b/deps/npm/lib/commands/link.js index 8a41548d7f108b..4955a5b77d338b 100644 --- a/deps/npm/lib/commands/link.js +++ b/deps/npm/lib/commands/link.js @@ -124,7 +124,7 @@ class Link extends ArboristWorkspaceCmd { ...this.npm.flatOptions, prune: false, path: this.npm.prefix, - add: names.map(l => `file:${resolve(globalTop, 'node_modules', l).replace(/#/g, '%23')}`), + add: names.map(l => `file:${resolve(globalTop, 'node_modules', l)}`), save, workspaces: this.workspaceNames, }) @@ -135,7 +135,7 @@ class Link extends ArboristWorkspaceCmd { async linkPkg () { const wsp = this.workspacePaths const paths = wsp && wsp.length ? wsp : [this.npm.prefix] - const add = paths.map(path => `file:${path.replace(/#/g, '%23')}`) + const add = paths.map(path => `file:${path}`) const globalTop = resolve(this.npm.globalDir, '..') const Arborist = require('@npmcli/arborist') const arb = new Arborist({ diff --git a/deps/npm/lib/commands/publish.js b/deps/npm/lib/commands/publish.js index 1967e05a23534f..cc15087f0b3685 100644 --- a/deps/npm/lib/commands/publish.js +++ b/deps/npm/lib/commands/publish.js @@ -266,6 +266,11 @@ class Publish extends BaseCommand { // corresponding `publishConfig` settings const filteredPublishConfig = Object.fromEntries( Object.entries(manifest.publishConfig).filter(([key]) => !(key in cliFlags))) + if (logWarnings) { + for (const key in filteredPublishConfig) { + this.npm.config.checkUnknown('publishConfig', key) + } + } flatten(filteredPublishConfig, opts) } return manifest diff --git a/deps/npm/lib/commands/unpublish.js b/deps/npm/lib/commands/unpublish.js index 4944888fe5aca5..e1c06d31840573 100644 --- a/deps/npm/lib/commands/unpublish.js +++ b/deps/npm/lib/commands/unpublish.js @@ -145,6 +145,9 @@ class Unpublish extends BaseCommand { // corresponding `publishConfig` settings const filteredPublishConfig = Object.fromEntries( Object.entries(manifest.publishConfig).filter(([key]) => !(key in cliFlags))) + for (const key in filteredPublishConfig) { + this.npm.config.checkUnknown('publishConfig', key) + } flatten(filteredPublishConfig, opts) } diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index 893e032f1ecedd..85f175fb902f3d 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -2,7 +2,7 @@ const { resolve, dirname, join } = require('node:path') const Config = require('@npmcli/config') const which = require('which') const fs = require('node:fs/promises') -const { definitions, flatten, shorthands } = require('@npmcli/config/lib/definitions') +const { definitions, flatten, nerfDarts, shorthands } = require('@npmcli/config/lib/definitions') const usage = require('./utils/npm-usage.js') const LogFile = require('./utils/log-file.js') const Timers = require('./utils/timers.js') @@ -68,6 +68,7 @@ class Npm { npmPath: this.#npmRoot, definitions, flatten, + nerfDarts, shorthands, argv: [...process.argv, ...argv], excludeNpmCwd, diff --git a/deps/npm/lib/utils/verify-signatures.js b/deps/npm/lib/utils/verify-signatures.js index 73a96cfe16488b..cf9fafd17745da 100644 --- a/deps/npm/lib/utils/verify-signatures.js +++ b/deps/npm/lib/utils/verify-signatures.js @@ -192,6 +192,7 @@ class VerifySignatures { // If keys not found in Sigstore TUF repo, fallback to registry keys API if (!keys) { + log.warn(`Fetching verification keys using TUF failed. Fetching directly from ${registry}.`) keys = await npmFetch.json('/-/npm/v1/keys', { ...this.npm.flatOptions, registry, diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index 7b38ff1c849c33..4eab6612ee72f0 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 2025" "NPM@11.1.0" "" +.TH "NPM-ACCESS" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-access\fR - Set access level on published packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 50edafaf08d14f..2c2c03c03d8e9a 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 2025" "NPM@11.1.0" "" +.TH "NPM-ADDUSER" "1" "March 2025" "NPM@11.2.0" "" .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 1134cd3f1f6c96..ed0b3252c50f16 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 2025" "NPM@11.1.0" "" +.TH "NPM-AUDIT" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-audit\fR - Run a security audit .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index b0ead37457653d..3706c7b691b075 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 2025" "NPM@11.1.0" "" +.TH "NPM-BUGS" "1" "March 2025" "NPM@11.2.0" "" .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 942fd3050cb8bf..c56e9ecb12b4ae 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 2025" "NPM@11.1.0" "" +.TH "NPM-CACHE" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-cache\fR - Manipulates packages cache .SS "Synopsis" @@ -9,22 +9,38 @@ npm cache add npm cache clean \[lB]\[rB] npm cache ls \[lB]@\[rB] npm cache verify +npm cache npx ls +npm cache npx rm \[lB]...\[rB] +npm cache npx info ... .fi .RE .P Note: This command is unaware of workspaces. .SS "Description" .P -Used to add, list, or clean the npm cache folder. +Used to add, list, or clean the \fBnpm cache\fR folder. Also used to view info about entries in the \fBnpm exec\fR (aka \fBnpx\fR) cache folder. +.SS "\fBnpm cache\fR" .RS 0 .IP \(bu 4 add: Add the specified packages to the local cache. This command is primarily intended to be used internally by npm, but it can provide a way to add data to the local installation cache explicitly. .IP \(bu 4 -clean: Delete all data out of the cache folder. Note that this is typically unnecessary, as npm's cache is self-healing and resistant to data corruption issues. +clean: Delete a single entry or all entries out of the cache folder. Note that this is typically unnecessary, as npm's cache is self-healing and resistant to data corruption issues. +.IP \(bu 4 +ls: List given entries or all entries in the local cache. .IP \(bu 4 verify: Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data. .RE 0 +.SS "\fBnpm cache npx\fR" +.RS 0 +.IP \(bu 4 +ls: List all entries in the npx cache. +.IP \(bu 4 +rm: Remove given entries or all entries from the npx cache. +.IP \(bu 4 +info: Get detailed information about given entries in the npx cache. +.RE 0 + .SS "Details" .P npm stores cache data in an opaque directory within the configured \fBcache\fR, named \fB_cacache\fR. This directory is a \fB\fBcacache\fR\fR \fI\(lahttp://npm.im/cacache\(ra\fR-based content-addressable cache that stores all http request data as well as other package-related data. This directory is primarily accessed through \fBpacote\fR, the library responsible for all package fetching as of npm@5. @@ -68,6 +84,8 @@ npm help publish .IP \(bu 4 npm help pack .IP \(bu 4 +npm help exec +.IP \(bu 4 https://npm.im/cacache .IP \(bu 4 https://npm.im/pacote diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1 index c06d8bd5fcc804..b82e692c547c41 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 2025" "NPM@11.1.0" "" +.TH "NPM-CI" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-ci\fR - Clean install a project .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index f60b14f3e615b9..9f4e8be534b2f7 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 2025" "NPM@11.1.0" "" +.TH "NPM-COMPLETION" "1" "March 2025" "NPM@11.2.0" "" .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 00dbde65a8ab5a..96782799e31671 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 2025" "NPM@11.1.0" "" +.TH "NPM-CONFIG" "1" "March 2025" "NPM@11.2.0" "" .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 3431b75f8dae3b..4c17d966594682 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 2025" "NPM@11.1.0" "" +.TH "NPM-DEDUPE" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-dedupe\fR - Reduce duplication in the package tree .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index 8f540f53374530..cec46de8f9737f 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 2025" "NPM@11.1.0" "" +.TH "NPM-DEPRECATE" "1" "March 2025" "NPM@11.2.0" "" .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 e6e4acd100a2b4..93413207f22615 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 2025" "NPM@11.1.0" "" +.TH "NPM-DIFF" "1" "March 2025" "NPM@11.2.0" "" .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 e8b3b13c36f65c..f3716402f53191 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 2025" "NPM@11.1.0" "" +.TH "NPM-DIST-TAG" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-dist-tag\fR - Modify package distribution tags .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index b3e87a00445ad7..0bbb3f9f3daed7 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 2025" "NPM@11.1.0" "" +.TH "NPM-DOCS" "1" "March 2025" "NPM@11.2.0" "" .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 7d6592112262cd..eff47d53909134 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 2025" "NPM@11.1.0" "" +.TH "NPM-DOCTOR" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-doctor\fR - Check the health of your npm environment .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 7bb62811bdd7b9..79d03966663485 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 2025" "NPM@11.1.0" "" +.TH "NPM-EDIT" "1" "March 2025" "NPM@11.2.0" "" .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 90f755098dc7f7..0ce10d45545e0e 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 2025" "NPM@11.1.0" "" +.TH "NPM-EXEC" "1" "March 2025" "NPM@11.2.0" "" .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 d504596badf13c..f21b27671cdb8d 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 2025" "NPM@11.1.0" "" +.TH "NPM-EXPLAIN" "1" "March 2025" "NPM@11.2.0" "" .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 b53b2d1fa2323e..e379364d109dfb 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 2025" "NPM@11.1.0" "" +.TH "NPM-EXPLORE" "1" "March 2025" "NPM@11.2.0" "" .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 b73f941530a0f7..78b4c66f62e571 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 2025" "NPM@11.1.0" "" +.TH "NPM-FIND-DUPES" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-find-dupes\fR - Find duplication in the package tree .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1 index a518906b34a1b2..ea1ed87582f477 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 2025" "NPM@11.1.0" "" +.TH "NPM-FUND" "1" "March 2025" "NPM@11.2.0" "" .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 343fa1da2d31c2..3816d5ecdeccf9 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 2025" "NPM@11.1.0" "" +.TH "NPM-HELP-SEARCH" "1" "March 2025" "NPM@11.2.0" "" .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 953c83975ec001..a185d76fb13866 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 2025" "NPM@11.1.0" "" +.TH "NPM-HELP" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-help\fR - Get help on npm .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 81b6da737c93e0..ff4963d10ad3c8 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 2025" "NPM@11.1.0" "" +.TH "NPM-INIT" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-init\fR - Create a package.json file .SS "Synopsis" @@ -188,6 +188,16 @@ Type: Path .P A module that will be loaded by the \fBnpm init\fR command. See the documentation for the \fBinit-package-json\fR \fI\(lahttps://github.com/npm/init-package-json\(ra\fR module for more information, or npm help init. +.SS "\fBinit-type\fR" +.RS 0 +.IP \(bu 4 +Default: "commonjs" +.IP \(bu 4 +Type: String +.RE 0 + +.P +The value that \fBnpm init\fR should use by default for the package.json type field. .SS "\fBinit-version\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1 index d15833cf2e5f06..e8dca4d9ee8623 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 2025" "NPM@11.1.0" "" +.TH "NPM-INSTALL-CI-TEST" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-install-ci-test\fR - Install a project with a clean slate and run tests .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index c417669d643ca9..a2005d9467bf49 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 2025" "NPM@11.1.0" "" +.TH "NPM-INSTALL-TEST" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-install-test\fR - Install package(s) and run tests .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index aed560e29998c9..139074f563a236 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 2025" "NPM@11.1.0" "" +.TH "NPM-INSTALL" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-install\fR - Install a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index f77a5d0a7fb20b..7024438ca5d907 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 2025" "NPM@11.1.0" "" +.TH "NPM-LINK" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-link\fR - Symlink a package folder .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-login.1 b/deps/npm/man/man1/npm-login.1 index 70363b90ff006d..0ccd966da23b1c 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 2025" "NPM@11.1.0" "" +.TH "NPM-LOGIN" "1" "March 2025" "NPM@11.2.0" "" .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 0eb823691ad096..7e7acc2dc2a1fa 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 2025" "NPM@11.1.0" "" +.TH "NPM-LOGOUT" "1" "March 2025" "NPM@11.2.0" "" .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 9ab042a29a349f..561b98fd21e395 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 2025" "NPM@11.1.0" "" +.TH "NPM-LS" "1" "March 2025" "NPM@11.2.0" "" .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@11.1.0 /path/to/npm +npm@11.2.0 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 .fi diff --git a/deps/npm/man/man1/npm-org.1 b/deps/npm/man/man1/npm-org.1 index d7f7d94741eb3f..198a8e1fd2b090 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 2025" "NPM@11.1.0" "" +.TH "NPM-ORG" "1" "March 2025" "NPM@11.2.0" "" .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 5d9268fbdcc89d..2b7d3209012665 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 2025" "NPM@11.1.0" "" +.TH "NPM-OUTDATED" "1" "March 2025" "NPM@11.2.0" "" .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 2b341b94165343..86afc06aba1dcb 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 2025" "NPM@11.1.0" "" +.TH "NPM-OWNER" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-owner\fR - Manage package owners .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index 584561a11e9fcb..83c7f73a669f38 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 2025" "NPM@11.1.0" "" +.TH "NPM-PACK" "1" "March 2025" "NPM@11.2.0" "" .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 32e0abf18c5352..eb77b86fab635f 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 2025" "NPM@11.1.0" "" +.TH "NPM-PING" "1" "March 2025" "NPM@11.2.0" "" .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 fc7aeb424af3df..6aef3af38b8045 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 2025" "NPM@11.1.0" "" +.TH "NPM-PKG" "1" "March 2025" "NPM@11.2.0" "" .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 b93189158d84cb..21c9b2334ea3db 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 2025" "NPM@11.1.0" "" +.TH "NPM-PREFIX" "1" "March 2025" "NPM@11.2.0" "" .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 25ec636d23d698..46a8a6371ef601 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 2025" "NPM@11.1.0" "" +.TH "NPM-PROFILE" "1" "March 2025" "NPM@11.2.0" "" .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 b60f49ca61d715..e2f3d7f330265a 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 2025" "NPM@11.1.0" "" +.TH "NPM-PRUNE" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-prune\fR - Remove extraneous packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index c00b64448f0729..9e58cc7e288962 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 2025" "NPM@11.1.0" "" +.TH "NPM-PUBLISH" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-publish\fR - Publish a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-query.1 b/deps/npm/man/man1/npm-query.1 index 5f1aad64ceeb71..ffccdccc7afb72 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 2025" "NPM@11.1.0" "" +.TH "NPM-QUERY" "1" "March 2025" "NPM@11.2.0" "" .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 da4a8b11663d5d..93ccd7d102649d 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 2025" "NPM@11.1.0" "" +.TH "NPM-REBUILD" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-rebuild\fR - Rebuild a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index 4224bc84a4e7e5..4f9a1da3067dab 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 2025" "NPM@11.1.0" "" +.TH "NPM-REPO" "1" "March 2025" "NPM@11.2.0" "" .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 6984127b0958e2..2d045da5271e19 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 2025" "NPM@11.1.0" "" +.TH "NPM-RESTART" "1" "March 2025" "NPM@11.2.0" "" .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 07b35eb775c52e..1a0a0ca177c3e0 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 2025" "NPM@11.1.0" "" +.TH "NPM-ROOT" "1" "March 2025" "NPM@11.2.0" "" .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 3d35cd41ee8730..15186301d912a6 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 2025" "NPM@11.1.0" "" +.TH "NPM-RUN-SCRIPT" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-run-script\fR - Run arbitrary package scripts .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-sbom.1 b/deps/npm/man/man1/npm-sbom.1 index 8ddaaa982684f8..e410b73e3295e1 100644 --- a/deps/npm/man/man1/npm-sbom.1 +++ b/deps/npm/man/man1/npm-sbom.1 @@ -1,4 +1,4 @@ -.TH "NPM-SBOM" "1" "January 2025" "NPM@11.1.0" "" +.TH "NPM-SBOM" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-sbom\fR - Generate a Software Bill of Materials (SBOM) .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index c1499659fca7e9..46dc1ed4b5ee50 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 2025" "NPM@11.1.0" "" +.TH "NPM-SEARCH" "1" "March 2025" "NPM@11.2.0" "" .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 2772e9c3f5746c..b6354529b130ab 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 2025" "NPM@11.1.0" "" +.TH "NPM-SHRINKWRAP" "1" "March 2025" "NPM@11.2.0" "" .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 01151cd6fd6ea3..2ec5c3977e8d7c 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 2025" "NPM@11.1.0" "" +.TH "NPM-STAR" "1" "March 2025" "NPM@11.2.0" "" .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 b4a5895d62c76d..13e63f851487e2 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 2025" "NPM@11.1.0" "" +.TH "NPM-STARS" "1" "March 2025" "NPM@11.2.0" "" .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 0019462ff8fbed..a9fd4ee0888948 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 2025" "NPM@11.1.0" "" +.TH "NPM-START" "1" "March 2025" "NPM@11.2.0" "" .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 6d9c1b86cd896a..0f39aa34732cd9 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 2025" "NPM@11.1.0" "" +.TH "NPM-STOP" "1" "March 2025" "NPM@11.2.0" "" .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 bdadd11dfd754d..3c1535eb2f8a59 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 2025" "NPM@11.1.0" "" +.TH "NPM-TEAM" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-team\fR - Manage organization teams and team memberships .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index 4e69059f63a8a6..762ebeef09f042 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 2025" "NPM@11.1.0" "" +.TH "NPM-TEST" "1" "March 2025" "NPM@11.2.0" "" .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 bfc6f4e5c928ed..fc0c0b21d02f78 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 2025" "NPM@11.1.0" "" +.TH "NPM-TOKEN" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-token\fR - Manage your authentication tokens .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-undeprecate.1 b/deps/npm/man/man1/npm-undeprecate.1 index 92841612d23ec4..d38792bfa0139e 100644 --- a/deps/npm/man/man1/npm-undeprecate.1 +++ b/deps/npm/man/man1/npm-undeprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNDEPRECATE" "1" "January 2025" "NPM@11.1.0" "" +.TH "NPM-UNDEPRECATE" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-undeprecate\fR - Undeprecate a version of a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index 4ea0ee9bc1056e..92e63a7d451b52 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 2025" "NPM@11.1.0" "" +.TH "NPM-UNINSTALL" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-uninstall\fR - Remove a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index 3b8583d2337b80..517d3c28877fdb 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 2025" "NPM@11.1.0" "" +.TH "NPM-UNPUBLISH" "1" "March 2025" "NPM@11.2.0" "" .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 b86ae34c44cfa8..a8fbda91d34790 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 2025" "NPM@11.1.0" "" +.TH "NPM-UNSTAR" "1" "March 2025" "NPM@11.2.0" "" .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 380cc280805ca9..c81d164bb69365 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 2025" "NPM@11.1.0" "" +.TH "NPM-UPDATE" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm-update\fR - Update packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index 69b08437484fc5..21e1dfbd6d477d 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 2025" "NPM@11.1.0" "" +.TH "NPM-VERSION" "1" "March 2025" "NPM@11.2.0" "" .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 c60aa77791a44b..40db5ad5aa33a2 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 2025" "NPM@11.1.0" "" +.TH "NPM-VIEW" "1" "March 2025" "NPM@11.2.0" "" .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 001b58e557260e..8f90123b3d6ce3 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 2025" "NPM@11.1.0" "" +.TH "NPM-WHOAMI" "1" "March 2025" "NPM@11.2.0" "" .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 bc7b26c7219cbd..944ac5cf3a5e65 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "January 2025" "NPM@11.1.0" "" +.TH "NPM" "1" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBnpm\fR - javascript package manager .SS "Synopsis" @@ -12,7 +12,7 @@ npm Note: This command is unaware of workspaces. .SS "Version" .P -11.1.0 +11.2.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 9ce3467e880175..34059a09488dda 100644 --- a/deps/npm/man/man1/npx.1 +++ b/deps/npm/man/man1/npx.1 @@ -1,4 +1,4 @@ -.TH "NPX" "1" "January 2025" "NPM@11.1.0" "" +.TH "NPX" "1" "March 2025" "NPM@11.2.0" "" .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 684b0a2f54809b..ad90636cdb8d16 100644 --- a/deps/npm/man/man5/folders.5 +++ b/deps/npm/man/man5/folders.5 @@ -1,4 +1,4 @@ -.TH "FOLDERS" "5" "January 2025" "NPM@11.1.0" "" +.TH "FOLDERS" "5" "March 2025" "NPM@11.2.0" "" .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 d116d83e40efd1..c29f608b97d837 100644 --- a/deps/npm/man/man5/install.5 +++ b/deps/npm/man/man5/install.5 @@ -1,4 +1,4 @@ -.TH "INSTALL" "5" "January 2025" "NPM@11.1.0" "" +.TH "INSTALL" "5" "March 2025" "NPM@11.2.0" "" .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 684b0a2f54809b..ad90636cdb8d16 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 2025" "NPM@11.1.0" "" +.TH "FOLDERS" "5" "March 2025" "NPM@11.2.0" "" .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 dd7d5de64fc0ca..e5712dc019f7c6 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 2025" "NPM@11.1.0" "" +.TH "PACKAGE.JSON" "5" "March 2025" "NPM@11.2.0" "" .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 574a9b0e2b22ef..c8f44b15cbe560 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 2025" "NPM@11.1.0" "" +.TH "NPM-SHRINKWRAP.JSON" "5" "March 2025" "NPM@11.2.0" "" .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 8b4f651107d0a8..26baf875725495 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "January 2025" "NPM@11.1.0" "" +.TH "NPMRC" "5" "March 2025" "NPM@11.2.0" "" .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 dd7d5de64fc0ca..e5712dc019f7c6 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 2025" "NPM@11.1.0" "" +.TH "PACKAGE.JSON" "5" "March 2025" "NPM@11.2.0" "" .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 80f5cb3cc4a340..e5ca24764145bb 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 2025" "NPM@11.1.0" "" +.TH "PACKAGE-LOCK.JSON" "5" "March 2025" "NPM@11.2.0" "" .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 2383b048cc5f0a..4e6afa4774035c 100644 --- a/deps/npm/man/man7/config.7 +++ b/deps/npm/man/man7/config.7 @@ -1,4 +1,4 @@ -.TH "CONFIG" "7" "January 2025" "NPM@11.1.0" "" +.TH "CONFIG" "7" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBconfig\fR - More than you probably want to know about npm configuration .SS "Description" @@ -828,6 +828,16 @@ Type: Path .P A module that will be loaded by the \fBnpm init\fR command. See the documentation for the \fBinit-package-json\fR \fI\(lahttps://github.com/npm/init-package-json\(ra\fR module for more information, or npm help init. +.SS "\fBinit-type\fR" +.RS 0 +.IP \(bu 4 +Default: "commonjs" +.IP \(bu 4 +Type: String +.RE 0 + +.P +The value that \fBnpm init\fR should use by default for the package.json type field. .SS "\fBinit-version\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 9e171f59ae6369..47fe363aea3ff8 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 2025" "NPM@11.1.0" "" +.TH "QUERYING" "7" "March 2025" "NPM@11.2.0" "" .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 3c07981d08cd97..6ee5073cbb0cc6 100644 --- a/deps/npm/man/man7/developers.7 +++ b/deps/npm/man/man7/developers.7 @@ -1,4 +1,4 @@ -.TH "DEVELOPERS" "7" "January 2025" "NPM@11.1.0" "" +.TH "DEVELOPERS" "7" "March 2025" "NPM@11.2.0" "" .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 48f6ac36d7eb72..8ad6304184e751 100644 --- a/deps/npm/man/man7/logging.7 +++ b/deps/npm/man/man7/logging.7 @@ -1,4 +1,4 @@ -.TH "LOGGING" "7" "January 2025" "NPM@11.1.0" "" +.TH "LOGGING" "7" "March 2025" "NPM@11.2.0" "" .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 8d991eb9295ced..db9a3c699254ee 100644 --- a/deps/npm/man/man7/orgs.7 +++ b/deps/npm/man/man7/orgs.7 @@ -1,4 +1,4 @@ -.TH "ORGS" "7" "January 2025" "NPM@11.1.0" "" +.TH "ORGS" "7" "March 2025" "NPM@11.2.0" "" .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 506e49624c0b7d..3284e6df66c170 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 2025" "NPM@11.1.0" "" +.TH "PACKAGE-SPEC" "7" "March 2025" "NPM@11.2.0" "" .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 6d5752a2b1311a..67f059598d6d4d 100644 --- a/deps/npm/man/man7/registry.7 +++ b/deps/npm/man/man7/registry.7 @@ -1,4 +1,4 @@ -.TH "REGISTRY" "7" "January 2025" "NPM@11.1.0" "" +.TH "REGISTRY" "7" "March 2025" "NPM@11.2.0" "" .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 391fe1bad61a07..cd1c5de5a8b115 100644 --- a/deps/npm/man/man7/removal.7 +++ b/deps/npm/man/man7/removal.7 @@ -1,4 +1,4 @@ -.TH "REMOVAL" "7" "January 2025" "NPM@11.1.0" "" +.TH "REMOVAL" "7" "March 2025" "NPM@11.2.0" "" .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 6ae28c17caeb17..f523f38bf0d0c4 100644 --- a/deps/npm/man/man7/scope.7 +++ b/deps/npm/man/man7/scope.7 @@ -1,4 +1,4 @@ -.TH "SCOPE" "7" "January 2025" "NPM@11.1.0" "" +.TH "SCOPE" "7" "March 2025" "NPM@11.2.0" "" .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 3a1c600edf4c0d..d1872ed484a2c8 100644 --- a/deps/npm/man/man7/scripts.7 +++ b/deps/npm/man/man7/scripts.7 @@ -1,4 +1,4 @@ -.TH "SCRIPTS" "7" "January 2025" "NPM@11.1.0" "" +.TH "SCRIPTS" "7" "March 2025" "NPM@11.2.0" "" .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 942752445d1d4e..ef55e73bfee27f 100644 --- a/deps/npm/man/man7/workspaces.7 +++ b/deps/npm/man/man7/workspaces.7 @@ -1,4 +1,4 @@ -.TH "WORKSPACES" "7" "January 2025" "NPM@11.1.0" "" +.TH "WORKSPACES" "7" "March 2025" "NPM@11.2.0" "" .SH "NAME" \fBworkspaces\fR - Working with workspaces .SS "Description" diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js index 6bd4e9407e72d6..54f86dea0f65c0 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js @@ -447,7 +447,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { .catch(/* istanbul ignore next */ () => null) if (st && st.isSymbolicLink()) { const target = await readlink(dir) - const real = resolve(dirname(dir), target).replace(/#/g, '%23') + const real = resolve(dirname(dir), target) tree.package.dependencies[name] = `file:${real}` } else { tree.package.dependencies[name] = '*' @@ -522,12 +522,12 @@ module.exports = cls => class IdealTreeBuilder extends cls { const { name } = spec if (spec.type === 'file') { - spec = npa(`file:${relpath(path, spec.fetchSpec).replace(/#/g, '%23')}`, path) + spec = npa(`file:${relpath(path, spec.fetchSpec)}`, path) spec.name = name } else if (spec.type === 'directory') { try { const real = await realpath(spec.fetchSpec, this[_rpcache], this[_stcache]) - spec = npa(`file:${relpath(path, real).replace(/#/g, '%23')}`, path) + spec = npa(`file:${relpath(path, real)}`, path) spec.name = name } catch { // TODO: create synthetic test case to simulate realpath failure diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js index 22c1c2875f1b17..2add9553688a42 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js @@ -216,7 +216,7 @@ module.exports = cls => class ActualLoader extends cls { const actualRoot = tree.isLink ? tree.target : tree const { dependencies = {} } = actualRoot.package for (const [name, kid] of actualRoot.children.entries()) { - const def = kid.isLink ? `file:${kid.realpath.replace(/#/g, '%23')}` : '*' + const def = kid.isLink ? `file:${kid.realpath}` : '*' dependencies[name] = dependencies[name] || def } actualRoot.package = { ...actualRoot.package, dependencies } diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js index 7c51f8b9bef795..07c986853913ee 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js @@ -149,7 +149,7 @@ module.exports = cls => class VirtualLoader extends cls { }) for (const [name, path] of workspaces.entries()) { - lockWS[name] = `file:${path.replace(/#/g, '%23')}` + lockWS[name] = `file:${path}` } // Should rootNames exclude optional? 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 be920272d48f00..4083d79f4fa255 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js @@ -1364,7 +1364,7 @@ module.exports = cls => class Reifier extends cls { // path initially, in which case we can end up with the wrong // thing, so just get the ultimate fetchSpec and relativize it. const p = req.fetchSpec.replace(/^file:/, '') - const rel = relpath(addTree.realpath, p).replace(/#/g, '%23') + const rel = relpath(addTree.realpath, p) newSpec = `file:${rel}` } } else { diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/consistent-resolve.js b/deps/npm/node_modules/@npmcli/arborist/lib/consistent-resolve.js index 7c988048057c74..890caa32f10722 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/consistent-resolve.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/consistent-resolve.js @@ -20,11 +20,10 @@ const consistentResolve = (resolved, fromPath, toPath, relPaths = false) => { raw, } = npa(resolved, fromPath) if (type === 'file' || type === 'directory') { - const cleanFetchSpec = fetchSpec.replace(/#/g, '%23') if (relPaths && toPath) { - return `file:${relpath(toPath, cleanFetchSpec)}` + return `file:${relpath(toPath, fetchSpec)}` } - return `file:${cleanFetchSpec}` + return `file:${fetchSpec}` } if (hosted) { return `git+${hosted.auth ? hosted.https(hostedOpt) : hosted.sshurl(hostedOpt)}` diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js b/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js index e80310d9663a95..6571c0b5fae6c9 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js @@ -101,7 +101,7 @@ const depValid = (child, requested, requestor) => { }) } - default: // unpossible, just being cautious + default: // impossible, just being cautious break } diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/edge.js b/deps/npm/node_modules/@npmcli/arborist/lib/edge.js index 77ba196e68eeb5..5f21dc7e5d802a 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/edge.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/edge.js @@ -4,6 +4,7 @@ const util = require('node:util') const npa = require('npm-package-arg') const depValid = require('./dep-valid.js') +const OverrideSet = require('./override-set.js') class ArboristEdge { constructor (edge) { @@ -103,7 +104,7 @@ class Edge { } satisfiedBy (node) { - if (node.name !== this.#name) { + if (node.name !== this.#name || !this.#from) { return false } @@ -112,7 +113,31 @@ class Edge { if (node.hasShrinkwrap || node.inShrinkwrap || node.inBundle) { return depValid(node, this.rawSpec, this.#accept, this.#from) } - return depValid(node, this.spec, this.#accept, this.#from) + + // If there's no override we just use the spec. + if (!this.overrides?.keySpec) { + return depValid(node, this.spec, this.#accept, this.#from) + } + // There's some override. If the target node satisfies the overriding spec + // then it's okay. + if (depValid(node, this.spec, this.#accept, this.#from)) { + return true + } + // If it doesn't, then it should at least satisfy the original spec. + if (!depValid(node, this.rawSpec, this.#accept, this.#from)) { + return false + } + // It satisfies the original spec, not the overriding spec. We need to make + // sure it doesn't use the overridden spec. + // For example: + // we might have an ^8.0.0 rawSpec, and an override that makes + // keySpec=8.23.0 and the override value spec=9.0.0. + // If the node is 9.0.0, then it's okay because it's consistent with spec. + // If the node is 8.24.0, then it's okay because it's consistent with the rawSpec. + // If the node is 8.23.0, then it's not okay because even though it's consistent + // with the rawSpec, it's also consistent with the keySpec. + // So we're looking for ^8.0.0 or 9.0.0 and not 8.23.0. + return !depValid(node, this.overrides.keySpec, this.#accept, this.#from) } // return the edge data, and an explanation of how that edge came to be here @@ -181,11 +206,9 @@ class Edge { if (this.overrides?.value && this.overrides.value !== '*' && this.overrides.name === this.#name) { if (this.overrides.value.startsWith('$')) { const ref = this.overrides.value.slice(1) - // we may be a virtual root, if we are we want to resolve reference overrides - // from the real root, not the virtual one - const pkg = this.#from.sourceReference - ? this.#from.sourceReference.root.package - : this.#from.root.package + const pkg = this.#from?.sourceReference + ? this.#from?.sourceReference.root.package + : this.#from?.root?.package if (pkg.devDependencies?.[ref]) { return pkg.devDependencies[ref] } @@ -234,10 +257,15 @@ class Edge { } else { this.#error = 'MISSING' } - } else if (this.peer && this.#from === this.#to.parent && !this.#from.isTop) { + } else if (this.peer && this.#from === this.#to.parent && !this.#from?.isTop) { this.#error = 'PEER LOCAL' } else if (!this.satisfiedBy(this.#to)) { this.#error = 'INVALID' + } else if (this.overrides && this.#to.edgesOut.size && OverrideSet.doOverrideSetsConflict(this.overrides, this.#to.overrides)) { + // Any inconsistency between the edge's override set and the target's override set is potentially problematic. + // But we only say the edge is in error if the override sets are plainly conflicting. + // Note that if the target doesn't have any dependencies of their own, then this inconsistency is irrelevant. + this.#error = 'INVALID' } else { this.#error = 'OK' } @@ -250,15 +278,26 @@ class Edge { reload (hard = false) { this.#explanation = null - if (this.#from.overrides) { - this.overrides = this.#from.overrides.getEdgeRule(this) + + let needToUpdateOverrideSet = false + let newOverrideSet + let oldOverrideSet + if (this.#from?.overrides) { + newOverrideSet = this.#from.overrides.getEdgeRule(this) + if (newOverrideSet && !newOverrideSet.isEqual(this.overrides)) { + // If there's a new different override set we need to propagate it to the nodes. + // If we're deleting the override set then there's no point propagating it right now since it will be filled with another value later. + needToUpdateOverrideSet = true + oldOverrideSet = this.overrides + this.overrides = newOverrideSet + } } else { delete this.overrides } - const newTo = this.#from.resolve(this.#name) + const newTo = this.#from?.resolve(this.#name) if (newTo !== this.#to) { if (this.#to) { - this.#to.edgesIn.delete(this) + this.#to.deleteEdgeIn(this) } this.#to = newTo this.#error = null @@ -267,15 +306,19 @@ class Edge { } } else if (hard) { this.#error = null + } else if (needToUpdateOverrideSet && this.#to) { + // Propagate the new override set to the target node. + this.#to.updateOverridesEdgeInRemoved(oldOverrideSet) + this.#to.updateOverridesEdgeInAdded(newOverrideSet) } } detach () { this.#explanation = null if (this.#to) { - this.#to.edgesIn.delete(this) + this.#to.deleteEdgeIn(this) } - this.#from.edgesOut.delete(this.#name) + this.#from?.edgesOut.delete(this.#name) this.#to = null this.#error = 'DETACHED' this.#from = null diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/link.js b/deps/npm/node_modules/@npmcli/arborist/lib/link.js index 266ec45168839b..42bc1faf488609 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/link.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/link.js @@ -99,7 +99,7 @@ class Link extends Node { // the path/realpath guard is there for the benefit of setting // these things in the "wrong" order return this.path && this.realpath - ? `file:${relpath(dirname(this.path), this.realpath).replace(/#/g, '%23')}` + ? `file:${relpath(dirname(this.path), this.realpath)}` : null } diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/node.js b/deps/npm/node_modules/@npmcli/arborist/lib/node.js index c519a7b543d4db..96e19a025d41f7 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/node.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/node.js @@ -40,6 +40,7 @@ const debug = require('./debug.js') const gatherDepSet = require('./gather-dep-set.js') const treeCheck = require('./tree-check.js') const { walkUp } = require('walk-up-path') +const { log } = require('proc-log') const { resolve, relative, dirname, basename } = require('node:path') const util = require('node:util') @@ -344,7 +345,28 @@ class Node { } get overridden () { - return !!(this.overrides && this.overrides.value && this.overrides.name === this.name) + if (!this.overrides) { + return false + } + if (!this.overrides.value) { + return false + } + if (this.overrides.name !== this.name) { + return false + } + + // The overrides rule is for a package with this name, but some override rules only apply to specific + // versions. To make sure this package was actually overridden, we check whether any edge going in + // had the rule applied to it, in which case its overrides set is different than its source node. + for (const edge of this.edgesIn) { + if (edge.overrides && edge.overrides.name === this.name && edge.overrides.value === this.version) { + if (!edge.overrides.isEqual(edge.from.overrides)) { + return true + } + } + } + + return false } get package () { @@ -822,9 +844,6 @@ class Node { target.root = root } - if (!this.overrides && this.parent && this.parent.overrides) { - this.overrides = this.parent.overrides.getNodeRule(this) - } // tree should always be valid upon root setter completion. treeCheck(this) if (this !== root) { @@ -842,7 +861,7 @@ class Node { } for (const [name, path] of this.#workspaces.entries()) { - new Edge({ from: this, name, spec: `file:${path.replace(/#/g, '%23')}`, type: 'workspace' }) + new Edge({ from: this, name, spec: `file:${path}`, type: 'workspace' }) } } @@ -1006,10 +1025,21 @@ class Node { return false } - // XXX need to check for two root nodes? - if (node.overrides !== this.overrides) { - return false + // If this node has no dependencies, then it's irrelevant to check the override + // rules of the replacement node. + if (this.edgesOut.size) { + // XXX need to check for two root nodes? + if (node.overrides) { + if (!node.overrides.isEqual(this.overrides)) { + return false + } + } else { + if (this.overrides) { + return false + } + } } + ignorePeers = new Set(ignorePeers) // gather up all the deps of this node and that are only depended @@ -1077,8 +1107,13 @@ class Node { return false } - // if we prefer dedupe, or if the version is greater/equal, take the other - if (preferDedupe || semver.gte(other.version, this.version)) { + // if we prefer dedupe, or if the version is equal, take the other + if (preferDedupe || semver.eq(other.version, this.version)) { + return true + } + + // if our current version isn't the result of an override, then prefer to take the greater version + if (!this.overridden && semver.gt(other.version, this.version)) { return true } @@ -1249,10 +1284,6 @@ class Node { this[_changePath](newPath) } - if (parent.overrides) { - this.overrides = parent.overrides.getNodeRule(this) - } - // clobbers anything at that path, resets all appropriate references this.root = parent.root } @@ -1346,9 +1377,87 @@ class Node { this.edgesOut.set(edge.name, edge) } - addEdgeIn (edge) { + recalculateOutEdgesOverrides () { + // For each edge out propogate the new overrides through. + for (const edge of this.edgesOut.values()) { + edge.reload(true) + if (edge.to) { + edge.to.updateOverridesEdgeInAdded(edge.overrides) + } + } + } + + updateOverridesEdgeInRemoved (otherOverrideSet) { + // If this edge's overrides isn't equal to this node's overrides, then removing it won't change newOverrideSet later. + if (!this.overrides || !this.overrides.isEqual(otherOverrideSet)) { + return false + } + let newOverrideSet + for (const edge of this.edgesIn) { + if (newOverrideSet && edge.overrides) { + newOverrideSet = OverrideSet.findSpecificOverrideSet(edge.overrides, newOverrideSet) + } else { + newOverrideSet = edge.overrides + } + } + if (this.overrides.isEqual(newOverrideSet)) { + return false + } + this.overrides = newOverrideSet + if (this.overrides) { + // Optimization: if there's any override set at all, then no non-extraneous node has an empty override set. So if we temporarily have no + // override set (for example, we removed all the edges in), there's no use updating all the edges out right now. Let's just wait until + // we have an actual override set later. + this.recalculateOutEdgesOverrides() + } + return true + } + + // This logic isn't perfect either. When we have two edges in that have different override sets, then we have to decide which set is correct. + // This function assumes the more specific override set is applicable, so if we have dependencies A->B->C and A->C + // and an override set that specifies what happens for C under A->B, this will work even if the new A->C edge comes along and tries to change + // the override set. + // The strictly correct logic is not to allow two edges with different overrides to point to the same node, because even if this node can satisfy + // both, one of its dependencies might need to be different depending on the edge leading to it. + // However, this might cause a lot of duplication, because the conflict in the dependencies might never actually happen. + updateOverridesEdgeInAdded (otherOverrideSet) { + if (!otherOverrideSet) { + // Assuming there are any overrides at all, the overrides field is never undefined for any node at the end state of the tree. + // So if the new edge's overrides is undefined it will be updated later. So we can wait with updating the node's overrides field. + return false + } + if (!this.overrides) { + this.overrides = otherOverrideSet + this.recalculateOutEdgesOverrides() + return true + } + if (this.overrides.isEqual(otherOverrideSet)) { + return false + } + const newOverrideSet = OverrideSet.findSpecificOverrideSet(this.overrides, otherOverrideSet) + if (newOverrideSet) { + if (!this.overrides.isEqual(newOverrideSet)) { + this.overrides = newOverrideSet + this.recalculateOutEdgesOverrides() + return true + } + return false + } + // This is an error condition. We can only get here if the new override set is in conflict with the existing. + log.silly('Conflicting override sets', this.name) + } + + deleteEdgeIn (edge) { + this.edgesIn.delete(edge) if (edge.overrides) { - this.overrides = edge.overrides + this.updateOverridesEdgeInRemoved(edge.overrides) + } + } + + addEdgeIn (edge) { + // We need to handle the case where the new edge in has an overrides field which is different from the current value. + if (!this.overrides || !this.overrides.isEqual(edge.overrides)) { + this.updateOverridesEdgeInAdded(edge.overrides) } this.edgesIn.add(edge) diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/override-set.js b/deps/npm/node_modules/@npmcli/arborist/lib/override-set.js index bfc5a5d7906ee5..3f05609bfacc1f 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/override-set.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/override-set.js @@ -1,5 +1,6 @@ const npa = require('npm-package-arg') const semver = require('semver') +const { log } = require('proc-log') class OverrideSet { constructor ({ overrides, key, parent }) { @@ -44,6 +45,43 @@ class OverrideSet { } } + childrenAreEqual (other) { + if (this.children.size !== other.children.size) { + return false + } + for (const [key] of this.children) { + if (!other.children.has(key)) { + return false + } + if (this.children.get(key).value !== other.children.get(key).value) { + return false + } + if (!this.children.get(key).childrenAreEqual(other.children.get(key))) { + return false + } + } + return true + } + + isEqual (other) { + if (this === other) { + return true + } + if (!other) { + return false + } + if (this.key !== other.key || this.value !== other.value) { + return false + } + if (!this.childrenAreEqual(other)) { + return false + } + if (!this.parent) { + return !other.parent + } + return this.parent.isEqual(other.parent) + } + getEdgeRule (edge) { for (const rule of this.ruleset.values()) { if (rule.name !== edge.name) { @@ -55,7 +93,9 @@ class OverrideSet { return rule } - let spec = npa(`${edge.name}@${edge.spec}`) + // We need to use the rawSpec here, because the spec has the overrides applied to it already. + // rawSpec can be undefined, so we need to use the fallback value of spec if it is. + let spec = npa(`${edge.name}@${edge.rawSpec || edge.spec}`) if (spec.type === 'alias') { spec = spec.subSpec } @@ -142,6 +182,28 @@ class OverrideSet { return ruleset } + + static findSpecificOverrideSet (first, second) { + for (let overrideSet = second; overrideSet; overrideSet = overrideSet.parent) { + if (overrideSet.isEqual(first)) { + return second + } + } + for (let overrideSet = first; overrideSet; overrideSet = overrideSet.parent) { + if (overrideSet.isEqual(second)) { + return first + } + } + + // The override sets are incomparable. Neither one contains the other. + log.silly('Conflicting override sets', first, second) + } + + static doOverrideSetsConflict (first, second) { + // If override sets contain one another then we can try to use the more specific one. + // If neither one is more specific, then we consider them to be in conflict. + return (this.findSpecificOverrideSet(first, second) === undefined) + } } module.exports = OverrideSet diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js b/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js index 5f720ed9bd4404..11703fad4b9254 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js @@ -817,7 +817,7 @@ class Shrinkwrap { if (!/^file:/.test(resolved)) { pathFixed = resolved } else { - pathFixed = `file:${resolve(this.path, resolved.slice(5)).replace(/#/g, '%23')}` + pathFixed = `file:${resolve(this.path, resolved.slice(5))}` } } @@ -1011,7 +1011,7 @@ class Shrinkwrap { } if (node.isLink) { - lock.version = `file:${relpath(this.path, node.realpath).replace(/#/g, '%23')}` + lock.version = `file:${relpath(this.path, node.realpath)}` } else if (spec && (spec.type === 'file' || spec.type === 'remote')) { lock.version = spec.saveSpec } else if (spec && spec.type === 'git' || rSpec.type === 'git') { @@ -1089,7 +1089,7 @@ class Shrinkwrap { // this especially shows up with workspace edges when the root // node is also a workspace in the set. const p = resolve(node.realpath, spec.slice('file:'.length)) - set[k] = `file:${relpath(node.realpath, p).replace(/#/g, '%23')}` + set[k] = `file:${relpath(node.realpath, p)}` } else { set[k] = spec } diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json index a8c9ae04152440..039f577c591203 100644 --- a/deps/npm/node_modules/@npmcli/arborist/package.json +++ b/deps/npm/node_modules/@npmcli/arborist/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/arborist", - "version": "9.0.0", + "version": "9.0.1", "description": "Manage node_modules trees", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", diff --git a/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js b/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js index 00081ef98ddfbe..04a3e6a244399e 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js +++ b/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js @@ -954,6 +954,14 @@ const definitions = { more information, or [npm init](/commands/npm-init). `, }), + 'init-type': new Definition('init-type', { + default: 'commonjs', + type: String, + hint: '', + description: ` + The value that \`npm init\` should use by default for the package.json type field. + `, + }), 'init-version': new Definition('init-version', { default: '1.0.0', type: Semver, @@ -2231,7 +2239,6 @@ const definitions = { workspaces: new Definition('workspaces', { default: null, type: [null, Boolean], - short: 'ws', envExport: false, description: ` Set to true to run the command in the context of **all** configured diff --git a/deps/npm/node_modules/@npmcli/config/lib/definitions/index.js b/deps/npm/node_modules/@npmcli/config/lib/definitions/index.js index 8255a904423911..793b71ea40d6f7 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/definitions/index.js +++ b/deps/npm/node_modules/@npmcli/config/lib/definitions/index.js @@ -55,12 +55,26 @@ const shorthands = { readonly: ['--read-only'], reg: ['--registry'], iwr: ['--include-workspace-root'], + ws: ['--workspaces'], ...definitionProps.shorthands, } +// These are the configs that we can nerf-dart. Only _auth even has a config definition so we have to explicitly validate them here. +// This is used to validate during "npm config set" and to not warn on loading unknown configs when we see these. +const nerfDarts = [ + '_auth', // Has a config + '_authToken', // Does not have a config + '_password', // Does not have a config + 'certfile', // Does not have a config + 'email', // Does not have a config + 'keyfile', // Does not have a config + 'username', // Does not have a config +] + module.exports = { defaults: definitionProps.defaults, definitions, flatten, + nerfDarts, shorthands, } diff --git a/deps/npm/node_modules/@npmcli/config/lib/index.js b/deps/npm/node_modules/@npmcli/config/lib/index.js index 4aa76d8e2d9a29..cba2ebd3621c54 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/index.js +++ b/deps/npm/node_modules/@npmcli/config/lib/index.js @@ -15,6 +15,14 @@ const { mkdir, } = require('node:fs/promises') +// TODO these need to be either be ignored when parsing env, formalized as config, or not exported to the env in the first place. For now this list is just to suppress warnings till we can pay off this tech debt. +const internalEnv = [ + 'global-prefix', + 'local-prefix', + 'npm-version', + 'node-gyp', +] + const fileExists = (...p) => stat(resolve(...p)) .then((st) => st.isFile()) .catch(() => false) @@ -61,6 +69,7 @@ class Config { definitions, shorthands, flatten, + nerfDarts = [], npmPath, // options just to override in tests, mostly @@ -71,8 +80,9 @@ class Config { cwd = process.cwd(), excludeNpmCwd = false, }) { - // turn the definitions into nopt's weirdo syntax + this.nerfDarts = nerfDarts this.definitions = definitions + // turn the definitions into nopt's weirdo syntax const types = {} const defaults = {} this.deprecated = {} @@ -272,6 +282,7 @@ class Config { } try { + // This does not have an actual definition defaultsObject['npm-version'] = require(join(this.npmPath, 'package.json')).version } catch { // in some weird state where the passed in npmPath does not have a package.json @@ -346,6 +357,11 @@ class Config { } loadCLI () { + for (const s of Object.keys(this.shorthands)) { + if (s.length > 1 && this.argv.includes(`-${s}`)) { + log.warn(`-${s} is not a valid single-hyphen cli flag and will be removed in the future`) + } + } nopt.invalidHandler = (k, val, type) => this.invalidHandler(k, val, type, 'command line options', 'cli') const conf = nopt(this.types, this.shorthands, this.argv) @@ -566,13 +582,32 @@ class Config { } } } + // Some defaults like npm-version are not user-definable and thus don't have definitions + if (where !== 'default') { + this.checkUnknown(where, key) + } conf.data[k] = v } } } + checkUnknown (where, key) { + if (!this.definitions[key]) { + if (internalEnv.includes(key)) { + return + } + if (!key.includes(':')) { + log.warn(`Unknown ${where} config "${where === 'cli' ? '--' : ''}${key}". This will stop working in the next major version of npm.`) + return + } + const baseKey = key.split(':').pop() + if (!this.definitions[baseKey] && !this.nerfDarts.includes(baseKey)) { + log.warn(`Unknown ${where} config "${baseKey}" (${key}). This will stop working in the next major version of npm.`) + } + } + } + #checkDeprecated (key) { - // XXX(npm9+) make this throw an error if (this.deprecated[key]) { log.warn('config', key, this.deprecated[key]) } diff --git a/deps/npm/node_modules/@npmcli/config/package.json b/deps/npm/node_modules/@npmcli/config/package.json index e8c5dc135ecc65..5c0583ced42150 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": "10.0.1", + "version": "10.1.0", "files": [ "bin/", "lib/" @@ -41,7 +41,7 @@ "@npmcli/package-json": "^6.0.1", "ci-info": "^4.0.0", "ini": "^5.0.0", - "nopt": "^8.0.0", + "nopt": "^8.1.0", "proc-log": "^5.0.0", "semver": "^7.3.5", "walk-up-path": "^4.0.0" diff --git a/deps/npm/node_modules/@npmcli/git/lib/revs.js b/deps/npm/node_modules/@npmcli/git/lib/revs.js index ca14837de1b876..ebcc848fa34584 100644 --- a/deps/npm/node_modules/@npmcli/git/lib/revs.js +++ b/deps/npm/node_modules/@npmcli/git/lib/revs.js @@ -1,14 +1,12 @@ -const pinflight = require('promise-inflight') const spawn = require('./spawn.js') const { LRUCache } = require('lru-cache') +const linesToRevs = require('./lines-to-revs.js') const revsCache = new LRUCache({ max: 100, ttl: 5 * 60 * 1000, }) -const linesToRevs = require('./lines-to-revs.js') - module.exports = async (repo, opts = {}) => { if (!opts.noGitRevCache) { const cached = revsCache.get(repo) @@ -17,12 +15,8 @@ module.exports = async (repo, opts = {}) => { } } - return pinflight(`ls-remote:${repo}`, () => - spawn(['ls-remote', repo], opts) - .then(({ stdout }) => linesToRevs(stdout.trim().split('\n'))) - .then(revs => { - revsCache.set(repo, revs) - return revs - }) - ) + const { stdout } = await spawn(['ls-remote', repo], opts) + const revs = linesToRevs(stdout.trim().split('\n')) + revsCache.set(repo, revs) + return revs } diff --git a/deps/npm/node_modules/@npmcli/git/package.json b/deps/npm/node_modules/@npmcli/git/package.json index 2bc6730ba2151b..0880b2443d9fde 100644 --- a/deps/npm/node_modules/@npmcli/git/package.json +++ b/deps/npm/node_modules/@npmcli/git/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/git", - "version": "6.0.1", + "version": "6.0.3", "main": "lib/index.js", "files": [ "bin/", @@ -32,8 +32,8 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.3", - "npm-package-arg": "^11.0.0", + "@npmcli/template-oss": "4.24.1", + "npm-package-arg": "^12.0.1", "slash": "^3.0.0", "tap": "^16.0.1" }, @@ -43,7 +43,6 @@ "lru-cache": "^10.0.1", "npm-pick-manifest": "^10.0.0", "proc-log": "^5.0.0", - "promise-inflight": "^1.0.1", "promise-retry": "^2.0.1", "semver": "^7.3.5", "which": "^5.0.0" @@ -53,7 +52,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.3", + "version": "4.24.1", "publish": true } } diff --git a/deps/npm/node_modules/@npmcli/redact/lib/deep-map.js b/deps/npm/node_modules/@npmcli/redact/lib/deep-map.js index b555cf9fc4c8b8..6c61c0811be969 100644 --- a/deps/npm/node_modules/@npmcli/redact/lib/deep-map.js +++ b/deps/npm/node_modules/@npmcli/redact/lib/deep-map.js @@ -1,20 +1,12 @@ -function filterError (input) { - return { - errorType: input.name, - message: input.message, - stack: input.stack, - ...(input.code ? { code: input.code } : {}), - ...(input.statusCode ? { statusCode: input.statusCode } : {}), - } -} +const { serializeError } = require('./error') const deepMap = (input, handler = v => v, path = ['$'], seen = new Set([input])) => { // this is in an effort to maintain bole's error logging behavior if (path.join('.') === '$' && input instanceof Error) { - return deepMap({ err: filterError(input) }, handler, path, seen) + return deepMap({ err: serializeError(input) }, handler, path, seen) } if (input instanceof Error) { - return deepMap(filterError(input), handler, path, seen) + return deepMap(serializeError(input), handler, path, seen) } if (input instanceof Buffer) { return `[unable to log instanceof buffer]` diff --git a/deps/npm/node_modules/@npmcli/redact/lib/error.js b/deps/npm/node_modules/@npmcli/redact/lib/error.js new file mode 100644 index 00000000000000..e374b3902a2853 --- /dev/null +++ b/deps/npm/node_modules/@npmcli/redact/lib/error.js @@ -0,0 +1,28 @@ +/** takes an error object and serializes it to a plan object */ +function serializeError (input) { + if (!(input instanceof Error)) { + if (typeof input === 'string') { + const error = new Error(`attempted to serialize a non-error, string String, "${input}"`) + return serializeError(error) + } + const error = new Error(`attempted to serialize a non-error, ${typeof input} ${input?.constructor?.name}`) + return serializeError(error) + } + // different error objects store status code differently + // AxiosError uses `status`, other services use `statusCode` + const statusCode = input.statusCode ?? input.status + // CAUTION: what we serialize here gets add to the size of logs + return { + errorType: input.errorType ?? input.constructor.name, + ...(input.message ? { message: input.message } : {}), + ...(input.stack ? { stack: input.stack } : {}), + // think of this as error code + ...(input.code ? { code: input.code } : {}), + // think of this as http status code + ...(statusCode ? { statusCode } : {}), + } +} + +module.exports = { + serializeError, +} diff --git a/deps/npm/node_modules/@npmcli/redact/lib/server.js b/deps/npm/node_modules/@npmcli/redact/lib/server.js index 669e834da6131d..d8bf2629182330 100644 --- a/deps/npm/node_modules/@npmcli/redact/lib/server.js +++ b/deps/npm/node_modules/@npmcli/redact/lib/server.js @@ -14,6 +14,8 @@ const { redactMatchers, } = require('./utils') +const { serializeError } = require('./error') + const { deepMap } = require('./deep-map') const _redact = redactMatchers( @@ -31,4 +33,25 @@ const _redact = redactMatchers( const redact = (input) => deepMap(input, (value, path) => _redact(value, { path })) -module.exports = { redact } +/** takes an error returns new error keeping some custom properties */ +function redactError (input) { + const { message, ...data } = serializeError(input) + const output = new Error(redact(message)) + return Object.assign(output, redact(data)) +} + +/** runs a function within try / catch and throws error wrapped in redactError */ +function redactThrow (func) { + if (typeof func !== 'function') { + throw new Error('redactThrow expects a function') + } + return async (...args) => { + try { + return await func(...args) + } catch (error) { + throw redactError(error) + } + } +} + +module.exports = { redact, redactError, redactThrow } diff --git a/deps/npm/node_modules/@npmcli/redact/package.json b/deps/npm/node_modules/@npmcli/redact/package.json index 649f82ef5ca89b..9715bbbad839ff 100644 --- a/deps/npm/node_modules/@npmcli/redact/package.json +++ b/deps/npm/node_modules/@npmcli/redact/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/redact", - "version": "3.0.0", + "version": "3.1.1", "description": "Redact sensitive npm information from output", "main": "lib/index.js", "exports": { diff --git a/deps/npm/node_modules/@sigstore/bundle/package.json b/deps/npm/node_modules/@sigstore/bundle/package.json index ee5d2b92b801a5..61b062ae2b2128 100644 --- a/deps/npm/node_modules/@sigstore/bundle/package.json +++ b/deps/npm/node_modules/@sigstore/bundle/package.json @@ -1,6 +1,6 @@ { "name": "@sigstore/bundle", - "version": "3.0.0", + "version": "3.1.0", "description": "Sigstore bundle type", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -27,7 +27,7 @@ "provenance": true }, "dependencies": { - "@sigstore/protobuf-specs": "^0.3.2" + "@sigstore/protobuf-specs": "^0.4.0" }, "engines": { "node": "^18.17.0 || >=20.5.0" diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.js index 0c367a8384454c..0c8a0201a618f2 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.js @@ -1,88 +1,58 @@ "use strict"; -/* eslint-disable */ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.3 +// source: envelope.proto Object.defineProperty(exports, "__esModule", { value: true }); exports.Signature = exports.Envelope = void 0; -function createBaseEnvelope() { - return { payload: Buffer.alloc(0), payloadType: "", signatures: [] }; -} exports.Envelope = { fromJSON(object) { return { payload: isSet(object.payload) ? Buffer.from(bytesFromBase64(object.payload)) : Buffer.alloc(0), - payloadType: isSet(object.payloadType) ? String(object.payloadType) : "", - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e) => exports.Signature.fromJSON(e)) : [], + payloadType: isSet(object.payloadType) ? globalThis.String(object.payloadType) : "", + signatures: globalThis.Array.isArray(object?.signatures) + ? object.signatures.map((e) => exports.Signature.fromJSON(e)) + : [], }; }, toJSON(message) { const obj = {}; - message.payload !== undefined && - (obj.payload = base64FromBytes(message.payload !== undefined ? message.payload : Buffer.alloc(0))); - message.payloadType !== undefined && (obj.payloadType = message.payloadType); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => e ? exports.Signature.toJSON(e) : undefined); + if (message.payload.length !== 0) { + obj.payload = base64FromBytes(message.payload); + } + if (message.payloadType !== "") { + obj.payloadType = message.payloadType; } - else { - obj.signatures = []; + if (message.signatures?.length) { + obj.signatures = message.signatures.map((e) => exports.Signature.toJSON(e)); } return obj; }, }; -function createBaseSignature() { - return { sig: Buffer.alloc(0), keyid: "" }; -} exports.Signature = { fromJSON(object) { return { sig: isSet(object.sig) ? Buffer.from(bytesFromBase64(object.sig)) : Buffer.alloc(0), - keyid: isSet(object.keyid) ? String(object.keyid) : "", + keyid: isSet(object.keyid) ? globalThis.String(object.keyid) : "", }; }, toJSON(message) { const obj = {}; - message.sig !== undefined && (obj.sig = base64FromBytes(message.sig !== undefined ? message.sig : Buffer.alloc(0))); - message.keyid !== undefined && (obj.keyid = message.keyid); + if (message.sig.length !== 0) { + obj.sig = base64FromBytes(message.sig); + } + if (message.keyid !== "") { + obj.keyid = message.keyid; + } return obj; }, }; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } + return globalThis.Buffer.from(arr).toString("base64"); } function isSet(value) { return value !== null && value !== undefined; diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js index b93ff74471bd61..3b11bee7b22dc0 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js @@ -1,19 +1,21 @@ "use strict"; +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.3 +// source: events.proto Object.defineProperty(exports, "__esModule", { value: true }); exports.CloudEventBatch = exports.CloudEvent_CloudEventAttributeValue = exports.CloudEvent_AttributesEntry = exports.CloudEvent = void 0; /* eslint-disable */ const any_1 = require("./google/protobuf/any"); const timestamp_1 = require("./google/protobuf/timestamp"); -function createBaseCloudEvent() { - return { id: "", source: "", specVersion: "", type: "", attributes: {}, data: undefined }; -} exports.CloudEvent = { fromJSON(object) { return { - id: isSet(object.id) ? String(object.id) : "", - source: isSet(object.source) ? String(object.source) : "", - specVersion: isSet(object.specVersion) ? String(object.specVersion) : "", - type: isSet(object.type) ? String(object.type) : "", + id: isSet(object.id) ? globalThis.String(object.id) : "", + source: isSet(object.source) ? globalThis.String(object.source) : "", + specVersion: isSet(object.specVersion) ? globalThis.String(object.specVersion) : "", + type: isSet(object.type) ? globalThis.String(object.type) : "", attributes: isObject(object.attributes) ? Object.entries(object.attributes).reduce((acc, [key, value]) => { acc[key] = exports.CloudEvent_CloudEventAttributeValue.fromJSON(value); @@ -23,7 +25,7 @@ exports.CloudEvent = { data: isSet(object.binaryData) ? { $case: "binaryData", binaryData: Buffer.from(bytesFromBase64(object.binaryData)) } : isSet(object.textData) - ? { $case: "textData", textData: String(object.textData) } + ? { $case: "textData", textData: globalThis.String(object.textData) } : isSet(object.protoData) ? { $case: "protoData", protoData: any_1.Any.fromJSON(object.protoData) } : undefined, @@ -31,60 +33,72 @@ exports.CloudEvent = { }, toJSON(message) { const obj = {}; - message.id !== undefined && (obj.id = message.id); - message.source !== undefined && (obj.source = message.source); - message.specVersion !== undefined && (obj.specVersion = message.specVersion); - message.type !== undefined && (obj.type = message.type); - obj.attributes = {}; + if (message.id !== "") { + obj.id = message.id; + } + if (message.source !== "") { + obj.source = message.source; + } + if (message.specVersion !== "") { + obj.specVersion = message.specVersion; + } + if (message.type !== "") { + obj.type = message.type; + } if (message.attributes) { - Object.entries(message.attributes).forEach(([k, v]) => { - obj.attributes[k] = exports.CloudEvent_CloudEventAttributeValue.toJSON(v); - }); - } - message.data?.$case === "binaryData" && - (obj.binaryData = message.data?.binaryData !== undefined ? base64FromBytes(message.data?.binaryData) : undefined); - message.data?.$case === "textData" && (obj.textData = message.data?.textData); - message.data?.$case === "protoData" && - (obj.protoData = message.data?.protoData ? any_1.Any.toJSON(message.data?.protoData) : undefined); + const entries = Object.entries(message.attributes); + if (entries.length > 0) { + obj.attributes = {}; + entries.forEach(([k, v]) => { + obj.attributes[k] = exports.CloudEvent_CloudEventAttributeValue.toJSON(v); + }); + } + } + if (message.data?.$case === "binaryData") { + obj.binaryData = base64FromBytes(message.data.binaryData); + } + else if (message.data?.$case === "textData") { + obj.textData = message.data.textData; + } + else if (message.data?.$case === "protoData") { + obj.protoData = any_1.Any.toJSON(message.data.protoData); + } return obj; }, }; -function createBaseCloudEvent_AttributesEntry() { - return { key: "", value: undefined }; -} exports.CloudEvent_AttributesEntry = { fromJSON(object) { return { - key: isSet(object.key) ? String(object.key) : "", + key: isSet(object.key) ? globalThis.String(object.key) : "", value: isSet(object.value) ? exports.CloudEvent_CloudEventAttributeValue.fromJSON(object.value) : undefined, }; }, toJSON(message) { const obj = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && - (obj.value = message.value ? exports.CloudEvent_CloudEventAttributeValue.toJSON(message.value) : undefined); + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = exports.CloudEvent_CloudEventAttributeValue.toJSON(message.value); + } return obj; }, }; -function createBaseCloudEvent_CloudEventAttributeValue() { - return { attr: undefined }; -} exports.CloudEvent_CloudEventAttributeValue = { fromJSON(object) { return { attr: isSet(object.ceBoolean) - ? { $case: "ceBoolean", ceBoolean: Boolean(object.ceBoolean) } + ? { $case: "ceBoolean", ceBoolean: globalThis.Boolean(object.ceBoolean) } : isSet(object.ceInteger) - ? { $case: "ceInteger", ceInteger: Number(object.ceInteger) } + ? { $case: "ceInteger", ceInteger: globalThis.Number(object.ceInteger) } : isSet(object.ceString) - ? { $case: "ceString", ceString: String(object.ceString) } + ? { $case: "ceString", ceString: globalThis.String(object.ceString) } : isSet(object.ceBytes) ? { $case: "ceBytes", ceBytes: Buffer.from(bytesFromBase64(object.ceBytes)) } : isSet(object.ceUri) - ? { $case: "ceUri", ceUri: String(object.ceUri) } + ? { $case: "ceUri", ceUri: globalThis.String(object.ceUri) } : isSet(object.ceUriRef) - ? { $case: "ceUriRef", ceUriRef: String(object.ceUriRef) } + ? { $case: "ceUriRef", ceUriRef: globalThis.String(object.ceUriRef) } : isSet(object.ceTimestamp) ? { $case: "ceTimestamp", ceTimestamp: fromJsonTimestamp(object.ceTimestamp) } : undefined, @@ -92,86 +106,61 @@ exports.CloudEvent_CloudEventAttributeValue = { }, toJSON(message) { const obj = {}; - message.attr?.$case === "ceBoolean" && (obj.ceBoolean = message.attr?.ceBoolean); - message.attr?.$case === "ceInteger" && (obj.ceInteger = Math.round(message.attr?.ceInteger)); - message.attr?.$case === "ceString" && (obj.ceString = message.attr?.ceString); - message.attr?.$case === "ceBytes" && - (obj.ceBytes = message.attr?.ceBytes !== undefined ? base64FromBytes(message.attr?.ceBytes) : undefined); - message.attr?.$case === "ceUri" && (obj.ceUri = message.attr?.ceUri); - message.attr?.$case === "ceUriRef" && (obj.ceUriRef = message.attr?.ceUriRef); - message.attr?.$case === "ceTimestamp" && (obj.ceTimestamp = message.attr?.ceTimestamp.toISOString()); + if (message.attr?.$case === "ceBoolean") { + obj.ceBoolean = message.attr.ceBoolean; + } + else if (message.attr?.$case === "ceInteger") { + obj.ceInteger = Math.round(message.attr.ceInteger); + } + else if (message.attr?.$case === "ceString") { + obj.ceString = message.attr.ceString; + } + else if (message.attr?.$case === "ceBytes") { + obj.ceBytes = base64FromBytes(message.attr.ceBytes); + } + else if (message.attr?.$case === "ceUri") { + obj.ceUri = message.attr.ceUri; + } + else if (message.attr?.$case === "ceUriRef") { + obj.ceUriRef = message.attr.ceUriRef; + } + else if (message.attr?.$case === "ceTimestamp") { + obj.ceTimestamp = message.attr.ceTimestamp.toISOString(); + } return obj; }, }; -function createBaseCloudEventBatch() { - return { events: [] }; -} exports.CloudEventBatch = { fromJSON(object) { - return { events: Array.isArray(object?.events) ? object.events.map((e) => exports.CloudEvent.fromJSON(e)) : [] }; + return { + events: globalThis.Array.isArray(object?.events) ? object.events.map((e) => exports.CloudEvent.fromJSON(e)) : [], + }; }, toJSON(message) { const obj = {}; - if (message.events) { - obj.events = message.events.map((e) => e ? exports.CloudEvent.toJSON(e) : undefined); - } - else { - obj.events = []; + if (message.events?.length) { + obj.events = message.events.map((e) => exports.CloudEvent.toJSON(e)); } return obj; }, }; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } + return globalThis.Buffer.from(arr).toString("base64"); } function fromTimestamp(t) { - let millis = Number(t.seconds) * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); + let millis = (globalThis.Number(t.seconds) || 0) * 1_000; + millis += (t.nanos || 0) / 1_000_000; + return new globalThis.Date(millis); } function fromJsonTimestamp(o) { - if (o instanceof Date) { + if (o instanceof globalThis.Date) { return o; } else if (typeof o === "string") { - return new Date(o); + return new globalThis.Date(o); } else { return fromTimestamp(timestamp_1.Timestamp.fromJSON(o)); diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js index a7008ddb9da895..0335caccdf85ba 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js @@ -1,9 +1,14 @@ "use strict"; -/* eslint-disable */ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.3 +// source: google/api/field_behavior.proto Object.defineProperty(exports, "__esModule", { value: true }); exports.FieldBehavior = void 0; exports.fieldBehaviorFromJSON = fieldBehaviorFromJSON; exports.fieldBehaviorToJSON = fieldBehaviorToJSON; +/* eslint-disable */ /** * An indicator of the behavior of a given field (for example, that a field * is required in requests, or given as output but ignored as input). @@ -50,10 +55,32 @@ var FieldBehavior; /** * UNORDERED_LIST - Denotes that a (repeated) field is an unordered list. * This indicates that the service may provide the elements of the list - * in any arbitrary order, rather than the order the user originally + * in any arbitrary order, rather than the order the user originally * provided. Additionally, the list's order may or may not be stable. */ FieldBehavior[FieldBehavior["UNORDERED_LIST"] = 6] = "UNORDERED_LIST"; + /** + * NON_EMPTY_DEFAULT - Denotes that this field returns a non-empty default value if not set. + * This indicates that if the user provides the empty value in a request, + * a non-empty value will be returned. The user will not be aware of what + * non-empty value to expect. + */ + FieldBehavior[FieldBehavior["NON_EMPTY_DEFAULT"] = 7] = "NON_EMPTY_DEFAULT"; + /** + * IDENTIFIER - Denotes that the field in a resource (a message annotated with + * google.api.resource) is used in the resource name to uniquely identify the + * resource. For AIP-compliant APIs, this should only be applied to the + * `name` field on the resource. + * + * This behavior should not be applied to references to other resources within + * the message. + * + * The identifier field of resources often have different field behavior + * depending on the request it is embedded in (e.g. for Create methods name + * is optional and unused, while for Update methods it is required). Instead + * of method-specific annotations, only `IDENTIFIER` is required. + */ + FieldBehavior[FieldBehavior["IDENTIFIER"] = 8] = "IDENTIFIER"; })(FieldBehavior || (exports.FieldBehavior = FieldBehavior = {})); function fieldBehaviorFromJSON(object) { switch (object) { @@ -78,8 +105,14 @@ function fieldBehaviorFromJSON(object) { case 6: case "UNORDERED_LIST": return FieldBehavior.UNORDERED_LIST; + case 7: + case "NON_EMPTY_DEFAULT": + return FieldBehavior.NON_EMPTY_DEFAULT; + case 8: + case "IDENTIFIER": + return FieldBehavior.IDENTIFIER; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldBehavior"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldBehavior"); } } function fieldBehaviorToJSON(object) { @@ -98,22 +131,11 @@ function fieldBehaviorToJSON(object) { return "IMMUTABLE"; case FieldBehavior.UNORDERED_LIST: return "UNORDERED_LIST"; + case FieldBehavior.NON_EMPTY_DEFAULT: + return "NON_EMPTY_DEFAULT"; + case FieldBehavior.IDENTIFIER: + return "IDENTIFIER"; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldBehavior"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldBehavior"); } } -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.js index 6b3f3c97a66476..3a1b926e0ae3da 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.js @@ -1,64 +1,34 @@ "use strict"; -/* eslint-disable */ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.3 +// source: google/protobuf/any.proto Object.defineProperty(exports, "__esModule", { value: true }); exports.Any = void 0; -function createBaseAny() { - return { typeUrl: "", value: Buffer.alloc(0) }; -} exports.Any = { fromJSON(object) { return { - typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "", + typeUrl: isSet(object.typeUrl) ? globalThis.String(object.typeUrl) : "", value: isSet(object.value) ? Buffer.from(bytesFromBase64(object.value)) : Buffer.alloc(0), }; }, toJSON(message) { const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : Buffer.alloc(0))); + if (message.typeUrl !== "") { + obj.typeUrl = message.typeUrl; + } + if (message.value.length !== 0) { + obj.value = base64FromBytes(message.value); + } return obj; }, }; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } + return globalThis.Buffer.from(arr).toString("base64"); } function isSet(value) { return value !== null && value !== undefined; diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js index 24074b87d5d992..11abdd0f033a61 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js @@ -1,7 +1,15 @@ "use strict"; -/* eslint-disable */ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.3 +// source: google/protobuf/descriptor.proto Object.defineProperty(exports, "__esModule", { value: true }); -exports.GeneratedCodeInfo_Annotation = exports.GeneratedCodeInfo = exports.SourceCodeInfo_Location = exports.SourceCodeInfo = exports.UninterpretedOption_NamePart = exports.UninterpretedOption = exports.MethodOptions = exports.ServiceOptions = exports.EnumValueOptions = exports.EnumOptions = exports.OneofOptions = exports.FieldOptions = exports.MessageOptions = exports.FileOptions = exports.MethodDescriptorProto = exports.ServiceDescriptorProto = exports.EnumValueDescriptorProto = exports.EnumDescriptorProto_EnumReservedRange = exports.EnumDescriptorProto = exports.OneofDescriptorProto = exports.FieldDescriptorProto = exports.ExtensionRangeOptions = exports.DescriptorProto_ReservedRange = exports.DescriptorProto_ExtensionRange = exports.DescriptorProto = exports.FileDescriptorProto = exports.FileDescriptorSet = exports.MethodOptions_IdempotencyLevel = exports.FieldOptions_JSType = exports.FieldOptions_CType = exports.FileOptions_OptimizeMode = exports.FieldDescriptorProto_Label = exports.FieldDescriptorProto_Type = void 0; +exports.GeneratedCodeInfo_Annotation = exports.GeneratedCodeInfo = exports.SourceCodeInfo_Location = exports.SourceCodeInfo = exports.FeatureSetDefaults_FeatureSetEditionDefault = exports.FeatureSetDefaults = exports.FeatureSet = exports.UninterpretedOption_NamePart = exports.UninterpretedOption = exports.MethodOptions = exports.ServiceOptions = exports.EnumValueOptions = exports.EnumOptions = exports.OneofOptions = exports.FieldOptions_FeatureSupport = exports.FieldOptions_EditionDefault = exports.FieldOptions = exports.MessageOptions = exports.FileOptions = exports.MethodDescriptorProto = exports.ServiceDescriptorProto = exports.EnumValueDescriptorProto = exports.EnumDescriptorProto_EnumReservedRange = exports.EnumDescriptorProto = exports.OneofDescriptorProto = exports.FieldDescriptorProto = exports.ExtensionRangeOptions_Declaration = exports.ExtensionRangeOptions = exports.DescriptorProto_ReservedRange = exports.DescriptorProto_ExtensionRange = exports.DescriptorProto = exports.FileDescriptorProto = exports.FileDescriptorSet = exports.GeneratedCodeInfo_Annotation_Semantic = exports.FeatureSet_JsonFormat = exports.FeatureSet_MessageEncoding = exports.FeatureSet_Utf8Validation = exports.FeatureSet_RepeatedFieldEncoding = exports.FeatureSet_EnumType = exports.FeatureSet_FieldPresence = exports.MethodOptions_IdempotencyLevel = exports.FieldOptions_OptionTargetType = exports.FieldOptions_OptionRetention = exports.FieldOptions_JSType = exports.FieldOptions_CType = exports.FileOptions_OptimizeMode = exports.FieldDescriptorProto_Label = exports.FieldDescriptorProto_Type = exports.ExtensionRangeOptions_VerificationState = exports.Edition = void 0; +exports.editionFromJSON = editionFromJSON; +exports.editionToJSON = editionToJSON; +exports.extensionRangeOptions_VerificationStateFromJSON = extensionRangeOptions_VerificationStateFromJSON; +exports.extensionRangeOptions_VerificationStateToJSON = extensionRangeOptions_VerificationStateToJSON; exports.fieldDescriptorProto_TypeFromJSON = fieldDescriptorProto_TypeFromJSON; exports.fieldDescriptorProto_TypeToJSON = fieldDescriptorProto_TypeToJSON; exports.fieldDescriptorProto_LabelFromJSON = fieldDescriptorProto_LabelFromJSON; @@ -12,8 +20,169 @@ exports.fieldOptions_CTypeFromJSON = fieldOptions_CTypeFromJSON; exports.fieldOptions_CTypeToJSON = fieldOptions_CTypeToJSON; exports.fieldOptions_JSTypeFromJSON = fieldOptions_JSTypeFromJSON; exports.fieldOptions_JSTypeToJSON = fieldOptions_JSTypeToJSON; +exports.fieldOptions_OptionRetentionFromJSON = fieldOptions_OptionRetentionFromJSON; +exports.fieldOptions_OptionRetentionToJSON = fieldOptions_OptionRetentionToJSON; +exports.fieldOptions_OptionTargetTypeFromJSON = fieldOptions_OptionTargetTypeFromJSON; +exports.fieldOptions_OptionTargetTypeToJSON = fieldOptions_OptionTargetTypeToJSON; exports.methodOptions_IdempotencyLevelFromJSON = methodOptions_IdempotencyLevelFromJSON; exports.methodOptions_IdempotencyLevelToJSON = methodOptions_IdempotencyLevelToJSON; +exports.featureSet_FieldPresenceFromJSON = featureSet_FieldPresenceFromJSON; +exports.featureSet_FieldPresenceToJSON = featureSet_FieldPresenceToJSON; +exports.featureSet_EnumTypeFromJSON = featureSet_EnumTypeFromJSON; +exports.featureSet_EnumTypeToJSON = featureSet_EnumTypeToJSON; +exports.featureSet_RepeatedFieldEncodingFromJSON = featureSet_RepeatedFieldEncodingFromJSON; +exports.featureSet_RepeatedFieldEncodingToJSON = featureSet_RepeatedFieldEncodingToJSON; +exports.featureSet_Utf8ValidationFromJSON = featureSet_Utf8ValidationFromJSON; +exports.featureSet_Utf8ValidationToJSON = featureSet_Utf8ValidationToJSON; +exports.featureSet_MessageEncodingFromJSON = featureSet_MessageEncodingFromJSON; +exports.featureSet_MessageEncodingToJSON = featureSet_MessageEncodingToJSON; +exports.featureSet_JsonFormatFromJSON = featureSet_JsonFormatFromJSON; +exports.featureSet_JsonFormatToJSON = featureSet_JsonFormatToJSON; +exports.generatedCodeInfo_Annotation_SemanticFromJSON = generatedCodeInfo_Annotation_SemanticFromJSON; +exports.generatedCodeInfo_Annotation_SemanticToJSON = generatedCodeInfo_Annotation_SemanticToJSON; +/* eslint-disable */ +/** The full set of known editions. */ +var Edition; +(function (Edition) { + /** EDITION_UNKNOWN - A placeholder for an unknown edition value. */ + Edition[Edition["EDITION_UNKNOWN"] = 0] = "EDITION_UNKNOWN"; + /** + * EDITION_LEGACY - A placeholder edition for specifying default behaviors *before* a feature + * was first introduced. This is effectively an "infinite past". + */ + Edition[Edition["EDITION_LEGACY"] = 900] = "EDITION_LEGACY"; + /** + * EDITION_PROTO2 - Legacy syntax "editions". These pre-date editions, but behave much like + * distinct editions. These can't be used to specify the edition of proto + * files, but feature definitions must supply proto2/proto3 defaults for + * backwards compatibility. + */ + Edition[Edition["EDITION_PROTO2"] = 998] = "EDITION_PROTO2"; + Edition[Edition["EDITION_PROTO3"] = 999] = "EDITION_PROTO3"; + /** + * EDITION_2023 - Editions that have been released. The specific values are arbitrary and + * should not be depended on, but they will always be time-ordered for easy + * comparison. + */ + Edition[Edition["EDITION_2023"] = 1000] = "EDITION_2023"; + Edition[Edition["EDITION_2024"] = 1001] = "EDITION_2024"; + /** + * EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be + * used or relied on outside of tests. + */ + Edition[Edition["EDITION_1_TEST_ONLY"] = 1] = "EDITION_1_TEST_ONLY"; + Edition[Edition["EDITION_2_TEST_ONLY"] = 2] = "EDITION_2_TEST_ONLY"; + Edition[Edition["EDITION_99997_TEST_ONLY"] = 99997] = "EDITION_99997_TEST_ONLY"; + Edition[Edition["EDITION_99998_TEST_ONLY"] = 99998] = "EDITION_99998_TEST_ONLY"; + Edition[Edition["EDITION_99999_TEST_ONLY"] = 99999] = "EDITION_99999_TEST_ONLY"; + /** + * EDITION_MAX - Placeholder for specifying unbounded edition support. This should only + * ever be used by plugins that can expect to never require any changes to + * support a new edition. + */ + Edition[Edition["EDITION_MAX"] = 2147483647] = "EDITION_MAX"; +})(Edition || (exports.Edition = Edition = {})); +function editionFromJSON(object) { + switch (object) { + case 0: + case "EDITION_UNKNOWN": + return Edition.EDITION_UNKNOWN; + case 900: + case "EDITION_LEGACY": + return Edition.EDITION_LEGACY; + case 998: + case "EDITION_PROTO2": + return Edition.EDITION_PROTO2; + case 999: + case "EDITION_PROTO3": + return Edition.EDITION_PROTO3; + case 1000: + case "EDITION_2023": + return Edition.EDITION_2023; + case 1001: + case "EDITION_2024": + return Edition.EDITION_2024; + case 1: + case "EDITION_1_TEST_ONLY": + return Edition.EDITION_1_TEST_ONLY; + case 2: + case "EDITION_2_TEST_ONLY": + return Edition.EDITION_2_TEST_ONLY; + case 99997: + case "EDITION_99997_TEST_ONLY": + return Edition.EDITION_99997_TEST_ONLY; + case 99998: + case "EDITION_99998_TEST_ONLY": + return Edition.EDITION_99998_TEST_ONLY; + case 99999: + case "EDITION_99999_TEST_ONLY": + return Edition.EDITION_99999_TEST_ONLY; + case 2147483647: + case "EDITION_MAX": + return Edition.EDITION_MAX; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum Edition"); + } +} +function editionToJSON(object) { + switch (object) { + case Edition.EDITION_UNKNOWN: + return "EDITION_UNKNOWN"; + case Edition.EDITION_LEGACY: + return "EDITION_LEGACY"; + case Edition.EDITION_PROTO2: + return "EDITION_PROTO2"; + case Edition.EDITION_PROTO3: + return "EDITION_PROTO3"; + case Edition.EDITION_2023: + return "EDITION_2023"; + case Edition.EDITION_2024: + return "EDITION_2024"; + case Edition.EDITION_1_TEST_ONLY: + return "EDITION_1_TEST_ONLY"; + case Edition.EDITION_2_TEST_ONLY: + return "EDITION_2_TEST_ONLY"; + case Edition.EDITION_99997_TEST_ONLY: + return "EDITION_99997_TEST_ONLY"; + case Edition.EDITION_99998_TEST_ONLY: + return "EDITION_99998_TEST_ONLY"; + case Edition.EDITION_99999_TEST_ONLY: + return "EDITION_99999_TEST_ONLY"; + case Edition.EDITION_MAX: + return "EDITION_MAX"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum Edition"); + } +} +/** The verification state of the extension range. */ +var ExtensionRangeOptions_VerificationState; +(function (ExtensionRangeOptions_VerificationState) { + /** DECLARATION - All the extensions of the range must be declared. */ + ExtensionRangeOptions_VerificationState[ExtensionRangeOptions_VerificationState["DECLARATION"] = 0] = "DECLARATION"; + ExtensionRangeOptions_VerificationState[ExtensionRangeOptions_VerificationState["UNVERIFIED"] = 1] = "UNVERIFIED"; +})(ExtensionRangeOptions_VerificationState || (exports.ExtensionRangeOptions_VerificationState = ExtensionRangeOptions_VerificationState = {})); +function extensionRangeOptions_VerificationStateFromJSON(object) { + switch (object) { + case 0: + case "DECLARATION": + return ExtensionRangeOptions_VerificationState.DECLARATION; + case 1: + case "UNVERIFIED": + return ExtensionRangeOptions_VerificationState.UNVERIFIED; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum ExtensionRangeOptions_VerificationState"); + } +} +function extensionRangeOptions_VerificationStateToJSON(object) { + switch (object) { + case ExtensionRangeOptions_VerificationState.DECLARATION: + return "DECLARATION"; + case ExtensionRangeOptions_VerificationState.UNVERIFIED: + return "UNVERIFIED"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum ExtensionRangeOptions_VerificationState"); + } +} var FieldDescriptorProto_Type; (function (FieldDescriptorProto_Type) { /** @@ -39,9 +208,10 @@ var FieldDescriptorProto_Type; FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; /** * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 + * Group type is deprecated and not supported after google.protobuf. However, Proto3 * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. + * treat group fields as unknown fields. In Editions, the group wire format + * can be enabled via the `message_encoding` feature. */ FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; /** TYPE_MESSAGE - Length-delimited aggregate. */ @@ -114,7 +284,7 @@ function fieldDescriptorProto_TypeFromJSON(object) { case "TYPE_SINT64": return FieldDescriptorProto_Type.TYPE_SINT64; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Type"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Type"); } } function fieldDescriptorProto_TypeToJSON(object) { @@ -156,41 +326,46 @@ function fieldDescriptorProto_TypeToJSON(object) { case FieldDescriptorProto_Type.TYPE_SINT64: return "TYPE_SINT64"; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Type"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Type"); } } var FieldDescriptorProto_Label; (function (FieldDescriptorProto_Label) { /** LABEL_OPTIONAL - 0 is reserved for errors */ FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; + /** + * LABEL_REQUIRED - The required label is only allowed in google.protobuf. In proto3 and Editions + * it's explicitly prohibited. In Editions, the `field_presence` feature + * can be used to get this behavior. + */ + FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; })(FieldDescriptorProto_Label || (exports.FieldDescriptorProto_Label = FieldDescriptorProto_Label = {})); function fieldDescriptorProto_LabelFromJSON(object) { switch (object) { case 1: case "LABEL_OPTIONAL": return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; case 3: case "LABEL_REPEATED": return FieldDescriptorProto_Label.LABEL_REPEATED; + case 2: + case "LABEL_REQUIRED": + return FieldDescriptorProto_Label.LABEL_REQUIRED; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Label"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Label"); } } function fieldDescriptorProto_LabelToJSON(object) { switch (object) { case FieldDescriptorProto_Label.LABEL_OPTIONAL: return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; case FieldDescriptorProto_Label.LABEL_REPEATED: return "LABEL_REPEATED"; + case FieldDescriptorProto_Label.LABEL_REQUIRED: + return "LABEL_REQUIRED"; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Label"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Label"); } } /** Generated classes can be optimized for speed or code size. */ @@ -215,7 +390,7 @@ function fileOptions_OptimizeModeFromJSON(object) { case "LITE_RUNTIME": return FileOptions_OptimizeMode.LITE_RUNTIME; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FileOptions_OptimizeMode"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FileOptions_OptimizeMode"); } } function fileOptions_OptimizeModeToJSON(object) { @@ -227,13 +402,21 @@ function fileOptions_OptimizeModeToJSON(object) { case FileOptions_OptimizeMode.LITE_RUNTIME: return "LITE_RUNTIME"; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FileOptions_OptimizeMode"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FileOptions_OptimizeMode"); } } var FieldOptions_CType; (function (FieldOptions_CType) { /** STRING - Default mode. */ FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; + /** + * CORD - The option [ctype=CORD] may be applied to a non-repeated field of type + * "bytes". It indicates that in C++, the data should be stored in a Cord + * instead of a string. For very large strings, this may reduce memory + * fragmentation. It may also allow better performance when parsing from a + * Cord, or when parsing with aliasing enabled, as the parsed Cord may then + * alias the original buffer. + */ FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; })(FieldOptions_CType || (exports.FieldOptions_CType = FieldOptions_CType = {})); @@ -249,7 +432,7 @@ function fieldOptions_CTypeFromJSON(object) { case "STRING_PIECE": return FieldOptions_CType.STRING_PIECE; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_CType"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_CType"); } } function fieldOptions_CTypeToJSON(object) { @@ -261,7 +444,7 @@ function fieldOptions_CTypeToJSON(object) { case FieldOptions_CType.STRING_PIECE: return "STRING_PIECE"; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_CType"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_CType"); } } var FieldOptions_JSType; @@ -285,7 +468,7 @@ function fieldOptions_JSTypeFromJSON(object) { case "JS_NUMBER": return FieldOptions_JSType.JS_NUMBER; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_JSType"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_JSType"); } } function fieldOptions_JSTypeToJSON(object) { @@ -297,7 +480,121 @@ function fieldOptions_JSTypeToJSON(object) { case FieldOptions_JSType.JS_NUMBER: return "JS_NUMBER"; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_JSType"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_JSType"); + } +} +/** If set to RETENTION_SOURCE, the option will be omitted from the binary. */ +var FieldOptions_OptionRetention; +(function (FieldOptions_OptionRetention) { + FieldOptions_OptionRetention[FieldOptions_OptionRetention["RETENTION_UNKNOWN"] = 0] = "RETENTION_UNKNOWN"; + FieldOptions_OptionRetention[FieldOptions_OptionRetention["RETENTION_RUNTIME"] = 1] = "RETENTION_RUNTIME"; + FieldOptions_OptionRetention[FieldOptions_OptionRetention["RETENTION_SOURCE"] = 2] = "RETENTION_SOURCE"; +})(FieldOptions_OptionRetention || (exports.FieldOptions_OptionRetention = FieldOptions_OptionRetention = {})); +function fieldOptions_OptionRetentionFromJSON(object) { + switch (object) { + case 0: + case "RETENTION_UNKNOWN": + return FieldOptions_OptionRetention.RETENTION_UNKNOWN; + case 1: + case "RETENTION_RUNTIME": + return FieldOptions_OptionRetention.RETENTION_RUNTIME; + case 2: + case "RETENTION_SOURCE": + return FieldOptions_OptionRetention.RETENTION_SOURCE; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_OptionRetention"); + } +} +function fieldOptions_OptionRetentionToJSON(object) { + switch (object) { + case FieldOptions_OptionRetention.RETENTION_UNKNOWN: + return "RETENTION_UNKNOWN"; + case FieldOptions_OptionRetention.RETENTION_RUNTIME: + return "RETENTION_RUNTIME"; + case FieldOptions_OptionRetention.RETENTION_SOURCE: + return "RETENTION_SOURCE"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_OptionRetention"); + } +} +/** + * This indicates the types of entities that the field may apply to when used + * as an option. If it is unset, then the field may be freely used as an + * option on any kind of entity. + */ +var FieldOptions_OptionTargetType; +(function (FieldOptions_OptionTargetType) { + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_UNKNOWN"] = 0] = "TARGET_TYPE_UNKNOWN"; + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_FILE"] = 1] = "TARGET_TYPE_FILE"; + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_EXTENSION_RANGE"] = 2] = "TARGET_TYPE_EXTENSION_RANGE"; + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_MESSAGE"] = 3] = "TARGET_TYPE_MESSAGE"; + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_FIELD"] = 4] = "TARGET_TYPE_FIELD"; + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_ONEOF"] = 5] = "TARGET_TYPE_ONEOF"; + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_ENUM"] = 6] = "TARGET_TYPE_ENUM"; + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_ENUM_ENTRY"] = 7] = "TARGET_TYPE_ENUM_ENTRY"; + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_SERVICE"] = 8] = "TARGET_TYPE_SERVICE"; + FieldOptions_OptionTargetType[FieldOptions_OptionTargetType["TARGET_TYPE_METHOD"] = 9] = "TARGET_TYPE_METHOD"; +})(FieldOptions_OptionTargetType || (exports.FieldOptions_OptionTargetType = FieldOptions_OptionTargetType = {})); +function fieldOptions_OptionTargetTypeFromJSON(object) { + switch (object) { + case 0: + case "TARGET_TYPE_UNKNOWN": + return FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN; + case 1: + case "TARGET_TYPE_FILE": + return FieldOptions_OptionTargetType.TARGET_TYPE_FILE; + case 2: + case "TARGET_TYPE_EXTENSION_RANGE": + return FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE; + case 3: + case "TARGET_TYPE_MESSAGE": + return FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE; + case 4: + case "TARGET_TYPE_FIELD": + return FieldOptions_OptionTargetType.TARGET_TYPE_FIELD; + case 5: + case "TARGET_TYPE_ONEOF": + return FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF; + case 6: + case "TARGET_TYPE_ENUM": + return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM; + case 7: + case "TARGET_TYPE_ENUM_ENTRY": + return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY; + case 8: + case "TARGET_TYPE_SERVICE": + return FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE; + case 9: + case "TARGET_TYPE_METHOD": + return FieldOptions_OptionTargetType.TARGET_TYPE_METHOD; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_OptionTargetType"); + } +} +function fieldOptions_OptionTargetTypeToJSON(object) { + switch (object) { + case FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN: + return "TARGET_TYPE_UNKNOWN"; + case FieldOptions_OptionTargetType.TARGET_TYPE_FILE: + return "TARGET_TYPE_FILE"; + case FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE: + return "TARGET_TYPE_EXTENSION_RANGE"; + case FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE: + return "TARGET_TYPE_MESSAGE"; + case FieldOptions_OptionTargetType.TARGET_TYPE_FIELD: + return "TARGET_TYPE_FIELD"; + case FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF: + return "TARGET_TYPE_ONEOF"; + case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM: + return "TARGET_TYPE_ENUM"; + case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY: + return "TARGET_TYPE_ENUM_ENTRY"; + case FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE: + return "TARGET_TYPE_SERVICE"; + case FieldOptions_OptionTargetType.TARGET_TYPE_METHOD: + return "TARGET_TYPE_METHOD"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_OptionTargetType"); } } /** @@ -325,7 +622,7 @@ function methodOptions_IdempotencyLevelFromJSON(object) { case "IDEMPOTENT": return MethodOptions_IdempotencyLevel.IDEMPOTENT; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum MethodOptions_IdempotencyLevel"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum MethodOptions_IdempotencyLevel"); } } function methodOptions_IdempotencyLevelToJSON(object) { @@ -337,971 +634,1366 @@ function methodOptions_IdempotencyLevelToJSON(object) { case MethodOptions_IdempotencyLevel.IDEMPOTENT: return "IDEMPOTENT"; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum MethodOptions_IdempotencyLevel"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum MethodOptions_IdempotencyLevel"); } } -function createBaseFileDescriptorSet() { - return { file: [] }; +var FeatureSet_FieldPresence; +(function (FeatureSet_FieldPresence) { + FeatureSet_FieldPresence[FeatureSet_FieldPresence["FIELD_PRESENCE_UNKNOWN"] = 0] = "FIELD_PRESENCE_UNKNOWN"; + FeatureSet_FieldPresence[FeatureSet_FieldPresence["EXPLICIT"] = 1] = "EXPLICIT"; + FeatureSet_FieldPresence[FeatureSet_FieldPresence["IMPLICIT"] = 2] = "IMPLICIT"; + FeatureSet_FieldPresence[FeatureSet_FieldPresence["LEGACY_REQUIRED"] = 3] = "LEGACY_REQUIRED"; +})(FeatureSet_FieldPresence || (exports.FeatureSet_FieldPresence = FeatureSet_FieldPresence = {})); +function featureSet_FieldPresenceFromJSON(object) { + switch (object) { + case 0: + case "FIELD_PRESENCE_UNKNOWN": + return FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN; + case 1: + case "EXPLICIT": + return FeatureSet_FieldPresence.EXPLICIT; + case 2: + case "IMPLICIT": + return FeatureSet_FieldPresence.IMPLICIT; + case 3: + case "LEGACY_REQUIRED": + return FeatureSet_FieldPresence.LEGACY_REQUIRED; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FeatureSet_FieldPresence"); + } +} +function featureSet_FieldPresenceToJSON(object) { + switch (object) { + case FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN: + return "FIELD_PRESENCE_UNKNOWN"; + case FeatureSet_FieldPresence.EXPLICIT: + return "EXPLICIT"; + case FeatureSet_FieldPresence.IMPLICIT: + return "IMPLICIT"; + case FeatureSet_FieldPresence.LEGACY_REQUIRED: + return "LEGACY_REQUIRED"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FeatureSet_FieldPresence"); + } +} +var FeatureSet_EnumType; +(function (FeatureSet_EnumType) { + FeatureSet_EnumType[FeatureSet_EnumType["ENUM_TYPE_UNKNOWN"] = 0] = "ENUM_TYPE_UNKNOWN"; + FeatureSet_EnumType[FeatureSet_EnumType["OPEN"] = 1] = "OPEN"; + FeatureSet_EnumType[FeatureSet_EnumType["CLOSED"] = 2] = "CLOSED"; +})(FeatureSet_EnumType || (exports.FeatureSet_EnumType = FeatureSet_EnumType = {})); +function featureSet_EnumTypeFromJSON(object) { + switch (object) { + case 0: + case "ENUM_TYPE_UNKNOWN": + return FeatureSet_EnumType.ENUM_TYPE_UNKNOWN; + case 1: + case "OPEN": + return FeatureSet_EnumType.OPEN; + case 2: + case "CLOSED": + return FeatureSet_EnumType.CLOSED; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FeatureSet_EnumType"); + } +} +function featureSet_EnumTypeToJSON(object) { + switch (object) { + case FeatureSet_EnumType.ENUM_TYPE_UNKNOWN: + return "ENUM_TYPE_UNKNOWN"; + case FeatureSet_EnumType.OPEN: + return "OPEN"; + case FeatureSet_EnumType.CLOSED: + return "CLOSED"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FeatureSet_EnumType"); + } +} +var FeatureSet_RepeatedFieldEncoding; +(function (FeatureSet_RepeatedFieldEncoding) { + FeatureSet_RepeatedFieldEncoding[FeatureSet_RepeatedFieldEncoding["REPEATED_FIELD_ENCODING_UNKNOWN"] = 0] = "REPEATED_FIELD_ENCODING_UNKNOWN"; + FeatureSet_RepeatedFieldEncoding[FeatureSet_RepeatedFieldEncoding["PACKED"] = 1] = "PACKED"; + FeatureSet_RepeatedFieldEncoding[FeatureSet_RepeatedFieldEncoding["EXPANDED"] = 2] = "EXPANDED"; +})(FeatureSet_RepeatedFieldEncoding || (exports.FeatureSet_RepeatedFieldEncoding = FeatureSet_RepeatedFieldEncoding = {})); +function featureSet_RepeatedFieldEncodingFromJSON(object) { + switch (object) { + case 0: + case "REPEATED_FIELD_ENCODING_UNKNOWN": + return FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN; + case 1: + case "PACKED": + return FeatureSet_RepeatedFieldEncoding.PACKED; + case 2: + case "EXPANDED": + return FeatureSet_RepeatedFieldEncoding.EXPANDED; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FeatureSet_RepeatedFieldEncoding"); + } +} +function featureSet_RepeatedFieldEncodingToJSON(object) { + switch (object) { + case FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN: + return "REPEATED_FIELD_ENCODING_UNKNOWN"; + case FeatureSet_RepeatedFieldEncoding.PACKED: + return "PACKED"; + case FeatureSet_RepeatedFieldEncoding.EXPANDED: + return "EXPANDED"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FeatureSet_RepeatedFieldEncoding"); + } +} +var FeatureSet_Utf8Validation; +(function (FeatureSet_Utf8Validation) { + FeatureSet_Utf8Validation[FeatureSet_Utf8Validation["UTF8_VALIDATION_UNKNOWN"] = 0] = "UTF8_VALIDATION_UNKNOWN"; + FeatureSet_Utf8Validation[FeatureSet_Utf8Validation["VERIFY"] = 2] = "VERIFY"; + FeatureSet_Utf8Validation[FeatureSet_Utf8Validation["NONE"] = 3] = "NONE"; +})(FeatureSet_Utf8Validation || (exports.FeatureSet_Utf8Validation = FeatureSet_Utf8Validation = {})); +function featureSet_Utf8ValidationFromJSON(object) { + switch (object) { + case 0: + case "UTF8_VALIDATION_UNKNOWN": + return FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN; + case 2: + case "VERIFY": + return FeatureSet_Utf8Validation.VERIFY; + case 3: + case "NONE": + return FeatureSet_Utf8Validation.NONE; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FeatureSet_Utf8Validation"); + } +} +function featureSet_Utf8ValidationToJSON(object) { + switch (object) { + case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN: + return "UTF8_VALIDATION_UNKNOWN"; + case FeatureSet_Utf8Validation.VERIFY: + return "VERIFY"; + case FeatureSet_Utf8Validation.NONE: + return "NONE"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FeatureSet_Utf8Validation"); + } +} +var FeatureSet_MessageEncoding; +(function (FeatureSet_MessageEncoding) { + FeatureSet_MessageEncoding[FeatureSet_MessageEncoding["MESSAGE_ENCODING_UNKNOWN"] = 0] = "MESSAGE_ENCODING_UNKNOWN"; + FeatureSet_MessageEncoding[FeatureSet_MessageEncoding["LENGTH_PREFIXED"] = 1] = "LENGTH_PREFIXED"; + FeatureSet_MessageEncoding[FeatureSet_MessageEncoding["DELIMITED"] = 2] = "DELIMITED"; +})(FeatureSet_MessageEncoding || (exports.FeatureSet_MessageEncoding = FeatureSet_MessageEncoding = {})); +function featureSet_MessageEncodingFromJSON(object) { + switch (object) { + case 0: + case "MESSAGE_ENCODING_UNKNOWN": + return FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN; + case 1: + case "LENGTH_PREFIXED": + return FeatureSet_MessageEncoding.LENGTH_PREFIXED; + case 2: + case "DELIMITED": + return FeatureSet_MessageEncoding.DELIMITED; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FeatureSet_MessageEncoding"); + } +} +function featureSet_MessageEncodingToJSON(object) { + switch (object) { + case FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN: + return "MESSAGE_ENCODING_UNKNOWN"; + case FeatureSet_MessageEncoding.LENGTH_PREFIXED: + return "LENGTH_PREFIXED"; + case FeatureSet_MessageEncoding.DELIMITED: + return "DELIMITED"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FeatureSet_MessageEncoding"); + } +} +var FeatureSet_JsonFormat; +(function (FeatureSet_JsonFormat) { + FeatureSet_JsonFormat[FeatureSet_JsonFormat["JSON_FORMAT_UNKNOWN"] = 0] = "JSON_FORMAT_UNKNOWN"; + FeatureSet_JsonFormat[FeatureSet_JsonFormat["ALLOW"] = 1] = "ALLOW"; + FeatureSet_JsonFormat[FeatureSet_JsonFormat["LEGACY_BEST_EFFORT"] = 2] = "LEGACY_BEST_EFFORT"; +})(FeatureSet_JsonFormat || (exports.FeatureSet_JsonFormat = FeatureSet_JsonFormat = {})); +function featureSet_JsonFormatFromJSON(object) { + switch (object) { + case 0: + case "JSON_FORMAT_UNKNOWN": + return FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN; + case 1: + case "ALLOW": + return FeatureSet_JsonFormat.ALLOW; + case 2: + case "LEGACY_BEST_EFFORT": + return FeatureSet_JsonFormat.LEGACY_BEST_EFFORT; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FeatureSet_JsonFormat"); + } +} +function featureSet_JsonFormatToJSON(object) { + switch (object) { + case FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN: + return "JSON_FORMAT_UNKNOWN"; + case FeatureSet_JsonFormat.ALLOW: + return "ALLOW"; + case FeatureSet_JsonFormat.LEGACY_BEST_EFFORT: + return "LEGACY_BEST_EFFORT"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum FeatureSet_JsonFormat"); + } +} +/** + * Represents the identified object's effect on the element in the original + * .proto file. + */ +var GeneratedCodeInfo_Annotation_Semantic; +(function (GeneratedCodeInfo_Annotation_Semantic) { + /** NONE - There is no effect or the effect is indescribable. */ + GeneratedCodeInfo_Annotation_Semantic[GeneratedCodeInfo_Annotation_Semantic["NONE"] = 0] = "NONE"; + /** SET - The element is set or otherwise mutated. */ + GeneratedCodeInfo_Annotation_Semantic[GeneratedCodeInfo_Annotation_Semantic["SET"] = 1] = "SET"; + /** ALIAS - An alias to the element is returned. */ + GeneratedCodeInfo_Annotation_Semantic[GeneratedCodeInfo_Annotation_Semantic["ALIAS"] = 2] = "ALIAS"; +})(GeneratedCodeInfo_Annotation_Semantic || (exports.GeneratedCodeInfo_Annotation_Semantic = GeneratedCodeInfo_Annotation_Semantic = {})); +function generatedCodeInfo_Annotation_SemanticFromJSON(object) { + switch (object) { + case 0: + case "NONE": + return GeneratedCodeInfo_Annotation_Semantic.NONE; + case 1: + case "SET": + return GeneratedCodeInfo_Annotation_Semantic.SET; + case 2: + case "ALIAS": + return GeneratedCodeInfo_Annotation_Semantic.ALIAS; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum GeneratedCodeInfo_Annotation_Semantic"); + } +} +function generatedCodeInfo_Annotation_SemanticToJSON(object) { + switch (object) { + case GeneratedCodeInfo_Annotation_Semantic.NONE: + return "NONE"; + case GeneratedCodeInfo_Annotation_Semantic.SET: + return "SET"; + case GeneratedCodeInfo_Annotation_Semantic.ALIAS: + return "ALIAS"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum GeneratedCodeInfo_Annotation_Semantic"); + } } exports.FileDescriptorSet = { fromJSON(object) { - return { file: Array.isArray(object?.file) ? object.file.map((e) => exports.FileDescriptorProto.fromJSON(e)) : [] }; + return { + file: globalThis.Array.isArray(object?.file) ? object.file.map((e) => exports.FileDescriptorProto.fromJSON(e)) : [], + }; }, toJSON(message) { const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? exports.FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; + if (message.file?.length) { + obj.file = message.file.map((e) => exports.FileDescriptorProto.toJSON(e)); } return obj; }, }; -function createBaseFileDescriptorProto() { - return { - name: "", - package: "", - dependency: [], - publicDependency: [], - weakDependency: [], - messageType: [], - enumType: [], - service: [], - extension: [], - options: undefined, - sourceCodeInfo: undefined, - syntax: "", - }; -} exports.FileDescriptorProto = { fromJSON(object) { return { - name: isSet(object.name) ? String(object.name) : "", - package: isSet(object.package) ? String(object.package) : "", - dependency: Array.isArray(object?.dependency) ? object.dependency.map((e) => String(e)) : [], - publicDependency: Array.isArray(object?.publicDependency) - ? object.publicDependency.map((e) => Number(e)) + name: isSet(object.name) ? globalThis.String(object.name) : "", + package: isSet(object.package) ? globalThis.String(object.package) : "", + dependency: globalThis.Array.isArray(object?.dependency) + ? object.dependency.map((e) => globalThis.String(e)) + : [], + publicDependency: globalThis.Array.isArray(object?.publicDependency) + ? object.publicDependency.map((e) => globalThis.Number(e)) : [], - weakDependency: Array.isArray(object?.weakDependency) ? object.weakDependency.map((e) => Number(e)) : [], - messageType: Array.isArray(object?.messageType) + weakDependency: globalThis.Array.isArray(object?.weakDependency) + ? object.weakDependency.map((e) => globalThis.Number(e)) + : [], + messageType: globalThis.Array.isArray(object?.messageType) ? object.messageType.map((e) => exports.DescriptorProto.fromJSON(e)) : [], - enumType: Array.isArray(object?.enumType) ? object.enumType.map((e) => exports.EnumDescriptorProto.fromJSON(e)) : [], - service: Array.isArray(object?.service) ? object.service.map((e) => exports.ServiceDescriptorProto.fromJSON(e)) : [], - extension: Array.isArray(object?.extension) + enumType: globalThis.Array.isArray(object?.enumType) + ? object.enumType.map((e) => exports.EnumDescriptorProto.fromJSON(e)) + : [], + service: globalThis.Array.isArray(object?.service) + ? object.service.map((e) => exports.ServiceDescriptorProto.fromJSON(e)) + : [], + extension: globalThis.Array.isArray(object?.extension) ? object.extension.map((e) => exports.FieldDescriptorProto.fromJSON(e)) : [], options: isSet(object.options) ? exports.FileOptions.fromJSON(object.options) : undefined, sourceCodeInfo: isSet(object.sourceCodeInfo) ? exports.SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined, - syntax: isSet(object.syntax) ? String(object.syntax) : "", + syntax: isSet(object.syntax) ? globalThis.String(object.syntax) : "", + edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0, }; }, toJSON(message) { const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; } - else { - obj.dependency = []; + if (message.package !== undefined && message.package !== "") { + obj.package = message.package; } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => Math.round(e)); + if (message.dependency?.length) { + obj.dependency = message.dependency; } - else { - obj.publicDependency = []; + if (message.publicDependency?.length) { + obj.publicDependency = message.publicDependency.map((e) => Math.round(e)); } - if (message.weakDependency) { + if (message.weakDependency?.length) { obj.weakDependency = message.weakDependency.map((e) => Math.round(e)); } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? exports.DescriptorProto.toJSON(e) : undefined); + if (message.messageType?.length) { + obj.messageType = message.messageType.map((e) => exports.DescriptorProto.toJSON(e)); } - else { - obj.messageType = []; + if (message.enumType?.length) { + obj.enumType = message.enumType.map((e) => exports.EnumDescriptorProto.toJSON(e)); } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? exports.EnumDescriptorProto.toJSON(e) : undefined); + if (message.service?.length) { + obj.service = message.service.map((e) => exports.ServiceDescriptorProto.toJSON(e)); } - else { - obj.enumType = []; + if (message.extension?.length) { + obj.extension = message.extension.map((e) => exports.FieldDescriptorProto.toJSON(e)); } - if (message.service) { - obj.service = message.service.map((e) => e ? exports.ServiceDescriptorProto.toJSON(e) : undefined); + if (message.options !== undefined) { + obj.options = exports.FileOptions.toJSON(message.options); } - else { - obj.service = []; + if (message.sourceCodeInfo !== undefined) { + obj.sourceCodeInfo = exports.SourceCodeInfo.toJSON(message.sourceCodeInfo); } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? exports.FieldDescriptorProto.toJSON(e) : undefined); + if (message.syntax !== undefined && message.syntax !== "") { + obj.syntax = message.syntax; } - else { - obj.extension = []; + if (message.edition !== undefined && message.edition !== 0) { + obj.edition = editionToJSON(message.edition); } - message.options !== undefined && (obj.options = message.options ? exports.FileOptions.toJSON(message.options) : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo ? exports.SourceCodeInfo.toJSON(message.sourceCodeInfo) : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); return obj; }, }; -function createBaseDescriptorProto() { - return { - name: "", - field: [], - extension: [], - nestedType: [], - enumType: [], - extensionRange: [], - oneofDecl: [], - options: undefined, - reservedRange: [], - reservedName: [], - }; -} exports.DescriptorProto = { fromJSON(object) { return { - name: isSet(object.name) ? String(object.name) : "", - field: Array.isArray(object?.field) ? object.field.map((e) => exports.FieldDescriptorProto.fromJSON(e)) : [], - extension: Array.isArray(object?.extension) + name: isSet(object.name) ? globalThis.String(object.name) : "", + field: globalThis.Array.isArray(object?.field) + ? object.field.map((e) => exports.FieldDescriptorProto.fromJSON(e)) + : [], + extension: globalThis.Array.isArray(object?.extension) ? object.extension.map((e) => exports.FieldDescriptorProto.fromJSON(e)) : [], - nestedType: Array.isArray(object?.nestedType) + nestedType: globalThis.Array.isArray(object?.nestedType) ? object.nestedType.map((e) => exports.DescriptorProto.fromJSON(e)) : [], - enumType: Array.isArray(object?.enumType) ? object.enumType.map((e) => exports.EnumDescriptorProto.fromJSON(e)) : [], - extensionRange: Array.isArray(object?.extensionRange) + enumType: globalThis.Array.isArray(object?.enumType) + ? object.enumType.map((e) => exports.EnumDescriptorProto.fromJSON(e)) + : [], + extensionRange: globalThis.Array.isArray(object?.extensionRange) ? object.extensionRange.map((e) => exports.DescriptorProto_ExtensionRange.fromJSON(e)) : [], - oneofDecl: Array.isArray(object?.oneofDecl) + oneofDecl: globalThis.Array.isArray(object?.oneofDecl) ? object.oneofDecl.map((e) => exports.OneofDescriptorProto.fromJSON(e)) : [], options: isSet(object.options) ? exports.MessageOptions.fromJSON(object.options) : undefined, - reservedRange: Array.isArray(object?.reservedRange) + reservedRange: globalThis.Array.isArray(object?.reservedRange) ? object.reservedRange.map((e) => exports.DescriptorProto_ReservedRange.fromJSON(e)) : [], - reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e) => String(e)) : [], + reservedName: globalThis.Array.isArray(object?.reservedName) + ? object.reservedName.map((e) => globalThis.String(e)) + : [], }; }, toJSON(message) { const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? exports.FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? exports.FieldDescriptorProto.toJSON(e) : undefined); + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; } - else { - obj.extension = []; + if (message.field?.length) { + obj.field = message.field.map((e) => exports.FieldDescriptorProto.toJSON(e)); } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? exports.DescriptorProto.toJSON(e) : undefined); + if (message.extension?.length) { + obj.extension = message.extension.map((e) => exports.FieldDescriptorProto.toJSON(e)); } - else { - obj.nestedType = []; + if (message.nestedType?.length) { + obj.nestedType = message.nestedType.map((e) => exports.DescriptorProto.toJSON(e)); } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? exports.EnumDescriptorProto.toJSON(e) : undefined); + if (message.enumType?.length) { + obj.enumType = message.enumType.map((e) => exports.EnumDescriptorProto.toJSON(e)); } - else { - obj.enumType = []; + if (message.extensionRange?.length) { + obj.extensionRange = message.extensionRange.map((e) => exports.DescriptorProto_ExtensionRange.toJSON(e)); } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? exports.DescriptorProto_ExtensionRange.toJSON(e) : undefined); + if (message.oneofDecl?.length) { + obj.oneofDecl = message.oneofDecl.map((e) => exports.OneofDescriptorProto.toJSON(e)); } - else { - obj.extensionRange = []; + if (message.options !== undefined) { + obj.options = exports.MessageOptions.toJSON(message.options); } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? exports.OneofDescriptorProto.toJSON(e) : undefined); + if (message.reservedRange?.length) { + obj.reservedRange = message.reservedRange.map((e) => exports.DescriptorProto_ReservedRange.toJSON(e)); } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options ? exports.MessageOptions.toJSON(message.options) : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? exports.DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; + if (message.reservedName?.length) { + obj.reservedName = message.reservedName; } return obj; }, }; -function createBaseDescriptorProto_ExtensionRange() { - return { start: 0, end: 0, options: undefined }; -} exports.DescriptorProto_ExtensionRange = { fromJSON(object) { return { - start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0, + start: isSet(object.start) ? globalThis.Number(object.start) : 0, + end: isSet(object.end) ? globalThis.Number(object.end) : 0, options: isSet(object.options) ? exports.ExtensionRangeOptions.fromJSON(object.options) : undefined, }; }, toJSON(message) { const obj = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); - message.options !== undefined && - (obj.options = message.options ? exports.ExtensionRangeOptions.toJSON(message.options) : undefined); + if (message.start !== undefined && message.start !== 0) { + obj.start = Math.round(message.start); + } + if (message.end !== undefined && message.end !== 0) { + obj.end = Math.round(message.end); + } + if (message.options !== undefined) { + obj.options = exports.ExtensionRangeOptions.toJSON(message.options); + } return obj; }, }; -function createBaseDescriptorProto_ReservedRange() { - return { start: 0, end: 0 }; -} exports.DescriptorProto_ReservedRange = { fromJSON(object) { - return { start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0 }; + return { + start: isSet(object.start) ? globalThis.Number(object.start) : 0, + end: isSet(object.end) ? globalThis.Number(object.end) : 0, + }; }, toJSON(message) { const obj = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); + if (message.start !== undefined && message.start !== 0) { + obj.start = Math.round(message.start); + } + if (message.end !== undefined && message.end !== 0) { + obj.end = Math.round(message.end); + } return obj; }, }; -function createBaseExtensionRangeOptions() { - return { uninterpretedOption: [] }; -} exports.ExtensionRangeOptions = { fromJSON(object) { return { - uninterpretedOption: Array.isArray(object?.uninterpretedOption) + uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) : [], + declaration: globalThis.Array.isArray(object?.declaration) + ? object.declaration.map((e) => exports.ExtensionRangeOptions_Declaration.fromJSON(e)) + : [], + features: isSet(object.features) ? exports.FeatureSet.fromJSON(object.features) : undefined, + verification: isSet(object.verification) + ? extensionRangeOptions_VerificationStateFromJSON(object.verification) + : 1, }; }, toJSON(message) { const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => exports.UninterpretedOption.toJSON(e)); + } + if (message.declaration?.length) { + obj.declaration = message.declaration.map((e) => exports.ExtensionRangeOptions_Declaration.toJSON(e)); } - else { - obj.uninterpretedOption = []; + if (message.features !== undefined) { + obj.features = exports.FeatureSet.toJSON(message.features); + } + if (message.verification !== undefined && message.verification !== 1) { + obj.verification = extensionRangeOptions_VerificationStateToJSON(message.verification); + } + return obj; + }, +}; +exports.ExtensionRangeOptions_Declaration = { + fromJSON(object) { + return { + number: isSet(object.number) ? globalThis.Number(object.number) : 0, + fullName: isSet(object.fullName) ? globalThis.String(object.fullName) : "", + type: isSet(object.type) ? globalThis.String(object.type) : "", + reserved: isSet(object.reserved) ? globalThis.Boolean(object.reserved) : false, + repeated: isSet(object.repeated) ? globalThis.Boolean(object.repeated) : false, + }; + }, + toJSON(message) { + const obj = {}; + if (message.number !== undefined && message.number !== 0) { + obj.number = Math.round(message.number); + } + if (message.fullName !== undefined && message.fullName !== "") { + obj.fullName = message.fullName; + } + if (message.type !== undefined && message.type !== "") { + obj.type = message.type; + } + if (message.reserved !== undefined && message.reserved !== false) { + obj.reserved = message.reserved; + } + if (message.repeated !== undefined && message.repeated !== false) { + obj.repeated = message.repeated; } return obj; }, }; -function createBaseFieldDescriptorProto() { - return { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - options: undefined, - proto3Optional: false, - }; -} exports.FieldDescriptorProto = { fromJSON(object) { return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, + name: isSet(object.name) ? globalThis.String(object.name) : "", + number: isSet(object.number) ? globalThis.Number(object.number) : 0, label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : 1, type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : 1, - typeName: isSet(object.typeName) ? String(object.typeName) : "", - extendee: isSet(object.extendee) ? String(object.extendee) : "", - defaultValue: isSet(object.defaultValue) ? String(object.defaultValue) : "", - oneofIndex: isSet(object.oneofIndex) ? Number(object.oneofIndex) : 0, - jsonName: isSet(object.jsonName) ? String(object.jsonName) : "", + typeName: isSet(object.typeName) ? globalThis.String(object.typeName) : "", + extendee: isSet(object.extendee) ? globalThis.String(object.extendee) : "", + defaultValue: isSet(object.defaultValue) ? globalThis.String(object.defaultValue) : "", + oneofIndex: isSet(object.oneofIndex) ? globalThis.Number(object.oneofIndex) : 0, + jsonName: isSet(object.jsonName) ? globalThis.String(object.jsonName) : "", options: isSet(object.options) ? exports.FieldOptions.fromJSON(object.options) : undefined, - proto3Optional: isSet(object.proto3Optional) ? Boolean(object.proto3Optional) : false, + proto3Optional: isSet(object.proto3Optional) ? globalThis.Boolean(object.proto3Optional) : false, }; }, toJSON(message) { const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = Math.round(message.number)); - message.label !== undefined && (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = Math.round(message.oneofIndex)); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && (obj.options = message.options ? exports.FieldOptions.toJSON(message.options) : undefined); - message.proto3Optional !== undefined && (obj.proto3Optional = message.proto3Optional); + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.number !== undefined && message.number !== 0) { + obj.number = Math.round(message.number); + } + if (message.label !== undefined && message.label !== 1) { + obj.label = fieldDescriptorProto_LabelToJSON(message.label); + } + if (message.type !== undefined && message.type !== 1) { + obj.type = fieldDescriptorProto_TypeToJSON(message.type); + } + if (message.typeName !== undefined && message.typeName !== "") { + obj.typeName = message.typeName; + } + if (message.extendee !== undefined && message.extendee !== "") { + obj.extendee = message.extendee; + } + if (message.defaultValue !== undefined && message.defaultValue !== "") { + obj.defaultValue = message.defaultValue; + } + if (message.oneofIndex !== undefined && message.oneofIndex !== 0) { + obj.oneofIndex = Math.round(message.oneofIndex); + } + if (message.jsonName !== undefined && message.jsonName !== "") { + obj.jsonName = message.jsonName; + } + if (message.options !== undefined) { + obj.options = exports.FieldOptions.toJSON(message.options); + } + if (message.proto3Optional !== undefined && message.proto3Optional !== false) { + obj.proto3Optional = message.proto3Optional; + } return obj; }, }; -function createBaseOneofDescriptorProto() { - return { name: "", options: undefined }; -} exports.OneofDescriptorProto = { fromJSON(object) { return { - name: isSet(object.name) ? String(object.name) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", options: isSet(object.options) ? exports.OneofOptions.fromJSON(object.options) : undefined, }; }, toJSON(message) { const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && (obj.options = message.options ? exports.OneofOptions.toJSON(message.options) : undefined); + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.options !== undefined) { + obj.options = exports.OneofOptions.toJSON(message.options); + } return obj; }, }; -function createBaseEnumDescriptorProto() { - return { name: "", value: [], options: undefined, reservedRange: [], reservedName: [] }; -} exports.EnumDescriptorProto = { fromJSON(object) { return { - name: isSet(object.name) ? String(object.name) : "", - value: Array.isArray(object?.value) ? object.value.map((e) => exports.EnumValueDescriptorProto.fromJSON(e)) : [], + name: isSet(object.name) ? globalThis.String(object.name) : "", + value: globalThis.Array.isArray(object?.value) + ? object.value.map((e) => exports.EnumValueDescriptorProto.fromJSON(e)) + : [], options: isSet(object.options) ? exports.EnumOptions.fromJSON(object.options) : undefined, - reservedRange: Array.isArray(object?.reservedRange) + reservedRange: globalThis.Array.isArray(object?.reservedRange) ? object.reservedRange.map((e) => exports.EnumDescriptorProto_EnumReservedRange.fromJSON(e)) : [], - reservedName: Array.isArray(object?.reservedName) - ? object.reservedName.map((e) => String(e)) + reservedName: globalThis.Array.isArray(object?.reservedName) + ? object.reservedName.map((e) => globalThis.String(e)) : [], }; }, toJSON(message) { const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? exports.EnumValueDescriptorProto.toJSON(e) : undefined); + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; } - else { - obj.value = []; + if (message.value?.length) { + obj.value = message.value.map((e) => exports.EnumValueDescriptorProto.toJSON(e)); } - message.options !== undefined && (obj.options = message.options ? exports.EnumOptions.toJSON(message.options) : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? exports.EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); + if (message.options !== undefined) { + obj.options = exports.EnumOptions.toJSON(message.options); } - else { - obj.reservedRange = []; + if (message.reservedRange?.length) { + obj.reservedRange = message.reservedRange.map((e) => exports.EnumDescriptorProto_EnumReservedRange.toJSON(e)); } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; + if (message.reservedName?.length) { + obj.reservedName = message.reservedName; } return obj; }, }; -function createBaseEnumDescriptorProto_EnumReservedRange() { - return { start: 0, end: 0 }; -} exports.EnumDescriptorProto_EnumReservedRange = { fromJSON(object) { - return { start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0 }; + return { + start: isSet(object.start) ? globalThis.Number(object.start) : 0, + end: isSet(object.end) ? globalThis.Number(object.end) : 0, + }; }, toJSON(message) { const obj = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); + if (message.start !== undefined && message.start !== 0) { + obj.start = Math.round(message.start); + } + if (message.end !== undefined && message.end !== 0) { + obj.end = Math.round(message.end); + } return obj; }, }; -function createBaseEnumValueDescriptorProto() { - return { name: "", number: 0, options: undefined }; -} exports.EnumValueDescriptorProto = { fromJSON(object) { return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, + name: isSet(object.name) ? globalThis.String(object.name) : "", + number: isSet(object.number) ? globalThis.Number(object.number) : 0, options: isSet(object.options) ? exports.EnumValueOptions.fromJSON(object.options) : undefined, }; }, toJSON(message) { const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = Math.round(message.number)); - message.options !== undefined && - (obj.options = message.options ? exports.EnumValueOptions.toJSON(message.options) : undefined); + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.number !== undefined && message.number !== 0) { + obj.number = Math.round(message.number); + } + if (message.options !== undefined) { + obj.options = exports.EnumValueOptions.toJSON(message.options); + } return obj; }, }; -function createBaseServiceDescriptorProto() { - return { name: "", method: [], options: undefined }; -} exports.ServiceDescriptorProto = { fromJSON(object) { return { - name: isSet(object.name) ? String(object.name) : "", - method: Array.isArray(object?.method) ? object.method.map((e) => exports.MethodDescriptorProto.fromJSON(e)) : [], + name: isSet(object.name) ? globalThis.String(object.name) : "", + method: globalThis.Array.isArray(object?.method) + ? object.method.map((e) => exports.MethodDescriptorProto.fromJSON(e)) + : [], options: isSet(object.options) ? exports.ServiceOptions.fromJSON(object.options) : undefined, }; }, toJSON(message) { const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? exports.MethodDescriptorProto.toJSON(e) : undefined); + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.method?.length) { + obj.method = message.method.map((e) => exports.MethodDescriptorProto.toJSON(e)); } - else { - obj.method = []; + if (message.options !== undefined) { + obj.options = exports.ServiceOptions.toJSON(message.options); } - message.options !== undefined && - (obj.options = message.options ? exports.ServiceOptions.toJSON(message.options) : undefined); return obj; }, }; -function createBaseMethodDescriptorProto() { - return { - name: "", - inputType: "", - outputType: "", - options: undefined, - clientStreaming: false, - serverStreaming: false, - }; -} exports.MethodDescriptorProto = { fromJSON(object) { return { - name: isSet(object.name) ? String(object.name) : "", - inputType: isSet(object.inputType) ? String(object.inputType) : "", - outputType: isSet(object.outputType) ? String(object.outputType) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", + inputType: isSet(object.inputType) ? globalThis.String(object.inputType) : "", + outputType: isSet(object.outputType) ? globalThis.String(object.outputType) : "", options: isSet(object.options) ? exports.MethodOptions.fromJSON(object.options) : undefined, - clientStreaming: isSet(object.clientStreaming) ? Boolean(object.clientStreaming) : false, - serverStreaming: isSet(object.serverStreaming) ? Boolean(object.serverStreaming) : false, + clientStreaming: isSet(object.clientStreaming) ? globalThis.Boolean(object.clientStreaming) : false, + serverStreaming: isSet(object.serverStreaming) ? globalThis.Boolean(object.serverStreaming) : false, }; }, toJSON(message) { const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options ? exports.MethodOptions.toJSON(message.options) : undefined); - message.clientStreaming !== undefined && (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && (obj.serverStreaming = message.serverStreaming); + if (message.name !== undefined && message.name !== "") { + obj.name = message.name; + } + if (message.inputType !== undefined && message.inputType !== "") { + obj.inputType = message.inputType; + } + if (message.outputType !== undefined && message.outputType !== "") { + obj.outputType = message.outputType; + } + if (message.options !== undefined) { + obj.options = exports.MethodOptions.toJSON(message.options); + } + if (message.clientStreaming !== undefined && message.clientStreaming !== false) { + obj.clientStreaming = message.clientStreaming; + } + if (message.serverStreaming !== undefined && message.serverStreaming !== false) { + obj.serverStreaming = message.serverStreaming; + } return obj; }, }; -function createBaseFileOptions() { - return { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", - uninterpretedOption: [], - }; -} exports.FileOptions = { fromJSON(object) { return { - javaPackage: isSet(object.javaPackage) ? String(object.javaPackage) : "", - javaOuterClassname: isSet(object.javaOuterClassname) ? String(object.javaOuterClassname) : "", - javaMultipleFiles: isSet(object.javaMultipleFiles) ? Boolean(object.javaMultipleFiles) : false, + javaPackage: isSet(object.javaPackage) ? globalThis.String(object.javaPackage) : "", + javaOuterClassname: isSet(object.javaOuterClassname) ? globalThis.String(object.javaOuterClassname) : "", + javaMultipleFiles: isSet(object.javaMultipleFiles) ? globalThis.Boolean(object.javaMultipleFiles) : false, javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash) - ? Boolean(object.javaGenerateEqualsAndHash) + ? globalThis.Boolean(object.javaGenerateEqualsAndHash) : false, - javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? Boolean(object.javaStringCheckUtf8) : false, + javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? globalThis.Boolean(object.javaStringCheckUtf8) : false, optimizeFor: isSet(object.optimizeFor) ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) : 1, - goPackage: isSet(object.goPackage) ? String(object.goPackage) : "", - ccGenericServices: isSet(object.ccGenericServices) ? Boolean(object.ccGenericServices) : false, - javaGenericServices: isSet(object.javaGenericServices) ? Boolean(object.javaGenericServices) : false, - pyGenericServices: isSet(object.pyGenericServices) ? Boolean(object.pyGenericServices) : false, - phpGenericServices: isSet(object.phpGenericServices) ? Boolean(object.phpGenericServices) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - ccEnableArenas: isSet(object.ccEnableArenas) ? Boolean(object.ccEnableArenas) : false, - objcClassPrefix: isSet(object.objcClassPrefix) ? String(object.objcClassPrefix) : "", - csharpNamespace: isSet(object.csharpNamespace) ? String(object.csharpNamespace) : "", - swiftPrefix: isSet(object.swiftPrefix) ? String(object.swiftPrefix) : "", - phpClassPrefix: isSet(object.phpClassPrefix) ? String(object.phpClassPrefix) : "", - phpNamespace: isSet(object.phpNamespace) ? String(object.phpNamespace) : "", - phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? String(object.phpMetadataNamespace) : "", - rubyPackage: isSet(object.rubyPackage) ? String(object.rubyPackage) : "", - uninterpretedOption: Array.isArray(object?.uninterpretedOption) + goPackage: isSet(object.goPackage) ? globalThis.String(object.goPackage) : "", + ccGenericServices: isSet(object.ccGenericServices) ? globalThis.Boolean(object.ccGenericServices) : false, + javaGenericServices: isSet(object.javaGenericServices) ? globalThis.Boolean(object.javaGenericServices) : false, + pyGenericServices: isSet(object.pyGenericServices) ? globalThis.Boolean(object.pyGenericServices) : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, + ccEnableArenas: isSet(object.ccEnableArenas) ? globalThis.Boolean(object.ccEnableArenas) : true, + objcClassPrefix: isSet(object.objcClassPrefix) ? globalThis.String(object.objcClassPrefix) : "", + csharpNamespace: isSet(object.csharpNamespace) ? globalThis.String(object.csharpNamespace) : "", + swiftPrefix: isSet(object.swiftPrefix) ? globalThis.String(object.swiftPrefix) : "", + phpClassPrefix: isSet(object.phpClassPrefix) ? globalThis.String(object.phpClassPrefix) : "", + phpNamespace: isSet(object.phpNamespace) ? globalThis.String(object.phpNamespace) : "", + phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? globalThis.String(object.phpMetadataNamespace) : "", + rubyPackage: isSet(object.rubyPackage) ? globalThis.String(object.rubyPackage) : "", + features: isSet(object.features) ? exports.FeatureSet.fromJSON(object.features) : undefined, + uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - message.javaPackage !== undefined && (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; + if (message.javaPackage !== undefined && message.javaPackage !== "") { + obj.javaPackage = message.javaPackage; + } + if (message.javaOuterClassname !== undefined && message.javaOuterClassname !== "") { + obj.javaOuterClassname = message.javaOuterClassname; + } + if (message.javaMultipleFiles !== undefined && message.javaMultipleFiles !== false) { + obj.javaMultipleFiles = message.javaMultipleFiles; + } + if (message.javaGenerateEqualsAndHash !== undefined && message.javaGenerateEqualsAndHash !== false) { + obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + } + if (message.javaStringCheckUtf8 !== undefined && message.javaStringCheckUtf8 !== false) { + obj.javaStringCheckUtf8 = message.javaStringCheckUtf8; + } + if (message.optimizeFor !== undefined && message.optimizeFor !== 1) { + obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor); + } + if (message.goPackage !== undefined && message.goPackage !== "") { + obj.goPackage = message.goPackage; + } + if (message.ccGenericServices !== undefined && message.ccGenericServices !== false) { + obj.ccGenericServices = message.ccGenericServices; + } + if (message.javaGenericServices !== undefined && message.javaGenericServices !== false) { + obj.javaGenericServices = message.javaGenericServices; + } + if (message.pyGenericServices !== undefined && message.pyGenericServices !== false) { + obj.pyGenericServices = message.pyGenericServices; + } + if (message.deprecated !== undefined && message.deprecated !== false) { + obj.deprecated = message.deprecated; + } + if (message.ccEnableArenas !== undefined && message.ccEnableArenas !== true) { + obj.ccEnableArenas = message.ccEnableArenas; + } + if (message.objcClassPrefix !== undefined && message.objcClassPrefix !== "") { + obj.objcClassPrefix = message.objcClassPrefix; + } + if (message.csharpNamespace !== undefined && message.csharpNamespace !== "") { + obj.csharpNamespace = message.csharpNamespace; + } + if (message.swiftPrefix !== undefined && message.swiftPrefix !== "") { + obj.swiftPrefix = message.swiftPrefix; + } + if (message.phpClassPrefix !== undefined && message.phpClassPrefix !== "") { + obj.phpClassPrefix = message.phpClassPrefix; + } + if (message.phpNamespace !== undefined && message.phpNamespace !== "") { + obj.phpNamespace = message.phpNamespace; + } + if (message.phpMetadataNamespace !== undefined && message.phpMetadataNamespace !== "") { + obj.phpMetadataNamespace = message.phpMetadataNamespace; + } + if (message.rubyPackage !== undefined && message.rubyPackage !== "") { + obj.rubyPackage = message.rubyPackage; + } + if (message.features !== undefined) { + obj.features = exports.FeatureSet.toJSON(message.features); + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => exports.UninterpretedOption.toJSON(e)); } return obj; }, }; -function createBaseMessageOptions() { - return { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, - uninterpretedOption: [], - }; -} exports.MessageOptions = { fromJSON(object) { return { - messageSetWireFormat: isSet(object.messageSetWireFormat) ? Boolean(object.messageSetWireFormat) : false, + messageSetWireFormat: isSet(object.messageSetWireFormat) + ? globalThis.Boolean(object.messageSetWireFormat) + : false, noStandardDescriptorAccessor: isSet(object.noStandardDescriptorAccessor) - ? Boolean(object.noStandardDescriptorAccessor) + ? globalThis.Boolean(object.noStandardDescriptorAccessor) + : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, + mapEntry: isSet(object.mapEntry) ? globalThis.Boolean(object.mapEntry) : false, + deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts) + ? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) + features: isSet(object.features) ? exports.FeatureSet.fromJSON(object.features) : undefined, + uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - message.messageSetWireFormat !== undefined && (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); + if (message.messageSetWireFormat !== undefined && message.messageSetWireFormat !== false) { + obj.messageSetWireFormat = message.messageSetWireFormat; + } + if (message.noStandardDescriptorAccessor !== undefined && message.noStandardDescriptorAccessor !== false) { + obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + } + if (message.deprecated !== undefined && message.deprecated !== false) { + obj.deprecated = message.deprecated; + } + if (message.mapEntry !== undefined && message.mapEntry !== false) { + obj.mapEntry = message.mapEntry; } - else { - obj.uninterpretedOption = []; + if (message.deprecatedLegacyJsonFieldConflicts !== undefined && message.deprecatedLegacyJsonFieldConflicts !== false) { + obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + } + if (message.features !== undefined) { + obj.features = exports.FeatureSet.toJSON(message.features); + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => exports.UninterpretedOption.toJSON(e)); } return obj; }, }; -function createBaseFieldOptions() { - return { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - unverifiedLazy: false, - deprecated: false, - weak: false, - uninterpretedOption: [], - }; -} exports.FieldOptions = { fromJSON(object) { return { ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : 0, - packed: isSet(object.packed) ? Boolean(object.packed) : false, + packed: isSet(object.packed) ? globalThis.Boolean(object.packed) : false, jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : 0, - lazy: isSet(object.lazy) ? Boolean(object.lazy) : false, - unverifiedLazy: isSet(object.unverifiedLazy) ? Boolean(object.unverifiedLazy) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - weak: isSet(object.weak) ? Boolean(object.weak) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) + lazy: isSet(object.lazy) ? globalThis.Boolean(object.lazy) : false, + unverifiedLazy: isSet(object.unverifiedLazy) ? globalThis.Boolean(object.unverifiedLazy) : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, + weak: isSet(object.weak) ? globalThis.Boolean(object.weak) : false, + debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false, + retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0, + targets: globalThis.Array.isArray(object?.targets) + ? object.targets.map((e) => fieldOptions_OptionTargetTypeFromJSON(e)) + : [], + editionDefaults: globalThis.Array.isArray(object?.editionDefaults) + ? object.editionDefaults.map((e) => exports.FieldOptions_EditionDefault.fromJSON(e)) + : [], + features: isSet(object.features) ? exports.FeatureSet.fromJSON(object.features) : undefined, + featureSupport: isSet(object.featureSupport) + ? exports.FieldOptions_FeatureSupport.fromJSON(object.featureSupport) + : undefined, + uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - message.ctype !== undefined && (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.unverifiedLazy !== undefined && (obj.unverifiedLazy = message.unverifiedLazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; + if (message.ctype !== undefined && message.ctype !== 0) { + obj.ctype = fieldOptions_CTypeToJSON(message.ctype); + } + if (message.packed !== undefined && message.packed !== false) { + obj.packed = message.packed; + } + if (message.jstype !== undefined && message.jstype !== 0) { + obj.jstype = fieldOptions_JSTypeToJSON(message.jstype); + } + if (message.lazy !== undefined && message.lazy !== false) { + obj.lazy = message.lazy; + } + if (message.unverifiedLazy !== undefined && message.unverifiedLazy !== false) { + obj.unverifiedLazy = message.unverifiedLazy; + } + if (message.deprecated !== undefined && message.deprecated !== false) { + obj.deprecated = message.deprecated; + } + if (message.weak !== undefined && message.weak !== false) { + obj.weak = message.weak; + } + if (message.debugRedact !== undefined && message.debugRedact !== false) { + obj.debugRedact = message.debugRedact; + } + if (message.retention !== undefined && message.retention !== 0) { + obj.retention = fieldOptions_OptionRetentionToJSON(message.retention); + } + if (message.targets?.length) { + obj.targets = message.targets.map((e) => fieldOptions_OptionTargetTypeToJSON(e)); + } + if (message.editionDefaults?.length) { + obj.editionDefaults = message.editionDefaults.map((e) => exports.FieldOptions_EditionDefault.toJSON(e)); + } + if (message.features !== undefined) { + obj.features = exports.FeatureSet.toJSON(message.features); + } + if (message.featureSupport !== undefined) { + obj.featureSupport = exports.FieldOptions_FeatureSupport.toJSON(message.featureSupport); + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => exports.UninterpretedOption.toJSON(e)); + } + return obj; + }, +}; +exports.FieldOptions_EditionDefault = { + fromJSON(object) { + return { + edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0, + value: isSet(object.value) ? globalThis.String(object.value) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.edition !== undefined && message.edition !== 0) { + obj.edition = editionToJSON(message.edition); + } + if (message.value !== undefined && message.value !== "") { + obj.value = message.value; + } + return obj; + }, +}; +exports.FieldOptions_FeatureSupport = { + fromJSON(object) { + return { + editionIntroduced: isSet(object.editionIntroduced) ? editionFromJSON(object.editionIntroduced) : 0, + editionDeprecated: isSet(object.editionDeprecated) ? editionFromJSON(object.editionDeprecated) : 0, + deprecationWarning: isSet(object.deprecationWarning) ? globalThis.String(object.deprecationWarning) : "", + editionRemoved: isSet(object.editionRemoved) ? editionFromJSON(object.editionRemoved) : 0, + }; + }, + toJSON(message) { + const obj = {}; + if (message.editionIntroduced !== undefined && message.editionIntroduced !== 0) { + obj.editionIntroduced = editionToJSON(message.editionIntroduced); + } + if (message.editionDeprecated !== undefined && message.editionDeprecated !== 0) { + obj.editionDeprecated = editionToJSON(message.editionDeprecated); + } + if (message.deprecationWarning !== undefined && message.deprecationWarning !== "") { + obj.deprecationWarning = message.deprecationWarning; + } + if (message.editionRemoved !== undefined && message.editionRemoved !== 0) { + obj.editionRemoved = editionToJSON(message.editionRemoved); } return obj; }, }; -function createBaseOneofOptions() { - return { uninterpretedOption: [] }; -} exports.OneofOptions = { fromJSON(object) { return { - uninterpretedOption: Array.isArray(object?.uninterpretedOption) + features: isSet(object.features) ? exports.FeatureSet.fromJSON(object.features) : undefined, + uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); + if (message.features !== undefined) { + obj.features = exports.FeatureSet.toJSON(message.features); } - else { - obj.uninterpretedOption = []; + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => exports.UninterpretedOption.toJSON(e)); } return obj; }, }; -function createBaseEnumOptions() { - return { allowAlias: false, deprecated: false, uninterpretedOption: [] }; -} exports.EnumOptions = { fromJSON(object) { return { - allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) + allowAlias: isSet(object.allowAlias) ? globalThis.Boolean(object.allowAlias) : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, + deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts) + ? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts) + : false, + features: isSet(object.features) ? exports.FeatureSet.fromJSON(object.features) : undefined, + uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); + if (message.allowAlias !== undefined && message.allowAlias !== false) { + obj.allowAlias = message.allowAlias; + } + if (message.deprecated !== undefined && message.deprecated !== false) { + obj.deprecated = message.deprecated; + } + if (message.deprecatedLegacyJsonFieldConflicts !== undefined && message.deprecatedLegacyJsonFieldConflicts !== false) { + obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; } - else { - obj.uninterpretedOption = []; + if (message.features !== undefined) { + obj.features = exports.FeatureSet.toJSON(message.features); + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => exports.UninterpretedOption.toJSON(e)); } return obj; }, }; -function createBaseEnumValueOptions() { - return { deprecated: false, uninterpretedOption: [] }; -} exports.EnumValueOptions = { fromJSON(object) { return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, + features: isSet(object.features) ? exports.FeatureSet.fromJSON(object.features) : undefined, + debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false, + featureSupport: isSet(object.featureSupport) + ? exports.FieldOptions_FeatureSupport.fromJSON(object.featureSupport) + : undefined, + uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); + if (message.deprecated !== undefined && message.deprecated !== false) { + obj.deprecated = message.deprecated; + } + if (message.features !== undefined) { + obj.features = exports.FeatureSet.toJSON(message.features); } - else { - obj.uninterpretedOption = []; + if (message.debugRedact !== undefined && message.debugRedact !== false) { + obj.debugRedact = message.debugRedact; + } + if (message.featureSupport !== undefined) { + obj.featureSupport = exports.FieldOptions_FeatureSupport.toJSON(message.featureSupport); + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => exports.UninterpretedOption.toJSON(e)); } return obj; }, }; -function createBaseServiceOptions() { - return { deprecated: false, uninterpretedOption: [] }; -} exports.ServiceOptions = { fromJSON(object) { return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) + features: isSet(object.features) ? exports.FeatureSet.fromJSON(object.features) : undefined, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, + uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); + if (message.features !== undefined) { + obj.features = exports.FeatureSet.toJSON(message.features); } - else { - obj.uninterpretedOption = []; + if (message.deprecated !== undefined && message.deprecated !== false) { + obj.deprecated = message.deprecated; + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => exports.UninterpretedOption.toJSON(e)); } return obj; }, }; -function createBaseMethodOptions() { - return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] }; -} exports.MethodOptions = { fromJSON(object) { return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, idempotencyLevel: isSet(object.idempotencyLevel) ? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel) : 0, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) + features: isSet(object.features) ? exports.FeatureSet.fromJSON(object.features) : undefined, + uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); + if (message.deprecated !== undefined && message.deprecated !== false) { + obj.deprecated = message.deprecated; + } + if (message.idempotencyLevel !== undefined && message.idempotencyLevel !== 0) { + obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel); } - else { - obj.uninterpretedOption = []; + if (message.features !== undefined) { + obj.features = exports.FeatureSet.toJSON(message.features); + } + if (message.uninterpretedOption?.length) { + obj.uninterpretedOption = message.uninterpretedOption.map((e) => exports.UninterpretedOption.toJSON(e)); } return obj; }, }; -function createBaseUninterpretedOption() { - return { - name: [], - identifierValue: "", - positiveIntValue: "0", - negativeIntValue: "0", - doubleValue: 0, - stringValue: Buffer.alloc(0), - aggregateValue: "", - }; -} exports.UninterpretedOption = { fromJSON(object) { return { - name: Array.isArray(object?.name) ? object.name.map((e) => exports.UninterpretedOption_NamePart.fromJSON(e)) : [], - identifierValue: isSet(object.identifierValue) ? String(object.identifierValue) : "", - positiveIntValue: isSet(object.positiveIntValue) ? String(object.positiveIntValue) : "0", - negativeIntValue: isSet(object.negativeIntValue) ? String(object.negativeIntValue) : "0", - doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : 0, + name: globalThis.Array.isArray(object?.name) + ? object.name.map((e) => exports.UninterpretedOption_NamePart.fromJSON(e)) + : [], + identifierValue: isSet(object.identifierValue) ? globalThis.String(object.identifierValue) : "", + positiveIntValue: isSet(object.positiveIntValue) ? globalThis.String(object.positiveIntValue) : "0", + negativeIntValue: isSet(object.negativeIntValue) ? globalThis.String(object.negativeIntValue) : "0", + doubleValue: isSet(object.doubleValue) ? globalThis.Number(object.doubleValue) : 0, stringValue: isSet(object.stringValue) ? Buffer.from(bytesFromBase64(object.stringValue)) : Buffer.alloc(0), - aggregateValue: isSet(object.aggregateValue) ? String(object.aggregateValue) : "", + aggregateValue: isSet(object.aggregateValue) ? globalThis.String(object.aggregateValue) : "", }; }, toJSON(message) { const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? exports.UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined ? message.stringValue : Buffer.alloc(0))); - message.aggregateValue !== undefined && (obj.aggregateValue = message.aggregateValue); + if (message.name?.length) { + obj.name = message.name.map((e) => exports.UninterpretedOption_NamePart.toJSON(e)); + } + if (message.identifierValue !== undefined && message.identifierValue !== "") { + obj.identifierValue = message.identifierValue; + } + if (message.positiveIntValue !== undefined && message.positiveIntValue !== "0") { + obj.positiveIntValue = message.positiveIntValue; + } + if (message.negativeIntValue !== undefined && message.negativeIntValue !== "0") { + obj.negativeIntValue = message.negativeIntValue; + } + if (message.doubleValue !== undefined && message.doubleValue !== 0) { + obj.doubleValue = message.doubleValue; + } + if (message.stringValue !== undefined && message.stringValue.length !== 0) { + obj.stringValue = base64FromBytes(message.stringValue); + } + if (message.aggregateValue !== undefined && message.aggregateValue !== "") { + obj.aggregateValue = message.aggregateValue; + } return obj; }, }; -function createBaseUninterpretedOption_NamePart() { - return { namePart: "", isExtension: false }; -} exports.UninterpretedOption_NamePart = { fromJSON(object) { return { - namePart: isSet(object.namePart) ? String(object.namePart) : "", - isExtension: isSet(object.isExtension) ? Boolean(object.isExtension) : false, + namePart: isSet(object.namePart) ? globalThis.String(object.namePart) : "", + isExtension: isSet(object.isExtension) ? globalThis.Boolean(object.isExtension) : false, }; }, toJSON(message) { const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && (obj.isExtension = message.isExtension); + if (message.namePart !== "") { + obj.namePart = message.namePart; + } + if (message.isExtension !== false) { + obj.isExtension = message.isExtension; + } + return obj; + }, +}; +exports.FeatureSet = { + fromJSON(object) { + return { + fieldPresence: isSet(object.fieldPresence) ? featureSet_FieldPresenceFromJSON(object.fieldPresence) : 0, + enumType: isSet(object.enumType) ? featureSet_EnumTypeFromJSON(object.enumType) : 0, + repeatedFieldEncoding: isSet(object.repeatedFieldEncoding) + ? featureSet_RepeatedFieldEncodingFromJSON(object.repeatedFieldEncoding) + : 0, + utf8Validation: isSet(object.utf8Validation) ? featureSet_Utf8ValidationFromJSON(object.utf8Validation) : 0, + messageEncoding: isSet(object.messageEncoding) ? featureSet_MessageEncodingFromJSON(object.messageEncoding) : 0, + jsonFormat: isSet(object.jsonFormat) ? featureSet_JsonFormatFromJSON(object.jsonFormat) : 0, + }; + }, + toJSON(message) { + const obj = {}; + if (message.fieldPresence !== undefined && message.fieldPresence !== 0) { + obj.fieldPresence = featureSet_FieldPresenceToJSON(message.fieldPresence); + } + if (message.enumType !== undefined && message.enumType !== 0) { + obj.enumType = featureSet_EnumTypeToJSON(message.enumType); + } + if (message.repeatedFieldEncoding !== undefined && message.repeatedFieldEncoding !== 0) { + obj.repeatedFieldEncoding = featureSet_RepeatedFieldEncodingToJSON(message.repeatedFieldEncoding); + } + if (message.utf8Validation !== undefined && message.utf8Validation !== 0) { + obj.utf8Validation = featureSet_Utf8ValidationToJSON(message.utf8Validation); + } + if (message.messageEncoding !== undefined && message.messageEncoding !== 0) { + obj.messageEncoding = featureSet_MessageEncodingToJSON(message.messageEncoding); + } + if (message.jsonFormat !== undefined && message.jsonFormat !== 0) { + obj.jsonFormat = featureSet_JsonFormatToJSON(message.jsonFormat); + } + return obj; + }, +}; +exports.FeatureSetDefaults = { + fromJSON(object) { + return { + defaults: globalThis.Array.isArray(object?.defaults) + ? object.defaults.map((e) => exports.FeatureSetDefaults_FeatureSetEditionDefault.fromJSON(e)) + : [], + minimumEdition: isSet(object.minimumEdition) ? editionFromJSON(object.minimumEdition) : 0, + maximumEdition: isSet(object.maximumEdition) ? editionFromJSON(object.maximumEdition) : 0, + }; + }, + toJSON(message) { + const obj = {}; + if (message.defaults?.length) { + obj.defaults = message.defaults.map((e) => exports.FeatureSetDefaults_FeatureSetEditionDefault.toJSON(e)); + } + if (message.minimumEdition !== undefined && message.minimumEdition !== 0) { + obj.minimumEdition = editionToJSON(message.minimumEdition); + } + if (message.maximumEdition !== undefined && message.maximumEdition !== 0) { + obj.maximumEdition = editionToJSON(message.maximumEdition); + } + return obj; + }, +}; +exports.FeatureSetDefaults_FeatureSetEditionDefault = { + fromJSON(object) { + return { + edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0, + overridableFeatures: isSet(object.overridableFeatures) + ? exports.FeatureSet.fromJSON(object.overridableFeatures) + : undefined, + fixedFeatures: isSet(object.fixedFeatures) ? exports.FeatureSet.fromJSON(object.fixedFeatures) : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.edition !== undefined && message.edition !== 0) { + obj.edition = editionToJSON(message.edition); + } + if (message.overridableFeatures !== undefined) { + obj.overridableFeatures = exports.FeatureSet.toJSON(message.overridableFeatures); + } + if (message.fixedFeatures !== undefined) { + obj.fixedFeatures = exports.FeatureSet.toJSON(message.fixedFeatures); + } return obj; }, }; -function createBaseSourceCodeInfo() { - return { location: [] }; -} exports.SourceCodeInfo = { fromJSON(object) { return { - location: Array.isArray(object?.location) + location: globalThis.Array.isArray(object?.location) ? object.location.map((e) => exports.SourceCodeInfo_Location.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? exports.SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; + if (message.location?.length) { + obj.location = message.location.map((e) => exports.SourceCodeInfo_Location.toJSON(e)); } return obj; }, }; -function createBaseSourceCodeInfo_Location() { - return { path: [], span: [], leadingComments: "", trailingComments: "", leadingDetachedComments: [] }; -} exports.SourceCodeInfo_Location = { fromJSON(object) { return { - path: Array.isArray(object?.path) ? object.path.map((e) => Number(e)) : [], - span: Array.isArray(object?.span) ? object.span.map((e) => Number(e)) : [], - leadingComments: isSet(object.leadingComments) ? String(object.leadingComments) : "", - trailingComments: isSet(object.trailingComments) ? String(object.trailingComments) : "", - leadingDetachedComments: Array.isArray(object?.leadingDetachedComments) - ? object.leadingDetachedComments.map((e) => String(e)) + path: globalThis.Array.isArray(object?.path) + ? object.path.map((e) => globalThis.Number(e)) + : [], + span: globalThis.Array.isArray(object?.span) ? object.span.map((e) => globalThis.Number(e)) : [], + leadingComments: isSet(object.leadingComments) ? globalThis.String(object.leadingComments) : "", + trailingComments: isSet(object.trailingComments) ? globalThis.String(object.trailingComments) : "", + leadingDetachedComments: globalThis.Array.isArray(object?.leadingDetachedComments) + ? object.leadingDetachedComments.map((e) => globalThis.String(e)) : [], }; }, toJSON(message) { const obj = {}; - if (message.path) { + if (message.path?.length) { obj.path = message.path.map((e) => Math.round(e)); } - else { - obj.path = []; - } - if (message.span) { + if (message.span?.length) { obj.span = message.span.map((e) => Math.round(e)); } - else { - obj.span = []; + if (message.leadingComments !== undefined && message.leadingComments !== "") { + obj.leadingComments = message.leadingComments; } - message.leadingComments !== undefined && (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); + if (message.trailingComments !== undefined && message.trailingComments !== "") { + obj.trailingComments = message.trailingComments; } - else { - obj.leadingDetachedComments = []; + if (message.leadingDetachedComments?.length) { + obj.leadingDetachedComments = message.leadingDetachedComments; } return obj; }, }; -function createBaseGeneratedCodeInfo() { - return { annotation: [] }; -} exports.GeneratedCodeInfo = { fromJSON(object) { return { - annotation: Array.isArray(object?.annotation) + annotation: globalThis.Array.isArray(object?.annotation) ? object.annotation.map((e) => exports.GeneratedCodeInfo_Annotation.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? exports.GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; + if (message.annotation?.length) { + obj.annotation = message.annotation.map((e) => exports.GeneratedCodeInfo_Annotation.toJSON(e)); } return obj; }, }; -function createBaseGeneratedCodeInfo_Annotation() { - return { path: [], sourceFile: "", begin: 0, end: 0 }; -} exports.GeneratedCodeInfo_Annotation = { fromJSON(object) { return { - path: Array.isArray(object?.path) ? object.path.map((e) => Number(e)) : [], - sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "", - begin: isSet(object.begin) ? Number(object.begin) : 0, - end: isSet(object.end) ? Number(object.end) : 0, + path: globalThis.Array.isArray(object?.path) + ? object.path.map((e) => globalThis.Number(e)) + : [], + sourceFile: isSet(object.sourceFile) ? globalThis.String(object.sourceFile) : "", + begin: isSet(object.begin) ? globalThis.Number(object.begin) : 0, + end: isSet(object.end) ? globalThis.Number(object.end) : 0, + semantic: isSet(object.semantic) ? generatedCodeInfo_Annotation_SemanticFromJSON(object.semantic) : 0, }; }, toJSON(message) { const obj = {}; - if (message.path) { + if (message.path?.length) { obj.path = message.path.map((e) => Math.round(e)); } - else { - obj.path = []; + if (message.sourceFile !== undefined && message.sourceFile !== "") { + obj.sourceFile = message.sourceFile; + } + if (message.begin !== undefined && message.begin !== 0) { + obj.begin = Math.round(message.begin); + } + if (message.end !== undefined && message.end !== 0) { + obj.end = Math.round(message.end); + } + if (message.semantic !== undefined && message.semantic !== 0) { + obj.semantic = generatedCodeInfo_Annotation_SemanticToJSON(message.semantic); } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = Math.round(message.begin)); - message.end !== undefined && (obj.end = Math.round(message.end)); return obj; }, }; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } + return globalThis.Buffer.from(arr).toString("base64"); } function isSet(value) { return value !== null && value !== undefined; diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.js index 159135fe87172a..0ad41519adac65 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.js @@ -1,21 +1,26 @@ "use strict"; -/* eslint-disable */ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.3 +// source: google/protobuf/timestamp.proto Object.defineProperty(exports, "__esModule", { value: true }); exports.Timestamp = void 0; -function createBaseTimestamp() { - return { seconds: "0", nanos: 0 }; -} exports.Timestamp = { fromJSON(object) { return { - seconds: isSet(object.seconds) ? String(object.seconds) : "0", - nanos: isSet(object.nanos) ? Number(object.nanos) : 0, + seconds: isSet(object.seconds) ? globalThis.String(object.seconds) : "0", + nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0, }; }, toJSON(message) { const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = Math.round(message.nanos)); + if (message.seconds !== "0") { + obj.seconds = message.seconds; + } + if (message.nanos !== 0) { + obj.nanos = Math.round(message.nanos); + } return obj; }, }; diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.js index 3773867f5426a3..800d6893f43487 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.js @@ -1,35 +1,31 @@ "use strict"; +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.3 +// source: sigstore_bundle.proto Object.defineProperty(exports, "__esModule", { value: true }); exports.Bundle = exports.VerificationMaterial = exports.TimestampVerificationData = void 0; /* eslint-disable */ const envelope_1 = require("./envelope"); const sigstore_common_1 = require("./sigstore_common"); const sigstore_rekor_1 = require("./sigstore_rekor"); -function createBaseTimestampVerificationData() { - return { rfc3161Timestamps: [] }; -} exports.TimestampVerificationData = { fromJSON(object) { return { - rfc3161Timestamps: Array.isArray(object?.rfc3161Timestamps) + rfc3161Timestamps: globalThis.Array.isArray(object?.rfc3161Timestamps) ? object.rfc3161Timestamps.map((e) => sigstore_common_1.RFC3161SignedTimestamp.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - if (message.rfc3161Timestamps) { - obj.rfc3161Timestamps = message.rfc3161Timestamps.map((e) => e ? sigstore_common_1.RFC3161SignedTimestamp.toJSON(e) : undefined); - } - else { - obj.rfc3161Timestamps = []; + if (message.rfc3161Timestamps?.length) { + obj.rfc3161Timestamps = message.rfc3161Timestamps.map((e) => sigstore_common_1.RFC3161SignedTimestamp.toJSON(e)); } return obj; }, }; -function createBaseVerificationMaterial() { - return { content: undefined, tlogEntries: [], timestampVerificationData: undefined }; -} exports.VerificationMaterial = { fromJSON(object) { return { @@ -43,7 +39,7 @@ exports.VerificationMaterial = { : isSet(object.certificate) ? { $case: "certificate", certificate: sigstore_common_1.X509Certificate.fromJSON(object.certificate) } : undefined, - tlogEntries: Array.isArray(object?.tlogEntries) + tlogEntries: globalThis.Array.isArray(object?.tlogEntries) ? object.tlogEntries.map((e) => sigstore_rekor_1.TransparencyLogEntry.fromJSON(e)) : [], timestampVerificationData: isSet(object.timestampVerificationData) @@ -53,36 +49,28 @@ exports.VerificationMaterial = { }, toJSON(message) { const obj = {}; - message.content?.$case === "publicKey" && - (obj.publicKey = message.content?.publicKey ? sigstore_common_1.PublicKeyIdentifier.toJSON(message.content?.publicKey) : undefined); - message.content?.$case === "x509CertificateChain" && - (obj.x509CertificateChain = message.content?.x509CertificateChain - ? sigstore_common_1.X509CertificateChain.toJSON(message.content?.x509CertificateChain) - : undefined); - message.content?.$case === "certificate" && - (obj.certificate = message.content?.certificate - ? sigstore_common_1.X509Certificate.toJSON(message.content?.certificate) - : undefined); - if (message.tlogEntries) { - obj.tlogEntries = message.tlogEntries.map((e) => e ? sigstore_rekor_1.TransparencyLogEntry.toJSON(e) : undefined); + if (message.content?.$case === "publicKey") { + obj.publicKey = sigstore_common_1.PublicKeyIdentifier.toJSON(message.content.publicKey); + } + else if (message.content?.$case === "x509CertificateChain") { + obj.x509CertificateChain = sigstore_common_1.X509CertificateChain.toJSON(message.content.x509CertificateChain); + } + else if (message.content?.$case === "certificate") { + obj.certificate = sigstore_common_1.X509Certificate.toJSON(message.content.certificate); + } + if (message.tlogEntries?.length) { + obj.tlogEntries = message.tlogEntries.map((e) => sigstore_rekor_1.TransparencyLogEntry.toJSON(e)); } - else { - obj.tlogEntries = []; + if (message.timestampVerificationData !== undefined) { + obj.timestampVerificationData = exports.TimestampVerificationData.toJSON(message.timestampVerificationData); } - message.timestampVerificationData !== undefined && - (obj.timestampVerificationData = message.timestampVerificationData - ? exports.TimestampVerificationData.toJSON(message.timestampVerificationData) - : undefined); return obj; }, }; -function createBaseBundle() { - return { mediaType: "", verificationMaterial: undefined, content: undefined }; -} exports.Bundle = { fromJSON(object) { return { - mediaType: isSet(object.mediaType) ? String(object.mediaType) : "", + mediaType: isSet(object.mediaType) ? globalThis.String(object.mediaType) : "", verificationMaterial: isSet(object.verificationMaterial) ? exports.VerificationMaterial.fromJSON(object.verificationMaterial) : undefined, @@ -95,15 +83,18 @@ exports.Bundle = { }, toJSON(message) { const obj = {}; - message.mediaType !== undefined && (obj.mediaType = message.mediaType); - message.verificationMaterial !== undefined && (obj.verificationMaterial = message.verificationMaterial - ? exports.VerificationMaterial.toJSON(message.verificationMaterial) - : undefined); - message.content?.$case === "messageSignature" && (obj.messageSignature = message.content?.messageSignature - ? sigstore_common_1.MessageSignature.toJSON(message.content?.messageSignature) - : undefined); - message.content?.$case === "dsseEnvelope" && - (obj.dsseEnvelope = message.content?.dsseEnvelope ? envelope_1.Envelope.toJSON(message.content?.dsseEnvelope) : undefined); + if (message.mediaType !== "") { + obj.mediaType = message.mediaType; + } + if (message.verificationMaterial !== undefined) { + obj.verificationMaterial = exports.VerificationMaterial.toJSON(message.verificationMaterial); + } + if (message.content?.$case === "messageSignature") { + obj.messageSignature = sigstore_common_1.MessageSignature.toJSON(message.content.messageSignature); + } + else if (message.content?.$case === "dsseEnvelope") { + obj.dsseEnvelope = envelope_1.Envelope.toJSON(message.content.dsseEnvelope); + } return obj; }, }; diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js index 05697541c11969..a66b6a505e1633 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js @@ -1,4 +1,9 @@ "use strict"; +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.3 +// source: sigstore_common.proto Object.defineProperty(exports, "__esModule", { value: true }); exports.TimeRange = exports.X509CertificateChain = exports.SubjectAlternativeName = exports.X509Certificate = exports.DistinguishedName = exports.ObjectIdentifierValuePair = exports.ObjectIdentifier = exports.PublicKeyIdentifier = exports.PublicKey = exports.RFC3161SignedTimestamp = exports.LogId = exports.MessageSignature = exports.HashOutput = exports.SubjectAlternativeNameType = exports.PublicKeyDetails = exports.HashAlgorithm = void 0; exports.hashAlgorithmFromJSON = hashAlgorithmFromJSON; @@ -48,7 +53,7 @@ function hashAlgorithmFromJSON(object) { case "SHA3_384": return HashAlgorithm.SHA3_384; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum HashAlgorithm"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum HashAlgorithm"); } } function hashAlgorithmToJSON(object) { @@ -66,7 +71,7 @@ function hashAlgorithmToJSON(object) { case HashAlgorithm.SHA3_384: return "SHA3_384"; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum HashAlgorithm"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum HashAlgorithm"); } } /** @@ -205,7 +210,7 @@ function publicKeyDetailsFromJSON(object) { case "LMOTS_SHA256": return PublicKeyDetails.LMOTS_SHA256; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum PublicKeyDetails"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum PublicKeyDetails"); } } function publicKeyDetailsToJSON(object) { @@ -249,7 +254,7 @@ function publicKeyDetailsToJSON(object) { case PublicKeyDetails.LMOTS_SHA256: return "LMOTS_SHA256"; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum PublicKeyDetails"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum PublicKeyDetails"); } } var SubjectAlternativeNameType; @@ -279,7 +284,7 @@ function subjectAlternativeNameTypeFromJSON(object) { case "OTHER_NAME": return SubjectAlternativeNameType.OTHER_NAME; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum SubjectAlternativeNameType"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum SubjectAlternativeNameType"); } } function subjectAlternativeNameTypeToJSON(object) { @@ -293,12 +298,9 @@ function subjectAlternativeNameTypeToJSON(object) { case SubjectAlternativeNameType.OTHER_NAME: return "OTHER_NAME"; default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum SubjectAlternativeNameType"); + throw new globalThis.Error("Unrecognized enum value " + object + " for enum SubjectAlternativeNameType"); } } -function createBaseHashOutput() { - return { algorithm: 0, digest: Buffer.alloc(0) }; -} exports.HashOutput = { fromJSON(object) { return { @@ -308,15 +310,15 @@ exports.HashOutput = { }, toJSON(message) { const obj = {}; - message.algorithm !== undefined && (obj.algorithm = hashAlgorithmToJSON(message.algorithm)); - message.digest !== undefined && - (obj.digest = base64FromBytes(message.digest !== undefined ? message.digest : Buffer.alloc(0))); + if (message.algorithm !== 0) { + obj.algorithm = hashAlgorithmToJSON(message.algorithm); + } + if (message.digest.length !== 0) { + obj.digest = base64FromBytes(message.digest); + } return obj; }, }; -function createBaseMessageSignature() { - return { messageDigest: undefined, signature: Buffer.alloc(0) }; -} exports.MessageSignature = { fromJSON(object) { return { @@ -326,30 +328,27 @@ exports.MessageSignature = { }, toJSON(message) { const obj = {}; - message.messageDigest !== undefined && - (obj.messageDigest = message.messageDigest ? exports.HashOutput.toJSON(message.messageDigest) : undefined); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : Buffer.alloc(0))); + if (message.messageDigest !== undefined) { + obj.messageDigest = exports.HashOutput.toJSON(message.messageDigest); + } + if (message.signature.length !== 0) { + obj.signature = base64FromBytes(message.signature); + } return obj; }, }; -function createBaseLogId() { - return { keyId: Buffer.alloc(0) }; -} exports.LogId = { fromJSON(object) { return { keyId: isSet(object.keyId) ? Buffer.from(bytesFromBase64(object.keyId)) : Buffer.alloc(0) }; }, toJSON(message) { const obj = {}; - message.keyId !== undefined && - (obj.keyId = base64FromBytes(message.keyId !== undefined ? message.keyId : Buffer.alloc(0))); + if (message.keyId.length !== 0) { + obj.keyId = base64FromBytes(message.keyId); + } return obj; }, }; -function createBaseRFC3161SignedTimestamp() { - return { signedTimestamp: Buffer.alloc(0) }; -} exports.RFC3161SignedTimestamp = { fromJSON(object) { return { @@ -360,14 +359,12 @@ exports.RFC3161SignedTimestamp = { }, toJSON(message) { const obj = {}; - message.signedTimestamp !== undefined && - (obj.signedTimestamp = base64FromBytes(message.signedTimestamp !== undefined ? message.signedTimestamp : Buffer.alloc(0))); + if (message.signedTimestamp.length !== 0) { + obj.signedTimestamp = base64FromBytes(message.signedTimestamp); + } return obj; }, }; -function createBasePublicKey() { - return { rawBytes: undefined, keyDetails: 0, validFor: undefined }; -} exports.PublicKey = { fromJSON(object) { return { @@ -378,48 +375,42 @@ exports.PublicKey = { }, toJSON(message) { const obj = {}; - message.rawBytes !== undefined && - (obj.rawBytes = message.rawBytes !== undefined ? base64FromBytes(message.rawBytes) : undefined); - message.keyDetails !== undefined && (obj.keyDetails = publicKeyDetailsToJSON(message.keyDetails)); - message.validFor !== undefined && - (obj.validFor = message.validFor ? exports.TimeRange.toJSON(message.validFor) : undefined); + if (message.rawBytes !== undefined) { + obj.rawBytes = base64FromBytes(message.rawBytes); + } + if (message.keyDetails !== 0) { + obj.keyDetails = publicKeyDetailsToJSON(message.keyDetails); + } + if (message.validFor !== undefined) { + obj.validFor = exports.TimeRange.toJSON(message.validFor); + } return obj; }, }; -function createBasePublicKeyIdentifier() { - return { hint: "" }; -} exports.PublicKeyIdentifier = { fromJSON(object) { - return { hint: isSet(object.hint) ? String(object.hint) : "" }; + return { hint: isSet(object.hint) ? globalThis.String(object.hint) : "" }; }, toJSON(message) { const obj = {}; - message.hint !== undefined && (obj.hint = message.hint); + if (message.hint !== "") { + obj.hint = message.hint; + } return obj; }, }; -function createBaseObjectIdentifier() { - return { id: [] }; -} exports.ObjectIdentifier = { fromJSON(object) { - return { id: Array.isArray(object?.id) ? object.id.map((e) => Number(e)) : [] }; + return { id: globalThis.Array.isArray(object?.id) ? object.id.map((e) => globalThis.Number(e)) : [] }; }, toJSON(message) { const obj = {}; - if (message.id) { + if (message.id?.length) { obj.id = message.id.map((e) => Math.round(e)); } - else { - obj.id = []; - } return obj; }, }; -function createBaseObjectIdentifierValuePair() { - return { oid: undefined, value: Buffer.alloc(0) }; -} exports.ObjectIdentifierValuePair = { fromJSON(object) { return { @@ -429,90 +420,86 @@ exports.ObjectIdentifierValuePair = { }, toJSON(message) { const obj = {}; - message.oid !== undefined && (obj.oid = message.oid ? exports.ObjectIdentifier.toJSON(message.oid) : undefined); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : Buffer.alloc(0))); + if (message.oid !== undefined) { + obj.oid = exports.ObjectIdentifier.toJSON(message.oid); + } + if (message.value.length !== 0) { + obj.value = base64FromBytes(message.value); + } return obj; }, }; -function createBaseDistinguishedName() { - return { organization: "", commonName: "" }; -} exports.DistinguishedName = { fromJSON(object) { return { - organization: isSet(object.organization) ? String(object.organization) : "", - commonName: isSet(object.commonName) ? String(object.commonName) : "", + organization: isSet(object.organization) ? globalThis.String(object.organization) : "", + commonName: isSet(object.commonName) ? globalThis.String(object.commonName) : "", }; }, toJSON(message) { const obj = {}; - message.organization !== undefined && (obj.organization = message.organization); - message.commonName !== undefined && (obj.commonName = message.commonName); + if (message.organization !== "") { + obj.organization = message.organization; + } + if (message.commonName !== "") { + obj.commonName = message.commonName; + } return obj; }, }; -function createBaseX509Certificate() { - return { rawBytes: Buffer.alloc(0) }; -} exports.X509Certificate = { fromJSON(object) { return { rawBytes: isSet(object.rawBytes) ? Buffer.from(bytesFromBase64(object.rawBytes)) : Buffer.alloc(0) }; }, toJSON(message) { const obj = {}; - message.rawBytes !== undefined && - (obj.rawBytes = base64FromBytes(message.rawBytes !== undefined ? message.rawBytes : Buffer.alloc(0))); + if (message.rawBytes.length !== 0) { + obj.rawBytes = base64FromBytes(message.rawBytes); + } return obj; }, }; -function createBaseSubjectAlternativeName() { - return { type: 0, identity: undefined }; -} exports.SubjectAlternativeName = { fromJSON(object) { return { type: isSet(object.type) ? subjectAlternativeNameTypeFromJSON(object.type) : 0, identity: isSet(object.regexp) - ? { $case: "regexp", regexp: String(object.regexp) } + ? { $case: "regexp", regexp: globalThis.String(object.regexp) } : isSet(object.value) - ? { $case: "value", value: String(object.value) } + ? { $case: "value", value: globalThis.String(object.value) } : undefined, }; }, toJSON(message) { const obj = {}; - message.type !== undefined && (obj.type = subjectAlternativeNameTypeToJSON(message.type)); - message.identity?.$case === "regexp" && (obj.regexp = message.identity?.regexp); - message.identity?.$case === "value" && (obj.value = message.identity?.value); + if (message.type !== 0) { + obj.type = subjectAlternativeNameTypeToJSON(message.type); + } + if (message.identity?.$case === "regexp") { + obj.regexp = message.identity.regexp; + } + else if (message.identity?.$case === "value") { + obj.value = message.identity.value; + } return obj; }, }; -function createBaseX509CertificateChain() { - return { certificates: [] }; -} exports.X509CertificateChain = { fromJSON(object) { return { - certificates: Array.isArray(object?.certificates) + certificates: globalThis.Array.isArray(object?.certificates) ? object.certificates.map((e) => exports.X509Certificate.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - if (message.certificates) { - obj.certificates = message.certificates.map((e) => e ? exports.X509Certificate.toJSON(e) : undefined); - } - else { - obj.certificates = []; + if (message.certificates?.length) { + obj.certificates = message.certificates.map((e) => exports.X509Certificate.toJSON(e)); } return obj; }, }; -function createBaseTimeRange() { - return { start: undefined, end: undefined }; -} exports.TimeRange = { fromJSON(object) { return { @@ -522,62 +509,32 @@ exports.TimeRange = { }, toJSON(message) { const obj = {}; - message.start !== undefined && (obj.start = message.start.toISOString()); - message.end !== undefined && (obj.end = message.end.toISOString()); + if (message.start !== undefined) { + obj.start = message.start.toISOString(); + } + if (message.end !== undefined) { + obj.end = message.end.toISOString(); + } return obj; }, }; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } + return globalThis.Buffer.from(arr).toString("base64"); } function fromTimestamp(t) { - let millis = Number(t.seconds) * 1_000; - millis += t.nanos / 1_000_000; - return new Date(millis); + let millis = (globalThis.Number(t.seconds) || 0) * 1_000; + millis += (t.nanos || 0) / 1_000_000; + return new globalThis.Date(millis); } function fromJsonTimestamp(o) { - if (o instanceof Date) { + if (o instanceof globalThis.Date) { return o; } else if (typeof o === "string") { - return new Date(o); + return new globalThis.Date(o); } else { return fromTimestamp(timestamp_1.Timestamp.fromJSON(o)); diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.js index 398193b2075a70..a9efb0cd796afd 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.js @@ -1,71 +1,75 @@ "use strict"; +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.3 +// source: sigstore_rekor.proto Object.defineProperty(exports, "__esModule", { value: true }); exports.TransparencyLogEntry = exports.InclusionPromise = exports.InclusionProof = exports.Checkpoint = exports.KindVersion = void 0; /* eslint-disable */ const sigstore_common_1 = require("./sigstore_common"); -function createBaseKindVersion() { - return { kind: "", version: "" }; -} exports.KindVersion = { fromJSON(object) { return { - kind: isSet(object.kind) ? String(object.kind) : "", - version: isSet(object.version) ? String(object.version) : "", + kind: isSet(object.kind) ? globalThis.String(object.kind) : "", + version: isSet(object.version) ? globalThis.String(object.version) : "", }; }, toJSON(message) { const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.version !== undefined && (obj.version = message.version); + if (message.kind !== "") { + obj.kind = message.kind; + } + if (message.version !== "") { + obj.version = message.version; + } return obj; }, }; -function createBaseCheckpoint() { - return { envelope: "" }; -} exports.Checkpoint = { fromJSON(object) { - return { envelope: isSet(object.envelope) ? String(object.envelope) : "" }; + return { envelope: isSet(object.envelope) ? globalThis.String(object.envelope) : "" }; }, toJSON(message) { const obj = {}; - message.envelope !== undefined && (obj.envelope = message.envelope); + if (message.envelope !== "") { + obj.envelope = message.envelope; + } return obj; }, }; -function createBaseInclusionProof() { - return { logIndex: "0", rootHash: Buffer.alloc(0), treeSize: "0", hashes: [], checkpoint: undefined }; -} exports.InclusionProof = { fromJSON(object) { return { - logIndex: isSet(object.logIndex) ? String(object.logIndex) : "0", + logIndex: isSet(object.logIndex) ? globalThis.String(object.logIndex) : "0", rootHash: isSet(object.rootHash) ? Buffer.from(bytesFromBase64(object.rootHash)) : Buffer.alloc(0), - treeSize: isSet(object.treeSize) ? String(object.treeSize) : "0", - hashes: Array.isArray(object?.hashes) ? object.hashes.map((e) => Buffer.from(bytesFromBase64(e))) : [], + treeSize: isSet(object.treeSize) ? globalThis.String(object.treeSize) : "0", + hashes: globalThis.Array.isArray(object?.hashes) + ? object.hashes.map((e) => Buffer.from(bytesFromBase64(e))) + : [], checkpoint: isSet(object.checkpoint) ? exports.Checkpoint.fromJSON(object.checkpoint) : undefined, }; }, toJSON(message) { const obj = {}; - message.logIndex !== undefined && (obj.logIndex = message.logIndex); - message.rootHash !== undefined && - (obj.rootHash = base64FromBytes(message.rootHash !== undefined ? message.rootHash : Buffer.alloc(0))); - message.treeSize !== undefined && (obj.treeSize = message.treeSize); - if (message.hashes) { - obj.hashes = message.hashes.map((e) => base64FromBytes(e !== undefined ? e : Buffer.alloc(0))); - } - else { - obj.hashes = []; - } - message.checkpoint !== undefined && - (obj.checkpoint = message.checkpoint ? exports.Checkpoint.toJSON(message.checkpoint) : undefined); + if (message.logIndex !== "0") { + obj.logIndex = message.logIndex; + } + if (message.rootHash.length !== 0) { + obj.rootHash = base64FromBytes(message.rootHash); + } + if (message.treeSize !== "0") { + obj.treeSize = message.treeSize; + } + if (message.hashes?.length) { + obj.hashes = message.hashes.map((e) => base64FromBytes(e)); + } + if (message.checkpoint !== undefined) { + obj.checkpoint = exports.Checkpoint.toJSON(message.checkpoint); + } return obj; }, }; -function createBaseInclusionPromise() { - return { signedEntryTimestamp: Buffer.alloc(0) }; -} exports.InclusionPromise = { fromJSON(object) { return { @@ -76,29 +80,19 @@ exports.InclusionPromise = { }, toJSON(message) { const obj = {}; - message.signedEntryTimestamp !== undefined && - (obj.signedEntryTimestamp = base64FromBytes(message.signedEntryTimestamp !== undefined ? message.signedEntryTimestamp : Buffer.alloc(0))); + if (message.signedEntryTimestamp.length !== 0) { + obj.signedEntryTimestamp = base64FromBytes(message.signedEntryTimestamp); + } return obj; }, }; -function createBaseTransparencyLogEntry() { - return { - logIndex: "0", - logId: undefined, - kindVersion: undefined, - integratedTime: "0", - inclusionPromise: undefined, - inclusionProof: undefined, - canonicalizedBody: Buffer.alloc(0), - }; -} exports.TransparencyLogEntry = { fromJSON(object) { return { - logIndex: isSet(object.logIndex) ? String(object.logIndex) : "0", + logIndex: isSet(object.logIndex) ? globalThis.String(object.logIndex) : "0", logId: isSet(object.logId) ? sigstore_common_1.LogId.fromJSON(object.logId) : undefined, kindVersion: isSet(object.kindVersion) ? exports.KindVersion.fromJSON(object.kindVersion) : undefined, - integratedTime: isSet(object.integratedTime) ? String(object.integratedTime) : "0", + integratedTime: isSet(object.integratedTime) ? globalThis.String(object.integratedTime) : "0", inclusionPromise: isSet(object.inclusionPromise) ? exports.InclusionPromise.fromJSON(object.inclusionPromise) : undefined, inclusionProof: isSet(object.inclusionProof) ? exports.InclusionProof.fromJSON(object.inclusionProof) : undefined, canonicalizedBody: isSet(object.canonicalizedBody) @@ -108,59 +102,35 @@ exports.TransparencyLogEntry = { }, toJSON(message) { const obj = {}; - message.logIndex !== undefined && (obj.logIndex = message.logIndex); - message.logId !== undefined && (obj.logId = message.logId ? sigstore_common_1.LogId.toJSON(message.logId) : undefined); - message.kindVersion !== undefined && - (obj.kindVersion = message.kindVersion ? exports.KindVersion.toJSON(message.kindVersion) : undefined); - message.integratedTime !== undefined && (obj.integratedTime = message.integratedTime); - message.inclusionPromise !== undefined && - (obj.inclusionPromise = message.inclusionPromise ? exports.InclusionPromise.toJSON(message.inclusionPromise) : undefined); - message.inclusionProof !== undefined && - (obj.inclusionProof = message.inclusionProof ? exports.InclusionProof.toJSON(message.inclusionProof) : undefined); - message.canonicalizedBody !== undefined && - (obj.canonicalizedBody = base64FromBytes(message.canonicalizedBody !== undefined ? message.canonicalizedBody : Buffer.alloc(0))); + if (message.logIndex !== "0") { + obj.logIndex = message.logIndex; + } + if (message.logId !== undefined) { + obj.logId = sigstore_common_1.LogId.toJSON(message.logId); + } + if (message.kindVersion !== undefined) { + obj.kindVersion = exports.KindVersion.toJSON(message.kindVersion); + } + if (message.integratedTime !== "0") { + obj.integratedTime = message.integratedTime; + } + if (message.inclusionPromise !== undefined) { + obj.inclusionPromise = exports.InclusionPromise.toJSON(message.inclusionPromise); + } + if (message.inclusionProof !== undefined) { + obj.inclusionProof = exports.InclusionProof.toJSON(message.inclusionProof); + } + if (message.canonicalizedBody.length !== 0) { + obj.canonicalizedBody = base64FromBytes(message.canonicalizedBody); + } return obj; }, }; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } + return globalThis.Buffer.from(arr).toString("base64"); } function isSet(value) { return value !== null && value !== undefined; diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js index a507d4dba590d2..c8a278f3b50570 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js @@ -1,15 +1,17 @@ "use strict"; +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.3 +// source: sigstore_trustroot.proto Object.defineProperty(exports, "__esModule", { value: true }); exports.ClientTrustConfig = exports.SigningConfig = exports.TrustedRoot = exports.CertificateAuthority = exports.TransparencyLogInstance = void 0; /* eslint-disable */ const sigstore_common_1 = require("./sigstore_common"); -function createBaseTransparencyLogInstance() { - return { baseUrl: "", hashAlgorithm: 0, publicKey: undefined, logId: undefined, checkpointKeyId: undefined }; -} exports.TransparencyLogInstance = { fromJSON(object) { return { - baseUrl: isSet(object.baseUrl) ? String(object.baseUrl) : "", + baseUrl: isSet(object.baseUrl) ? globalThis.String(object.baseUrl) : "", hashAlgorithm: isSet(object.hashAlgorithm) ? (0, sigstore_common_1.hashAlgorithmFromJSON)(object.hashAlgorithm) : 0, publicKey: isSet(object.publicKey) ? sigstore_common_1.PublicKey.fromJSON(object.publicKey) : undefined, logId: isSet(object.logId) ? sigstore_common_1.LogId.fromJSON(object.logId) : undefined, @@ -18,140 +20,137 @@ exports.TransparencyLogInstance = { }, toJSON(message) { const obj = {}; - message.baseUrl !== undefined && (obj.baseUrl = message.baseUrl); - message.hashAlgorithm !== undefined && (obj.hashAlgorithm = (0, sigstore_common_1.hashAlgorithmToJSON)(message.hashAlgorithm)); - message.publicKey !== undefined && - (obj.publicKey = message.publicKey ? sigstore_common_1.PublicKey.toJSON(message.publicKey) : undefined); - message.logId !== undefined && (obj.logId = message.logId ? sigstore_common_1.LogId.toJSON(message.logId) : undefined); - message.checkpointKeyId !== undefined && - (obj.checkpointKeyId = message.checkpointKeyId ? sigstore_common_1.LogId.toJSON(message.checkpointKeyId) : undefined); + if (message.baseUrl !== "") { + obj.baseUrl = message.baseUrl; + } + if (message.hashAlgorithm !== 0) { + obj.hashAlgorithm = (0, sigstore_common_1.hashAlgorithmToJSON)(message.hashAlgorithm); + } + if (message.publicKey !== undefined) { + obj.publicKey = sigstore_common_1.PublicKey.toJSON(message.publicKey); + } + if (message.logId !== undefined) { + obj.logId = sigstore_common_1.LogId.toJSON(message.logId); + } + if (message.checkpointKeyId !== undefined) { + obj.checkpointKeyId = sigstore_common_1.LogId.toJSON(message.checkpointKeyId); + } return obj; }, }; -function createBaseCertificateAuthority() { - return { subject: undefined, uri: "", certChain: undefined, validFor: undefined }; -} exports.CertificateAuthority = { fromJSON(object) { return { subject: isSet(object.subject) ? sigstore_common_1.DistinguishedName.fromJSON(object.subject) : undefined, - uri: isSet(object.uri) ? String(object.uri) : "", + uri: isSet(object.uri) ? globalThis.String(object.uri) : "", certChain: isSet(object.certChain) ? sigstore_common_1.X509CertificateChain.fromJSON(object.certChain) : undefined, validFor: isSet(object.validFor) ? sigstore_common_1.TimeRange.fromJSON(object.validFor) : undefined, }; }, toJSON(message) { const obj = {}; - message.subject !== undefined && - (obj.subject = message.subject ? sigstore_common_1.DistinguishedName.toJSON(message.subject) : undefined); - message.uri !== undefined && (obj.uri = message.uri); - message.certChain !== undefined && - (obj.certChain = message.certChain ? sigstore_common_1.X509CertificateChain.toJSON(message.certChain) : undefined); - message.validFor !== undefined && - (obj.validFor = message.validFor ? sigstore_common_1.TimeRange.toJSON(message.validFor) : undefined); + if (message.subject !== undefined) { + obj.subject = sigstore_common_1.DistinguishedName.toJSON(message.subject); + } + if (message.uri !== "") { + obj.uri = message.uri; + } + if (message.certChain !== undefined) { + obj.certChain = sigstore_common_1.X509CertificateChain.toJSON(message.certChain); + } + if (message.validFor !== undefined) { + obj.validFor = sigstore_common_1.TimeRange.toJSON(message.validFor); + } return obj; }, }; -function createBaseTrustedRoot() { - return { mediaType: "", tlogs: [], certificateAuthorities: [], ctlogs: [], timestampAuthorities: [] }; -} exports.TrustedRoot = { fromJSON(object) { return { - mediaType: isSet(object.mediaType) ? String(object.mediaType) : "", - tlogs: Array.isArray(object?.tlogs) ? object.tlogs.map((e) => exports.TransparencyLogInstance.fromJSON(e)) : [], - certificateAuthorities: Array.isArray(object?.certificateAuthorities) + mediaType: isSet(object.mediaType) ? globalThis.String(object.mediaType) : "", + tlogs: globalThis.Array.isArray(object?.tlogs) + ? object.tlogs.map((e) => exports.TransparencyLogInstance.fromJSON(e)) + : [], + certificateAuthorities: globalThis.Array.isArray(object?.certificateAuthorities) ? object.certificateAuthorities.map((e) => exports.CertificateAuthority.fromJSON(e)) : [], - ctlogs: Array.isArray(object?.ctlogs) + ctlogs: globalThis.Array.isArray(object?.ctlogs) ? object.ctlogs.map((e) => exports.TransparencyLogInstance.fromJSON(e)) : [], - timestampAuthorities: Array.isArray(object?.timestampAuthorities) + timestampAuthorities: globalThis.Array.isArray(object?.timestampAuthorities) ? object.timestampAuthorities.map((e) => exports.CertificateAuthority.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - message.mediaType !== undefined && (obj.mediaType = message.mediaType); - if (message.tlogs) { - obj.tlogs = message.tlogs.map((e) => e ? exports.TransparencyLogInstance.toJSON(e) : undefined); - } - else { - obj.tlogs = []; + if (message.mediaType !== "") { + obj.mediaType = message.mediaType; } - if (message.certificateAuthorities) { - obj.certificateAuthorities = message.certificateAuthorities.map((e) => e ? exports.CertificateAuthority.toJSON(e) : undefined); + if (message.tlogs?.length) { + obj.tlogs = message.tlogs.map((e) => exports.TransparencyLogInstance.toJSON(e)); } - else { - obj.certificateAuthorities = []; + if (message.certificateAuthorities?.length) { + obj.certificateAuthorities = message.certificateAuthorities.map((e) => exports.CertificateAuthority.toJSON(e)); } - if (message.ctlogs) { - obj.ctlogs = message.ctlogs.map((e) => e ? exports.TransparencyLogInstance.toJSON(e) : undefined); + if (message.ctlogs?.length) { + obj.ctlogs = message.ctlogs.map((e) => exports.TransparencyLogInstance.toJSON(e)); } - else { - obj.ctlogs = []; - } - if (message.timestampAuthorities) { - obj.timestampAuthorities = message.timestampAuthorities.map((e) => e ? exports.CertificateAuthority.toJSON(e) : undefined); - } - else { - obj.timestampAuthorities = []; + if (message.timestampAuthorities?.length) { + obj.timestampAuthorities = message.timestampAuthorities.map((e) => exports.CertificateAuthority.toJSON(e)); } return obj; }, }; -function createBaseSigningConfig() { - return { mediaType: "", caUrl: "", oidcUrl: "", tlogUrls: [], tsaUrls: [] }; -} exports.SigningConfig = { fromJSON(object) { return { - mediaType: isSet(object.mediaType) ? String(object.mediaType) : "", - caUrl: isSet(object.caUrl) ? String(object.caUrl) : "", - oidcUrl: isSet(object.oidcUrl) ? String(object.oidcUrl) : "", - tlogUrls: Array.isArray(object?.tlogUrls) ? object.tlogUrls.map((e) => String(e)) : [], - tsaUrls: Array.isArray(object?.tsaUrls) ? object.tsaUrls.map((e) => String(e)) : [], + mediaType: isSet(object.mediaType) ? globalThis.String(object.mediaType) : "", + caUrl: isSet(object.caUrl) ? globalThis.String(object.caUrl) : "", + oidcUrl: isSet(object.oidcUrl) ? globalThis.String(object.oidcUrl) : "", + tlogUrls: globalThis.Array.isArray(object?.tlogUrls) ? object.tlogUrls.map((e) => globalThis.String(e)) : [], + tsaUrls: globalThis.Array.isArray(object?.tsaUrls) ? object.tsaUrls.map((e) => globalThis.String(e)) : [], }; }, toJSON(message) { const obj = {}; - message.mediaType !== undefined && (obj.mediaType = message.mediaType); - message.caUrl !== undefined && (obj.caUrl = message.caUrl); - message.oidcUrl !== undefined && (obj.oidcUrl = message.oidcUrl); - if (message.tlogUrls) { - obj.tlogUrls = message.tlogUrls.map((e) => e); + if (message.mediaType !== "") { + obj.mediaType = message.mediaType; } - else { - obj.tlogUrls = []; + if (message.caUrl !== "") { + obj.caUrl = message.caUrl; } - if (message.tsaUrls) { - obj.tsaUrls = message.tsaUrls.map((e) => e); + if (message.oidcUrl !== "") { + obj.oidcUrl = message.oidcUrl; } - else { - obj.tsaUrls = []; + if (message.tlogUrls?.length) { + obj.tlogUrls = message.tlogUrls; + } + if (message.tsaUrls?.length) { + obj.tsaUrls = message.tsaUrls; } return obj; }, }; -function createBaseClientTrustConfig() { - return { mediaType: "", trustedRoot: undefined, signingConfig: undefined }; -} exports.ClientTrustConfig = { fromJSON(object) { return { - mediaType: isSet(object.mediaType) ? String(object.mediaType) : "", + mediaType: isSet(object.mediaType) ? globalThis.String(object.mediaType) : "", trustedRoot: isSet(object.trustedRoot) ? exports.TrustedRoot.fromJSON(object.trustedRoot) : undefined, signingConfig: isSet(object.signingConfig) ? exports.SigningConfig.fromJSON(object.signingConfig) : undefined, }; }, toJSON(message) { const obj = {}; - message.mediaType !== undefined && (obj.mediaType = message.mediaType); - message.trustedRoot !== undefined && - (obj.trustedRoot = message.trustedRoot ? exports.TrustedRoot.toJSON(message.trustedRoot) : undefined); - message.signingConfig !== undefined && - (obj.signingConfig = message.signingConfig ? exports.SigningConfig.toJSON(message.signingConfig) : undefined); + if (message.mediaType !== "") { + obj.mediaType = message.mediaType; + } + if (message.trustedRoot !== undefined) { + obj.trustedRoot = exports.TrustedRoot.toJSON(message.trustedRoot); + } + if (message.signingConfig !== undefined) { + obj.signingConfig = exports.SigningConfig.toJSON(message.signingConfig); + } return obj; }, }; diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js index 222686bbf30448..6ba91b088a4ede 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js @@ -1,86 +1,71 @@ "use strict"; +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.3 +// source: sigstore_verification.proto Object.defineProperty(exports, "__esModule", { value: true }); exports.Input = exports.Artifact = exports.ArtifactVerificationOptions_ObserverTimestampOptions = exports.ArtifactVerificationOptions_TlogIntegratedTimestampOptions = exports.ArtifactVerificationOptions_TimestampAuthorityOptions = exports.ArtifactVerificationOptions_CtlogOptions = exports.ArtifactVerificationOptions_TlogOptions = exports.ArtifactVerificationOptions = exports.PublicKeyIdentities = exports.CertificateIdentities = exports.CertificateIdentity = void 0; /* eslint-disable */ const sigstore_bundle_1 = require("./sigstore_bundle"); const sigstore_common_1 = require("./sigstore_common"); const sigstore_trustroot_1 = require("./sigstore_trustroot"); -function createBaseCertificateIdentity() { - return { issuer: "", san: undefined, oids: [] }; -} exports.CertificateIdentity = { fromJSON(object) { return { - issuer: isSet(object.issuer) ? String(object.issuer) : "", + issuer: isSet(object.issuer) ? globalThis.String(object.issuer) : "", san: isSet(object.san) ? sigstore_common_1.SubjectAlternativeName.fromJSON(object.san) : undefined, - oids: Array.isArray(object?.oids) ? object.oids.map((e) => sigstore_common_1.ObjectIdentifierValuePair.fromJSON(e)) : [], + oids: globalThis.Array.isArray(object?.oids) + ? object.oids.map((e) => sigstore_common_1.ObjectIdentifierValuePair.fromJSON(e)) + : [], }; }, toJSON(message) { const obj = {}; - message.issuer !== undefined && (obj.issuer = message.issuer); - message.san !== undefined && (obj.san = message.san ? sigstore_common_1.SubjectAlternativeName.toJSON(message.san) : undefined); - if (message.oids) { - obj.oids = message.oids.map((e) => e ? sigstore_common_1.ObjectIdentifierValuePair.toJSON(e) : undefined); + if (message.issuer !== "") { + obj.issuer = message.issuer; + } + if (message.san !== undefined) { + obj.san = sigstore_common_1.SubjectAlternativeName.toJSON(message.san); } - else { - obj.oids = []; + if (message.oids?.length) { + obj.oids = message.oids.map((e) => sigstore_common_1.ObjectIdentifierValuePair.toJSON(e)); } return obj; }, }; -function createBaseCertificateIdentities() { - return { identities: [] }; -} exports.CertificateIdentities = { fromJSON(object) { return { - identities: Array.isArray(object?.identities) + identities: globalThis.Array.isArray(object?.identities) ? object.identities.map((e) => exports.CertificateIdentity.fromJSON(e)) : [], }; }, toJSON(message) { const obj = {}; - if (message.identities) { - obj.identities = message.identities.map((e) => e ? exports.CertificateIdentity.toJSON(e) : undefined); - } - else { - obj.identities = []; + if (message.identities?.length) { + obj.identities = message.identities.map((e) => exports.CertificateIdentity.toJSON(e)); } return obj; }, }; -function createBasePublicKeyIdentities() { - return { publicKeys: [] }; -} exports.PublicKeyIdentities = { fromJSON(object) { return { - publicKeys: Array.isArray(object?.publicKeys) ? object.publicKeys.map((e) => sigstore_common_1.PublicKey.fromJSON(e)) : [], + publicKeys: globalThis.Array.isArray(object?.publicKeys) + ? object.publicKeys.map((e) => sigstore_common_1.PublicKey.fromJSON(e)) + : [], }; }, toJSON(message) { const obj = {}; - if (message.publicKeys) { - obj.publicKeys = message.publicKeys.map((e) => e ? sigstore_common_1.PublicKey.toJSON(e) : undefined); - } - else { - obj.publicKeys = []; + if (message.publicKeys?.length) { + obj.publicKeys = message.publicKeys.map((e) => sigstore_common_1.PublicKey.toJSON(e)); } return obj; }, }; -function createBaseArtifactVerificationOptions() { - return { - signers: undefined, - tlogOptions: undefined, - ctlogOptions: undefined, - tsaOptions: undefined, - integratedTsOptions: undefined, - observerOptions: undefined, - }; -} exports.ArtifactVerificationOptions = { fromJSON(object) { return { @@ -111,129 +96,131 @@ exports.ArtifactVerificationOptions = { }, toJSON(message) { const obj = {}; - message.signers?.$case === "certificateIdentities" && - (obj.certificateIdentities = message.signers?.certificateIdentities - ? exports.CertificateIdentities.toJSON(message.signers?.certificateIdentities) - : undefined); - message.signers?.$case === "publicKeys" && (obj.publicKeys = message.signers?.publicKeys - ? exports.PublicKeyIdentities.toJSON(message.signers?.publicKeys) - : undefined); - message.tlogOptions !== undefined && (obj.tlogOptions = message.tlogOptions - ? exports.ArtifactVerificationOptions_TlogOptions.toJSON(message.tlogOptions) - : undefined); - message.ctlogOptions !== undefined && (obj.ctlogOptions = message.ctlogOptions - ? exports.ArtifactVerificationOptions_CtlogOptions.toJSON(message.ctlogOptions) - : undefined); - message.tsaOptions !== undefined && (obj.tsaOptions = message.tsaOptions - ? exports.ArtifactVerificationOptions_TimestampAuthorityOptions.toJSON(message.tsaOptions) - : undefined); - message.integratedTsOptions !== undefined && (obj.integratedTsOptions = message.integratedTsOptions - ? exports.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.toJSON(message.integratedTsOptions) - : undefined); - message.observerOptions !== undefined && (obj.observerOptions = message.observerOptions - ? exports.ArtifactVerificationOptions_ObserverTimestampOptions.toJSON(message.observerOptions) - : undefined); + if (message.signers?.$case === "certificateIdentities") { + obj.certificateIdentities = exports.CertificateIdentities.toJSON(message.signers.certificateIdentities); + } + else if (message.signers?.$case === "publicKeys") { + obj.publicKeys = exports.PublicKeyIdentities.toJSON(message.signers.publicKeys); + } + if (message.tlogOptions !== undefined) { + obj.tlogOptions = exports.ArtifactVerificationOptions_TlogOptions.toJSON(message.tlogOptions); + } + if (message.ctlogOptions !== undefined) { + obj.ctlogOptions = exports.ArtifactVerificationOptions_CtlogOptions.toJSON(message.ctlogOptions); + } + if (message.tsaOptions !== undefined) { + obj.tsaOptions = exports.ArtifactVerificationOptions_TimestampAuthorityOptions.toJSON(message.tsaOptions); + } + if (message.integratedTsOptions !== undefined) { + obj.integratedTsOptions = exports.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.toJSON(message.integratedTsOptions); + } + if (message.observerOptions !== undefined) { + obj.observerOptions = exports.ArtifactVerificationOptions_ObserverTimestampOptions.toJSON(message.observerOptions); + } return obj; }, }; -function createBaseArtifactVerificationOptions_TlogOptions() { - return { threshold: 0, performOnlineVerification: false, disable: false }; -} exports.ArtifactVerificationOptions_TlogOptions = { fromJSON(object) { return { - threshold: isSet(object.threshold) ? Number(object.threshold) : 0, + threshold: isSet(object.threshold) ? globalThis.Number(object.threshold) : 0, performOnlineVerification: isSet(object.performOnlineVerification) - ? Boolean(object.performOnlineVerification) + ? globalThis.Boolean(object.performOnlineVerification) : false, - disable: isSet(object.disable) ? Boolean(object.disable) : false, + disable: isSet(object.disable) ? globalThis.Boolean(object.disable) : false, }; }, toJSON(message) { const obj = {}; - message.threshold !== undefined && (obj.threshold = Math.round(message.threshold)); - message.performOnlineVerification !== undefined && - (obj.performOnlineVerification = message.performOnlineVerification); - message.disable !== undefined && (obj.disable = message.disable); + if (message.threshold !== 0) { + obj.threshold = Math.round(message.threshold); + } + if (message.performOnlineVerification !== false) { + obj.performOnlineVerification = message.performOnlineVerification; + } + if (message.disable !== false) { + obj.disable = message.disable; + } return obj; }, }; -function createBaseArtifactVerificationOptions_CtlogOptions() { - return { threshold: 0, disable: false }; -} exports.ArtifactVerificationOptions_CtlogOptions = { fromJSON(object) { return { - threshold: isSet(object.threshold) ? Number(object.threshold) : 0, - disable: isSet(object.disable) ? Boolean(object.disable) : false, + threshold: isSet(object.threshold) ? globalThis.Number(object.threshold) : 0, + disable: isSet(object.disable) ? globalThis.Boolean(object.disable) : false, }; }, toJSON(message) { const obj = {}; - message.threshold !== undefined && (obj.threshold = Math.round(message.threshold)); - message.disable !== undefined && (obj.disable = message.disable); + if (message.threshold !== 0) { + obj.threshold = Math.round(message.threshold); + } + if (message.disable !== false) { + obj.disable = message.disable; + } return obj; }, }; -function createBaseArtifactVerificationOptions_TimestampAuthorityOptions() { - return { threshold: 0, disable: false }; -} exports.ArtifactVerificationOptions_TimestampAuthorityOptions = { fromJSON(object) { return { - threshold: isSet(object.threshold) ? Number(object.threshold) : 0, - disable: isSet(object.disable) ? Boolean(object.disable) : false, + threshold: isSet(object.threshold) ? globalThis.Number(object.threshold) : 0, + disable: isSet(object.disable) ? globalThis.Boolean(object.disable) : false, }; }, toJSON(message) { const obj = {}; - message.threshold !== undefined && (obj.threshold = Math.round(message.threshold)); - message.disable !== undefined && (obj.disable = message.disable); + if (message.threshold !== 0) { + obj.threshold = Math.round(message.threshold); + } + if (message.disable !== false) { + obj.disable = message.disable; + } return obj; }, }; -function createBaseArtifactVerificationOptions_TlogIntegratedTimestampOptions() { - return { threshold: 0, disable: false }; -} exports.ArtifactVerificationOptions_TlogIntegratedTimestampOptions = { fromJSON(object) { return { - threshold: isSet(object.threshold) ? Number(object.threshold) : 0, - disable: isSet(object.disable) ? Boolean(object.disable) : false, + threshold: isSet(object.threshold) ? globalThis.Number(object.threshold) : 0, + disable: isSet(object.disable) ? globalThis.Boolean(object.disable) : false, }; }, toJSON(message) { const obj = {}; - message.threshold !== undefined && (obj.threshold = Math.round(message.threshold)); - message.disable !== undefined && (obj.disable = message.disable); + if (message.threshold !== 0) { + obj.threshold = Math.round(message.threshold); + } + if (message.disable !== false) { + obj.disable = message.disable; + } return obj; }, }; -function createBaseArtifactVerificationOptions_ObserverTimestampOptions() { - return { threshold: 0, disable: false }; -} exports.ArtifactVerificationOptions_ObserverTimestampOptions = { fromJSON(object) { return { - threshold: isSet(object.threshold) ? Number(object.threshold) : 0, - disable: isSet(object.disable) ? Boolean(object.disable) : false, + threshold: isSet(object.threshold) ? globalThis.Number(object.threshold) : 0, + disable: isSet(object.disable) ? globalThis.Boolean(object.disable) : false, }; }, toJSON(message) { const obj = {}; - message.threshold !== undefined && (obj.threshold = Math.round(message.threshold)); - message.disable !== undefined && (obj.disable = message.disable); + if (message.threshold !== 0) { + obj.threshold = Math.round(message.threshold); + } + if (message.disable !== false) { + obj.disable = message.disable; + } return obj; }, }; -function createBaseArtifact() { - return { data: undefined }; -} exports.Artifact = { fromJSON(object) { return { data: isSet(object.artifactUri) - ? { $case: "artifactUri", artifactUri: String(object.artifactUri) } + ? { $case: "artifactUri", artifactUri: globalThis.String(object.artifactUri) } : isSet(object.artifact) ? { $case: "artifact", artifact: Buffer.from(bytesFromBase64(object.artifact)) } : isSet(object.artifactDigest) @@ -243,22 +230,18 @@ exports.Artifact = { }, toJSON(message) { const obj = {}; - message.data?.$case === "artifactUri" && (obj.artifactUri = message.data?.artifactUri); - message.data?.$case === "artifact" && - (obj.artifact = message.data?.artifact !== undefined ? base64FromBytes(message.data?.artifact) : undefined); - message.data?.$case === "artifactDigest" && - (obj.artifactDigest = message.data?.artifactDigest ? sigstore_common_1.HashOutput.toJSON(message.data?.artifactDigest) : undefined); + if (message.data?.$case === "artifactUri") { + obj.artifactUri = message.data.artifactUri; + } + else if (message.data?.$case === "artifact") { + obj.artifact = base64FromBytes(message.data.artifact); + } + else if (message.data?.$case === "artifactDigest") { + obj.artifactDigest = sigstore_common_1.HashOutput.toJSON(message.data.artifactDigest); + } return obj; }, }; -function createBaseInput() { - return { - artifactTrustRoot: undefined, - artifactVerificationOptions: undefined, - bundle: undefined, - artifact: undefined, - }; -} exports.Input = { fromJSON(object) { return { @@ -272,56 +255,26 @@ exports.Input = { }, toJSON(message) { const obj = {}; - message.artifactTrustRoot !== undefined && - (obj.artifactTrustRoot = message.artifactTrustRoot ? sigstore_trustroot_1.TrustedRoot.toJSON(message.artifactTrustRoot) : undefined); - message.artifactVerificationOptions !== undefined && - (obj.artifactVerificationOptions = message.artifactVerificationOptions - ? exports.ArtifactVerificationOptions.toJSON(message.artifactVerificationOptions) - : undefined); - message.bundle !== undefined && (obj.bundle = message.bundle ? sigstore_bundle_1.Bundle.toJSON(message.bundle) : undefined); - message.artifact !== undefined && (obj.artifact = message.artifact ? exports.Artifact.toJSON(message.artifact) : undefined); + if (message.artifactTrustRoot !== undefined) { + obj.artifactTrustRoot = sigstore_trustroot_1.TrustedRoot.toJSON(message.artifactTrustRoot); + } + if (message.artifactVerificationOptions !== undefined) { + obj.artifactVerificationOptions = exports.ArtifactVerificationOptions.toJSON(message.artifactVerificationOptions); + } + if (message.bundle !== undefined) { + obj.bundle = sigstore_bundle_1.Bundle.toJSON(message.bundle); + } + if (message.artifact !== undefined) { + obj.artifact = exports.Artifact.toJSON(message.artifact); + } return obj; }, }; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } + return globalThis.Buffer.from(arr).toString("base64"); } function isSet(value) { return value !== null && value !== undefined; diff --git a/deps/npm/node_modules/@sigstore/protobuf-specs/package.json b/deps/npm/node_modules/@sigstore/protobuf-specs/package.json index c81cfc681f14b5..0d5df4877e290c 100644 --- a/deps/npm/node_modules/@sigstore/protobuf-specs/package.json +++ b/deps/npm/node_modules/@sigstore/protobuf-specs/package.json @@ -1,6 +1,6 @@ { "name": "@sigstore/protobuf-specs", - "version": "0.3.3", + "version": "0.4.0", "description": "code-signing for npm packages", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/deps/npm/node_modules/@sigstore/sign/dist/bundler/bundle.js b/deps/npm/node_modules/@sigstore/sign/dist/bundler/bundle.js index ed32286ad88efd..34b1d12f2b44c8 100644 --- a/deps/npm/node_modules/@sigstore/sign/dist/bundler/bundle.js +++ b/deps/npm/node_modules/@sigstore/sign/dist/bundler/bundle.js @@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.toMessageSignatureBundle = toMessageSignatureBundle; exports.toDSSEBundle = toDSSEBundle; diff --git a/deps/npm/node_modules/@sigstore/sign/dist/util/index.js b/deps/npm/node_modules/@sigstore/sign/dist/util/index.js index f467c9150c348f..436630cfbbf196 100644 --- a/deps/npm/node_modules/@sigstore/sign/dist/util/index.js +++ b/deps/npm/node_modules/@sigstore/sign/dist/util/index.js @@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.ua = exports.oidc = exports.pem = exports.json = exports.encoding = exports.dsse = exports.crypto = void 0; /* diff --git a/deps/npm/node_modules/@sigstore/sign/package.json b/deps/npm/node_modules/@sigstore/sign/package.json index fe05e8dc2d73ad..b1d60ea1fdce6c 100644 --- a/deps/npm/node_modules/@sigstore/sign/package.json +++ b/deps/npm/node_modules/@sigstore/sign/package.json @@ -1,6 +1,6 @@ { "name": "@sigstore/sign", - "version": "3.0.0", + "version": "3.1.0", "description": "Sigstore signing library", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -27,16 +27,16 @@ }, "devDependencies": { "@sigstore/jest": "^0.0.0", - "@sigstore/mock": "^0.8.0", + "@sigstore/mock": "^0.10.0", "@sigstore/rekor-types": "^3.0.0", "@types/make-fetch-happen": "^10.0.4", "@types/promise-retry": "^1.1.6" }, "dependencies": { - "@sigstore/bundle": "^3.0.0", + "@sigstore/bundle": "^3.1.0", "@sigstore/core": "^2.0.0", - "@sigstore/protobuf-specs": "^0.3.2", - "make-fetch-happen": "^14.0.1", + "@sigstore/protobuf-specs": "^0.4.0", + "make-fetch-happen": "^14.0.2", "proc-log": "^5.0.0", "promise-retry": "^2.0.1" }, diff --git a/deps/npm/node_modules/@sigstore/tuf/package.json b/deps/npm/node_modules/@sigstore/tuf/package.json index 808689dfddf92f..ce3db200ed300c 100644 --- a/deps/npm/node_modules/@sigstore/tuf/package.json +++ b/deps/npm/node_modules/@sigstore/tuf/package.json @@ -1,6 +1,6 @@ { "name": "@sigstore/tuf", - "version": "3.0.0", + "version": "3.1.0", "description": "Client for the Sigstore TUF repository", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -32,7 +32,7 @@ "@types/make-fetch-happen": "^10.0.4" }, "dependencies": { - "@sigstore/protobuf-specs": "^0.3.2", + "@sigstore/protobuf-specs": "^0.4.0", "tuf-js": "^3.0.1" }, "engines": { diff --git a/deps/npm/node_modules/@sigstore/tuf/seeds.json b/deps/npm/node_modules/@sigstore/tuf/seeds.json index d1d3c6b5c46040..2641c856bca666 100644 --- a/deps/npm/node_modules/@sigstore/tuf/seeds.json +++ b/deps/npm/node_modules/@sigstore/tuf/seeds.json @@ -1 +1 @@ -{"https://tuf-repo-cdn.sigstore.dev":{"root.json":"ewogInNpZ25hdHVyZXMiOiBbCiAgewogICAia2V5aWQiOiAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICJzaWciOiAiMzA0NjAyMjEwMDhhYjFmNmYxN2Q0ZjllNmQ3ZGNmMWM4ODkxMmI2YjUzY2MxMDM4ODY0NGFlMWYwOWJjMzdhMDgyY2QwNjAwM2UwMjIxMDBlMTQ1ZWY0YzdiNzgyZDRlODEwN2I1MzQzN2U2NjlkMDQ3Njg5MmNlOTk5OTAzYWUzM2QxNDQ0ODM2Njk5NmU3IgogIH0sCiAgewogICAia2V5aWQiOiAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2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AgICAieC10dWYtb24tY2ktc2lnbmluZy1wZXJpb2QiOiA0CiAgIH0KICB9LAogICJzcGVjX3ZlcnNpb24iOiAiMS4wIiwKICAidmVyc2lvbiI6IDEwLAogICJ4LXR1Zi1vbi1jaS1leHBpcnktcGVyaW9kIjogMTgyLAogICJ4LXR1Zi1vbi1jaS1zaWduaW5nLXBlcmlvZCI6IDMxCiB9Cn0=","targets":{"trusted_root.json":"ewogICJtZWRpYVR5cGUiOiAiYXBwbGljYXRpb24vdm5kLmRldi5zaWdzdG9yZS50cnVzdGVkcm9vdCtqc29uO3ZlcnNpb249MC4xIiwKICAidGxvZ3MiOiBbCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vcmVrb3Iuc2lnc3RvcmUuZGV2IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUyRzJZKzJ0YWJkVFY1QmNHaUJJeDBhOWZBRndya0JibUxTR3RrczRMM3FYNnlZWTB6dWZCbmhDOFVyL2l5NTVHaFdQLzlBL2JZMkxoQzMwTTkrUll0dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDEtMTJUMTE6NTM6MjcuMDAwWiIKICAgICAgICB9CiAgICAgIH0sCiAgICAgICJsb2dJZCI6IHsKICAgICAgICAia2V5SWQiOiAid05JOWF0UUdseitWV2ZPNkxSeWdINFFVZlkvOFc0UkZ3aVQ1aTVXUmdCMD0iCiAgICAgIH0KICAgIH0KICBdLAogICJjZXJ0aWZpY2F0ZUF1dGhvcml0aWVzIjogWwogICAgewogICAgICAic3ViamVjdCI6IHsKICAgICAgICAib3JnYW5pemF0aW9uIjog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6NTkuOTk5WiIKICAgICAgICB9CiAgICAgIH0sCiAgICAgICJsb2dJZCI6IHsKICAgICAgICAia2V5SWQiOiAiQ0dDUzhDaFMvMmhGMGRGcko0U2NSV2NZckJZOXd6alNiZWE4SWdZMmIzST0iCiAgICAgIH0KICAgIH0sCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vY3RmZS5zaWdzdG9yZS5kZXYvMjAyMiIsCiAgICAgICJoYXNoQWxnb3JpdGhtIjogIlNIQTJfMjU2IiwKICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAicmF3Qnl0ZXMiOiAiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFaVBTbEZpMENtRlRmRWpDVXFGOUh1Q0VjWVhOS0FhWWFsSUptQlo4eXllelBqVHFoeHJLQnBNbmFvY1Z0TEpCSTFlTTN1WG5RelFHQUpkSjRnczlGeXc9PSIsCiAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICJzdGFydCI6ICIyMDIyLTEwLTIwVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgfQogICAgICB9LAogICAgICAibG9nSWQiOiB7CiAgICAgICAgImtleUlkIjogIjNUMHdhc2JIRVRKakdSNGNtV2MzQXFKS1hyamVQSzMvaDRweWdDOHA3bzQ9IgogICAgICB9CiAgICB9CiAgXSwKICAidGltZXN0YW1wQXV0aG9yaXRpZXMiOiBbCiAgICB7CiAgICAgICJzdWJqZWN0IjogewogICAgICAgICJvcmdhbml6YXRpb24iOiAiR2l0SHViLCBJbmMuIiwKICAgICAgICAiY29tbW9uTmFtZSI6ICJJbnRlcm5hbCBTZXJ2aWNlcyBSb290IgogICAgICB9LAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlc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jRYRFRJek1EUXhOREF3TURBd01Gb1hEVE16TURReE1UQXdNREF3TUZvd09ERVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVI4d0hRWURWUVFERXhaSmJuUmxjbTVoYkNCVFpYSjJhV05sY3lCU2IyOTBNSFl3RUFZSEtvWkl6ajBDQVFZRks0RUVBQ0lEWWdBRWY5akZBWHh6NGt4NjhBSFJNT2tGQmhmbERjTVR2emFYejR4L0ZDY1hqSi8xcUVLb24vcVBJR25hVVJza0R0eU5iTkRPcGVKVERERnF0NDhpTVBybnpweDZJWndxZW1mVUpONHhCRVpmemErcFl0L2l5b2QrOXRacjIwUlJXU3YvbzBVd1F6QU9CZ05WSFE4QkFmOEVCQU1DQVFZd0VnWURWUjBUQVFIL0JBZ3dCZ0VCL3dJQkFqQWRCZ05WSFE0RUZnUVU5TllZbG9ibkFHNGMwL3FqeHlIL2xxL3d6K1F3Q2dZSUtvWkl6ajBFQXdNRGFBQXdaUUl4QUxaTFo4QmdSWHpLeExNTU45VklsTytlNGhyQm5OQmdGN3R6N0hucm93djJOZXRaRXJJQUNLRnltQmx2V0R2dE1BSXdaTytraTZzc1ExYnNabzk4TzhtRUFmMk5aN2lpQ2dERFUwVndqZWNvNnp5ZWgwekJUczkvN2dWNkFITlE1M3hEIgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgInZhbGlkRm9yIjogewogICAgICAgICJzdGFydCI6ICIyMDIzLTA0LTE0VDAwOjAwOjAwLjAwMFoiCiAgICAgIH0KICAgIH0KICBdCn0K","registry.npmjs.org%2Fkeys.json":"ewogICAgImtleXMiOiBbCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OmpsM2J3c3d1ODBQampva0NnaDBvMnc1YzJVNExoUUFFNTdnajljejFrekEiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTFPbGIzek1BRkZ4WEtIaUlrUU81Y0ozWWhsNWk2VVBwK0lodXRlQkpidUhjQTVVb2dLbzBFV3RsV3dXNktTYUtvVE5FWUw3SmxDUWlWbmtoQmt0VWdnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIxOTk5LTAxLTAxVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImtleUlkIjogIlNIQTI1NjpqbDNid3N3dTgwUGpqb2tDZ2gwbzJ3NWMyVTRMaFFBRTU3Z2o5Y3oxa3pBIiwKICAgICAgICAgICAgImtleVVzYWdlIjogIm5wbTphdHRlc3RhdGlvbnMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTFPbGIzek1BRkZ4WEtIaUlrUU81Y0ozWWhsNWk2VVBwK0lodXRlQkpidUhjQTVVb2dLbzBFV3RsV3dXNktTYUtvVE5FWUw3SmxDUWlWbmtoQmt0VWdnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDIyLTEyLTAxVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICBdCn0K"}}} +{"https://tuf-repo-cdn.sigstore.dev":{"root.json":"ewog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Nabzk4TzhtRUFmMk5aN2lpQ2dERFUwVndqZWNvNnp5ZWgwekJUczkvN2dWNkFITlE1M3hEIgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgInZhbGlkRm9yIjogewogICAgICAgICJzdGFydCI6ICIyMDIzLTA0LTE0VDAwOjAwOjAwLjAwMFoiCiAgICAgIH0KICAgIH0KICBdCn0K","registry.npmjs.org%2Fkeys.json":"ewogICAgImtleXMiOiBbCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OmpsM2J3c3d1ODBQampva0NnaDBvMnc1YzJVNExoUUFFNTdnajljejFrekEiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTFPbGIzek1BRkZ4WEtIaUlrUU81Y0ozWWhsNWk2VVBwK0lodXRlQkpidUhjQTVVb2dLbzBFV3RsV3dXNktTYUtvVE5FWUw3SmxDUWlWbmtoQmt0VWdnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIxOTk5LTAxLTAxVDAwOjAwOjAwLjAwMFoiLAogICAgICAgICAgICAgICAgICAgICJlbmQiOiAiMjAyNS0wMS0yOVQwMDowMDowMC4wMDBaIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJrZXlJZCI6ICJTSEEyNTY6amwzYndzd3U4MFBqam9rQ2doMG8ydzVjMlU0TGhRQUU1N2dqOWN6MWt6QSIsCiAgICAgICAgICAgICJrZXlVc2FnZSI6ICJucG06YXR0ZXN0YXRpb25zIiwKICAgICAgICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUxT2xiM3pNQUZGeFhLSGlJa1FPNWNKM1lobDVpNlVQcCtJaHV0ZUJKYnVIY0E1VW9nS28wRVd0bFd3VzZLU2FLb1RORVlMN0psQ1FpVm5raEJrdFVnZz09IiwKICAgICAgICAgICAgICAgICJrZXlEZXRhaWxzIjogIlBLSVhfRUNEU0FfUDI1Nl9TSEFfMjU2IiwKICAgICAgICAgICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICAgICAgICAgICAic3RhcnQiOiAiMjAyMi0xMi0wMVQwMDowMDowMC4wMDBaIiwKICAgICAgICAgICAgICAgICAgICAiZW5kIjogIjIwMjUtMDEtMjlUMDA6MDA6MDAuMDAwWiIKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OkRoUTh3UjVBUEJ2RkhMRi8rVGMrQVl2UE9kVHBjSURxT2h4c0JIUndDN1UiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImtleUlkIjogIlNIQTI1NjpEaFE4d1I1QVBCdkZITEYvK1RjK0FZdlBPZFRwY0lEcU9oeHNCSFJ3QzdVIiwKICAgICAgICAgICAgImtleVVzYWdlIjogIm5wbTphdHRlc3RhdGlvbnMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICBdCn0K"}}} diff --git a/deps/npm/node_modules/@sigstore/verify/package.json b/deps/npm/node_modules/@sigstore/verify/package.json index edf72b8bfd9680..5913d6af8e5f69 100644 --- a/deps/npm/node_modules/@sigstore/verify/package.json +++ b/deps/npm/node_modules/@sigstore/verify/package.json @@ -1,6 +1,6 @@ { "name": "@sigstore/verify", - "version": "2.0.0", + "version": "2.1.0", "description": "Verification of Sigstore signatures", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -26,8 +26,8 @@ "provenance": true }, "dependencies": { - "@sigstore/protobuf-specs": "^0.3.2", - "@sigstore/bundle": "^3.0.0", + "@sigstore/protobuf-specs": "^0.4.0", + "@sigstore/bundle": "^3.1.0", "@sigstore/core": "^2.0.0" }, "engines": { diff --git a/deps/npm/node_modules/cidr-regex/package.json b/deps/npm/node_modules/cidr-regex/package.json index 88b8297b02473e..815837e9a3786a 100644 --- a/deps/npm/node_modules/cidr-regex/package.json +++ b/deps/npm/node_modules/cidr-regex/package.json @@ -1,6 +1,6 @@ { "name": "cidr-regex", - "version": "4.1.1", + "version": "4.1.3", "description": "Regular expression for matching IP addresses in CIDR notation", "author": "silverwind ", "contributors": [ @@ -23,18 +23,17 @@ "ip-regex": "^5.0.0" }, "devDependencies": { - "@types/node": "20.12.12", + "@types/node": "22.13.4", "eslint": "8.57.0", - "eslint-config-silverwind": "85.1.4", - "eslint-config-silverwind-typescript": "3.2.7", - "typescript": "5.4.5", - "typescript-config-silverwind": "4.3.2", - "updates": "16.1.1", - "versions": "12.0.2", - "vite": "5.2.11", - "vite-config-silverwind": "1.1.2", - "vite-plugin-dts": "3.9.1", - "vitest": "1.6.0", - "vitest-config-silverwind": "9.0.6" + "eslint-config-silverwind": "99.0.0", + "eslint-config-silverwind-typescript": "9.2.2", + "typescript": "5.7.3", + "typescript-config-silverwind": "8.0.0", + "updates": "16.4.2", + "versions": "12.1.3", + "vite": "6.1.0", + "vite-config-silverwind": "4.0.0", + "vitest": "3.0.5", + "vitest-config-silverwind": "10.0.0" } } diff --git a/deps/npm/node_modules/exponential-backoff/LICENSE b/deps/npm/node_modules/exponential-backoff/LICENSE index 7a4a3ea2424c09..4be46a90670d82 100644 --- a/deps/npm/node_modules/exponential-backoff/LICENSE +++ b/deps/npm/node_modules/exponential-backoff/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2019 Coveo Solutions Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -199,4 +199,4 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/deps/npm/node_modules/exponential-backoff/dist/backoff.js b/deps/npm/node_modules/exponential-backoff/dist/backoff.js index a0aa0dc34b6b14..6a1b6bd3835ac9 100644 --- a/deps/npm/node_modules/exponential-backoff/dist/backoff.js +++ b/deps/npm/node_modules/exponential-backoff/dist/backoff.js @@ -38,6 +38,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) { Object.defineProperty(exports, "__esModule", { value: true }); var options_1 = require("./options"); var delay_factory_1 = require("./delay/delay.factory"); +/** + * Executes a function with exponential backoff. + * @param request the function to be executed + * @param options options to customize the backoff behavior + * @returns Promise that resolves to the result of the `request` function + */ function backOff(request, options) { if (options === void 0) { options = {}; } return __awaiter(this, void 0, void 0, function () { diff --git a/deps/npm/node_modules/exponential-backoff/package.json b/deps/npm/node_modules/exponential-backoff/package.json index 23232a0df2c572..53fb159f827828 100644 --- a/deps/npm/node_modules/exponential-backoff/package.json +++ b/deps/npm/node_modules/exponential-backoff/package.json @@ -1,9 +1,10 @@ { "name": "exponential-backoff", - "version": "3.1.1", + "version": "3.1.2", "description": "A utility that allows retrying a function with an exponential delay between attempts.", "files": [ - "dist/" + "dist/", + "src/" ], "main": "dist/backoff.js", "types": "dist/backoff.d.ts", @@ -35,7 +36,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/coveo/exponential-backoff.git" + "url": "git+https://github.com/coveooss/exponential-backoff.git" }, "keywords": [ "exponential", @@ -45,9 +46,9 @@ "author": "Sami Sayegh", "license": "Apache-2.0", "bugs": { - "url": "https://github.com/coveo/exponential-backoff/issues" + "url": "https://github.com/coveooss/exponential-backoff/issues" }, - "homepage": "https://github.com/coveo/exponential-backoff#readme", + "homepage": "https://github.com/coveooss/exponential-backoff#readme", "devDependencies": { "@types/jest": "^24.0.18", "@types/node": "^10.14.21", diff --git a/deps/npm/node_modules/foreground-child/dist/commonjs/index.js b/deps/npm/node_modules/foreground-child/dist/commonjs/index.js index 07a01c5830de40..6db65c65dca62d 100644 --- a/deps/npm/node_modules/foreground-child/dist/commonjs/index.js +++ b/deps/npm/node_modules/foreground-child/dist/commonjs/index.js @@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.foregroundChild = exports.normalizeFgArgs = void 0; +exports.normalizeFgArgs = void 0; +exports.foregroundChild = foregroundChild; const child_process_1 = require("child_process"); const cross_spawn_1 = __importDefault(require("cross-spawn")); const signal_exit_1 = require("signal-exit"); @@ -118,6 +119,5 @@ function foregroundChild(...fgArgs) { } return child; } -exports.foregroundChild = foregroundChild; const isPromise = (o) => !!o && typeof o === 'object' && typeof o.then === 'function'; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/foreground-child/package.json b/deps/npm/node_modules/foreground-child/package.json index 980b7e85d15426..75f5b9969b282b 100644 --- a/deps/npm/node_modules/foreground-child/package.json +++ b/deps/npm/node_modules/foreground-child/package.json @@ -1,30 +1,26 @@ { "name": "foreground-child", - "version": "3.3.0", + "version": "3.3.1", "description": "Run a child as if it's the foreground process. Give it stdio. Exit when it exits.", "main": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", "exports": { "./watchdog": { "import": { - "source": "./src/watchdog.ts", "types": "./dist/esm/watchdog.d.ts", "default": "./dist/esm/watchdog.js" }, "require": { - "source": "./src/watchdog.ts", "types": "./dist/commonjs/watchdog.d.ts", "default": "./dist/commonjs/watchdog.js" } }, "./proxy-signals": { "import": { - "source": "./src/proxy-signals.ts", "types": "./dist/esm/proxy-signals.d.ts", "default": "./dist/esm/proxy-signals.js" }, "require": { - "source": "./src/proxy-signals.ts", "types": "./dist/commonjs/proxy-signals.d.ts", "default": "./dist/commonjs/proxy-signals.js" } @@ -32,12 +28,10 @@ "./package.json": "./package.json", ".": { "import": { - "source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" }, "require": { - "source": "./src/index.ts", "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" } @@ -50,7 +44,7 @@ "node": ">=14" }, "dependencies": { - "cross-spawn": "^7.0.0", + "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" }, "scripts": { @@ -91,8 +85,8 @@ "@types/node": "^18.15.11", "@types/tap": "^15.0.8", "prettier": "^3.3.2", - "tap": "^19.2.5", - "tshy": "^1.15.1", + "tap": "^21.1.0", + "tshy": "^3.0.2", "typedoc": "^0.24.2", "typescript": "^5.0.2" }, @@ -107,5 +101,6 @@ ".": "./src/index.ts" } }, - "type": "module" + "type": "module", + "module": "./dist/esm/index.js" } diff --git a/deps/npm/node_modules/is-cidr/LICENSE b/deps/npm/node_modules/is-cidr/LICENSE new file mode 100644 index 00000000000000..9669c20f85511d --- /dev/null +++ b/deps/npm/node_modules/is-cidr/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) silverwind +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/npm/node_modules/is-cidr/package.json b/deps/npm/node_modules/is-cidr/package.json index 4b0e95b9c78c7a..2e512b947e7f1d 100644 --- a/deps/npm/node_modules/is-cidr/package.json +++ b/deps/npm/node_modules/is-cidr/package.json @@ -1,6 +1,6 @@ { "name": "is-cidr", - "version": "5.1.0", + "version": "5.1.1", "description": "Check if a string is an IP address in CIDR notation", "author": "silverwind ", "contributors": [ @@ -23,18 +23,17 @@ "cidr-regex": "^4.1.1" }, "devDependencies": { - "@types/node": "20.12.12", + "@types/node": "22.13.4", "eslint": "8.57.0", - "eslint-config-silverwind": "85.1.4", - "eslint-config-silverwind-typescript": "3.2.7", - "typescript": "5.4.5", - "typescript-config-silverwind": "4.3.2", - "updates": "16.1.1", - "versions": "12.0.2", - "vite": "5.2.11", - "vite-config-silverwind": "1.1.2", - "vite-plugin-dts": "3.9.1", - "vitest": "1.6.0", - "vitest-config-silverwind": "9.0.6" + "eslint-config-silverwind": "99.0.0", + "eslint-config-silverwind-typescript": "9.2.2", + "typescript": "5.7.3", + "typescript-config-silverwind": "7.0.0", + "updates": "16.4.2", + "versions": "12.1.3", + "vite": "6.1.0", + "vite-config-silverwind": "4.0.0", + "vitest": "3.0.5", + "vitest-config-silverwind": "10.0.0" } } diff --git a/deps/npm/node_modules/libnpmdiff/package.json b/deps/npm/node_modules/libnpmdiff/package.json index 48673c03ff4c73..43a19ad964d2e6 100644 --- a/deps/npm/node_modules/libnpmdiff/package.json +++ b/deps/npm/node_modules/libnpmdiff/package.json @@ -1,6 +1,6 @@ { "name": "libnpmdiff", - "version": "8.0.0", + "version": "8.0.1", "description": "The registry diff", "repository": { "type": "git", @@ -47,7 +47,7 @@ "tap": "^16.3.8" }, "dependencies": { - "@npmcli/arborist": "^9.0.0", + "@npmcli/arborist": "^9.0.1", "@npmcli/installed-package-contents": "^3.0.0", "binary-extensions": "^3.0.0", "diff": "^7.0.0", diff --git a/deps/npm/node_modules/libnpmexec/lib/index.js b/deps/npm/node_modules/libnpmexec/lib/index.js index 78633a8cadb3cf..2ffaae2290a673 100644 --- a/deps/npm/node_modules/libnpmexec/lib/index.js +++ b/deps/npm/node_modules/libnpmexec/lib/index.js @@ -1,20 +1,21 @@ 'use strict' +const { dirname, resolve } = require('node:path') +const crypto = require('node:crypto') const { mkdir } = require('node:fs/promises') const Arborist = require('@npmcli/arborist') const ciInfo = require('ci-info') -const crypto = require('node:crypto') const { log, input } = require('proc-log') const npa = require('npm-package-arg') const pacote = require('pacote') const { read } = require('read') const semver = require('semver') +const PackageJson = require('@npmcli/package-json') const { fileExists, localFileExists } = require('./file-exists.js') const getBinFromManifest = require('./get-bin-from-manifest.js') const noTTY = require('./no-tty.js') const runScript = require('./run-script.js') const isWindows = require('./is-windows.js') -const { dirname, resolve } = require('node:path') const binPaths = [] @@ -37,6 +38,7 @@ const missingFromTree = async ({ spec, tree, flatOptions, isNpxTree, shallow }) // - In local or global mode go with anything in the tree that matches // - If looking in the npx cache check if a newer version is available const npxByNameOnly = isNpxTree && spec.name === spec.raw + // If they gave a range and not a tag we still need to check if it's outdated. if (spec.registry && spec.type !== 'tag' && !npxByNameOnly) { // registry spec that is not a specific tag. const nodesBySpec = tree.inventory.query('packageName', spec.name) @@ -53,7 +55,8 @@ const missingFromTree = async ({ spec, tree, flatOptions, isNpxTree, shallow }) return { node } } // package requested by version range, only remaining registry type - if (semver.satisfies(node.package.version, spec.rawSpec)) { + // the npx tree shouldn't be ok w/ an outdated version + if (!isNpxTree && semver.satisfies(node.package.version, spec.rawSpec)) { return { node } } } @@ -293,6 +296,9 @@ const exec = async (opts) => { }) } binPaths.push(resolve(installDir, 'node_modules/.bin')) + const pkgJson = await PackageJson.load(installDir) + pkgJson.update({ _npx: { packages } }) + await pkgJson.save() } return await run() diff --git a/deps/npm/node_modules/libnpmexec/package.json b/deps/npm/node_modules/libnpmexec/package.json index 5009d76d12fe54..b042cfc7a33fcb 100644 --- a/deps/npm/node_modules/libnpmexec/package.json +++ b/deps/npm/node_modules/libnpmexec/package.json @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "10.0.0", + "version": "10.1.0", "files": [ "bin/", "lib/" @@ -60,7 +60,8 @@ "tap": "^16.3.8" }, "dependencies": { - "@npmcli/arborist": "^9.0.0", + "@npmcli/arborist": "^9.0.1", + "@npmcli/package-json": "^6.1.1", "@npmcli/run-script": "^9.0.1", "ci-info": "^4.0.0", "npm-package-arg": "^12.0.0", diff --git a/deps/npm/node_modules/libnpmfund/package.json b/deps/npm/node_modules/libnpmfund/package.json index 8d458259abd6b3..3b2d7ea2bb9de6 100644 --- a/deps/npm/node_modules/libnpmfund/package.json +++ b/deps/npm/node_modules/libnpmfund/package.json @@ -1,6 +1,6 @@ { "name": "libnpmfund", - "version": "7.0.0", + "version": "7.0.1", "main": "lib/index.js", "files": [ "bin/", @@ -46,7 +46,7 @@ "tap": "^16.3.8" }, "dependencies": { - "@npmcli/arborist": "^9.0.0" + "@npmcli/arborist": "^9.0.1" }, "engines": { "node": "^20.17.0 || >=22.9.0" diff --git a/deps/npm/node_modules/libnpmpack/package.json b/deps/npm/node_modules/libnpmpack/package.json index eba99bd38a9bc5..6aaf3f23efcece 100644 --- a/deps/npm/node_modules/libnpmpack/package.json +++ b/deps/npm/node_modules/libnpmpack/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpack", - "version": "9.0.0", + "version": "9.0.1", "description": "Programmatic API for the bits behind npm pack", "author": "GitHub Inc.", "main": "lib/index.js", @@ -37,7 +37,7 @@ "bugs": "https://github.com/npm/libnpmpack/issues", "homepage": "https://npmjs.com/package/libnpmpack", "dependencies": { - "@npmcli/arborist": "^9.0.0", + "@npmcli/arborist": "^9.0.1", "@npmcli/run-script": "^9.0.1", "npm-package-arg": "^12.0.0", "pacote": "^21.0.0" diff --git a/deps/npm/node_modules/node-gyp/.release-please-manifest.json b/deps/npm/node_modules/node-gyp/.release-please-manifest.json index 26a3463a2e0bb3..b91326402215ab 100644 --- a/deps/npm/node_modules/node-gyp/.release-please-manifest.json +++ b/deps/npm/node_modules/node-gyp/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "11.0.0" + ".": "11.1.0" } diff --git a/deps/npm/node_modules/node-gyp/CHANGELOG.md b/deps/npm/node_modules/node-gyp/CHANGELOG.md index 8374a920b7caaa..3bb923e6a0ca38 100644 --- a/deps/npm/node_modules/node-gyp/CHANGELOG.md +++ b/deps/npm/node_modules/node-gyp/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [11.1.0](https://github.com/nodejs/node-gyp/compare/v11.0.0...v11.1.0) (2025-02-10) + + +### Features + +* update gyp-next to v0.19.1 ([#3122](https://github.com/nodejs/node-gyp/issues/3122)) ([504250e](https://github.com/nodejs/node-gyp/commit/504250e5e3e27c6ef6dcfcaa744b36e1a99c1be8)) + + +### Bug Fixes + +* Find VC.Tools.ARM64 on arm64 machine ([#3075](https://github.com/nodejs/node-gyp/issues/3075)) ([b899fae](https://github.com/nodejs/node-gyp/commit/b899faed56270d3d8496da7576b5750b264c2c21)) +* try libnode.dll first in load_exe_hook ([#2834](https://github.com/nodejs/node-gyp/issues/2834)) ([b9d10a5](https://github.com/nodejs/node-gyp/commit/b9d10a5a37081e2a731937e43eca52c83609e7f5)) + + +### Miscellaneous + +* add gyp-next updater ([#3105](https://github.com/nodejs/node-gyp/issues/3105)) ([e3f9a77](https://github.com/nodejs/node-gyp/commit/e3f9a7756f65a7f4e50799017b3dc51d5bc195b2)) +* Test on Ubuntu-24.04-arm and Node.js v23 ([#3121](https://github.com/nodejs/node-gyp/issues/3121)) ([2530f51](https://github.com/nodejs/node-gyp/commit/2530f51cec3ba595184e5bcb7fe1245e240beb59)) +* Use astral-sh/ruff-action@v3 to run the Python linter ([#3114](https://github.com/nodejs/node-gyp/issues/3114)) ([94448fc](https://github.com/nodejs/node-gyp/commit/94448fcd9f090814bce1c4361471dae199dc2e82)) + ## [11.0.0](https://github.com/nodejs/node-gyp/compare/v10.3.1...v11.0.0) (2024-12-03) diff --git a/deps/npm/node_modules/node-gyp/gyp/.release-please-manifest.json b/deps/npm/node_modules/node-gyp/gyp/.release-please-manifest.json index cbd0ca0683d981..1f9113816b3aa1 100644 --- a/deps/npm/node_modules/node-gyp/gyp/.release-please-manifest.json +++ b/deps/npm/node_modules/node-gyp/gyp/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.18.1" + ".": "0.19.1" } diff --git a/deps/npm/node_modules/node-gyp/gyp/docs/Hacking.md b/deps/npm/node_modules/node-gyp/gyp/docs/Hacking.md index 89b3b8bea923ec..b00783bd36f2bb 100644 --- a/deps/npm/node_modules/node-gyp/gyp/docs/Hacking.md +++ b/deps/npm/node_modules/node-gyp/gyp/docs/Hacking.md @@ -34,7 +34,7 @@ See [Testing](Testing.md) for more details on the test framework. Note that it can be handy to look at the project files output by the tests to diagnose problems. The easiest way to do that is by kindly asking the test driver to leave the temporary directories it creates in-place. -This is done by setting the enviroment variable "PRESERVE", e.g. +This is done by setting the environment variable "PRESERVE", e.g. ``` set PRESERVE=all # On Windows diff --git a/deps/npm/node_modules/node-gyp/gyp/docs/LanguageSpecification.md b/deps/npm/node_modules/node-gyp/gyp/docs/LanguageSpecification.md index 178b8c83169919..f8fff097ab73f3 100644 --- a/deps/npm/node_modules/node-gyp/gyp/docs/LanguageSpecification.md +++ b/deps/npm/node_modules/node-gyp/gyp/docs/LanguageSpecification.md @@ -157,7 +157,7 @@ have structural meaning for target definitions: | `all_dependent_settings` | A dictionary of settings to be applied to all dependents of the target, transitively. This includes direct dependents and the entire set of their dependents, and so on. This section may contain anything found within a `target` dictionary, except `configurations`, `target_name`, and `type` sections. Compare `direct_dependent_settings` and `link_settings`. | | `configurations` | A list of dictionaries defining build configurations for the target. See the "Configurations" section below. | | `copies` | A list of copy actions to perform. See the "Copies" section below. | -| `defines` | A list of preprocesor definitions to be passed on the command line to the C/C++ compiler (via `-D` or `/D` options). | +| `defines` | A list of preprocessor definitions to be passed on the command line to the C/C++ compiler (via `-D` or `/D` options). | | `dependencies` | A list of targets on which this target depends. Targets in other `.gyp` files are specified as `../path/to/other.gyp:target_we_want`. | | `direct_dependent_settings` | A dictionary of settings to be applied to other targets that depend on this target. These settings will only be applied to direct dependents. This section may contain anything found within a `target` dictionary, except `configurations`, `target_name`, and `type` sections. Compare with `all_dependent_settings` and `link_settings`. | | `include_dirs` | A list of include directories to be passed on the command line to the C/C++ compiler (via `-I` or `/I` options). | @@ -208,8 +208,8 @@ Configuration dictionaries may also contain these elements: Conditionals may appear within any dictionary in a `.gyp` file. There are two tpes of conditionals, which differ only in the timing of their -processing. `conditons` sections are processed shortly after loading -`.gyp` files, and `target_conditons` sections are processed after all +processing. `conditions` sections are processed shortly after loading +`.gyp` files, and `target_conditions` sections are processed after all dependencies have been computed. A conditional section is introduced with a `conditions` or diff --git a/deps/npm/node_modules/node-gyp/gyp/docs/Testing.md b/deps/npm/node_modules/node-gyp/gyp/docs/Testing.md index baeb65f9441c79..a52031e88819a6 100644 --- a/deps/npm/node_modules/node-gyp/gyp/docs/Testing.md +++ b/deps/npm/node_modules/node-gyp/gyp/docs/Testing.md @@ -392,7 +392,7 @@ fails the test if it does. Verifies that the output string contains all of the "lines" in the specified list of lines. In practice, the lines can be any substring and need not be -`\n`-terminaed lines per se. If any line is missing, the test fails. +`\n`-terminated lines per se. If any line is missing, the test fails. ``` test.must_not_contain_any_lines(output, lines) @@ -400,7 +400,7 @@ list of lines. In practice, the lines can be any substring and need not be Verifies that the output string does _not_ contain any of the "lines" in the specified list of lines. In practice, the lines can be any substring and need -not be `\n`-terminaed lines per se. If any line exists in the output string, +not be `\n`-terminated lines per se. If any line exists in the output string, the test fails. ``` @@ -409,7 +409,7 @@ the test fails. Verifies that the output string contains at least one of the "lines" in the specified list of lines. In practice, the lines can be any substring and need -not be `\n`-terminaed lines per se. If none of the specified lines is present, +not be `\n`-terminated lines per se. If none of the specified lines is present, the test fails. ### Reading file contents diff --git a/deps/npm/node_modules/node-gyp/gyp/docs/UserDocumentation.md b/deps/npm/node_modules/node-gyp/gyp/docs/UserDocumentation.md index 808f37a1a9361c..b9d412e1c847ba 100644 --- a/deps/npm/node_modules/node-gyp/gyp/docs/UserDocumentation.md +++ b/deps/npm/node_modules/node-gyp/gyp/docs/UserDocumentation.md @@ -104,7 +104,7 @@ describing all the information necessary to build the target. `'conditions'`: A list of condition specifications that can modify the contents of the items in the global dictionary defined by this `.gyp` -file based on the values of different variablwes. As implied by the +file based on the values of different variables. As implied by the above example, the most common use of a `conditions` section in the top-level dictionary is to add platform-specific targets to the `targets` list. @@ -375,7 +375,7 @@ If your platform-specific file does not contain a already in the `conditions` for the target), and you can't change the file name, there are two patterns that can be used. -**Prefererred**: Add the file to the `sources` list of the appropriate +**Preferred**: Add the file to the `sources` list of the appropriate dictionary within the `targets` list. Add an appropriate `conditions` section to exclude the specific files name: @@ -807,7 +807,7 @@ directory: ``` Adding a library often involves updating multiple `.gyp` files, adding -the target to the approprate `.gyp` file (possibly a newly-added `.gyp` +the target to the appropriate `.gyp` file (possibly a newly-added `.gyp` file), and updating targets in the other `.gyp` files that depend on (link with) the new library. @@ -858,7 +858,7 @@ because of those settings' being listed in the `direct_dependent_settings` block. Note that these settings will likely need to be replicated in the -settings for the library target itsef, so that the library will build +settings for the library target itself, so that the library will build with the same options. This does not prevent the target from defining additional options for its "internal" use when compiling its own source files. (In the above example, these are the `LOCAL_DEFINE_FOR_LIBBAR` diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py index ac87f572b240de..fea6e672865bfe 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py @@ -171,7 +171,7 @@ def ValidateMSBuild(self, value): int(value, self._msbuild_base) def ConvertToMSBuild(self, value): - msbuild_format = (self._msbuild_base == 10) and "%d" or "0x%04x" + msbuild_format = ((self._msbuild_base == 10) and "%d") or "0x%04x" return msbuild_format % int(value) diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py index 8d7f21e82dd2f8..1b3536292201b7 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py @@ -69,7 +69,7 @@ def UsesVcxproj(self): def ProjectExtension(self): """Returns the file extension for the project.""" - return self.uses_vcxproj and ".vcxproj" or ".vcproj" + return (self.uses_vcxproj and ".vcxproj") or ".vcproj" def Path(self): """Returns the path to Visual Studio installation.""" diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py index d6cc01307d997c..8933d0c4f707c9 100755 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py @@ -4,7 +4,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. - +from __future__ import annotations import copy import gyp.input import argparse @@ -24,6 +24,18 @@ DEBUG_VARIABLES = "variables" DEBUG_INCLUDES = "includes" +def EscapeForCString(string: bytes | str) -> str: + if isinstance(string, str): + string = string.encode(encoding='utf8') + + backslash_or_double_quote = {ord('\\'), ord('"')} + result = '' + for char in string: + if char in backslash_or_double_quote or not 32 <= char < 127: + result += '\\%03o' % char + else: + result += chr(char) + return result def DebugOutput(mode, message, *args): if "all" in gyp.debug or mode in gyp.debug: @@ -106,18 +118,19 @@ def Load( output_dir = params["options"].generator_output or params["options"].toplevel_dir if default_variables["GENERATOR"] == "ninja": - default_variables.setdefault( - "PRODUCT_DIR_ABS", - os.path.join( - output_dir, "out", default_variables.get("build_type", "default") - ), + product_dir_abs = os.path.join( + output_dir, "out", default_variables.get("build_type", "default") ) else: - default_variables.setdefault( - "PRODUCT_DIR_ABS", - os.path.join(output_dir, default_variables["CONFIGURATION_NAME"]), + product_dir_abs = os.path.join( + output_dir, default_variables["CONFIGURATION_NAME"] ) + default_variables.setdefault("PRODUCT_DIR_ABS", product_dir_abs) + default_variables.setdefault( + "PRODUCT_DIR_ABS_CSTR", EscapeForCString(product_dir_abs) + ) + # Give the generator the opportunity to set additional variables based on # the params it will receive in the output phase. if getattr(generator, "CalculateVariables", None): @@ -253,7 +266,7 @@ def Noop(value): for name, metadata in options._regeneration_metadata.items(): opt = metadata["opt"] value = getattr(options, name) - value_predicate = metadata["type"] == "path" and FixPath or Noop + value_predicate = (metadata["type"] == "path" and FixPath) or Noop action = metadata["action"] env_name = metadata["env_name"] if action == "append": diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py index 1334f2fca9967c..64573ad2cc70d6 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py @@ -699,7 +699,7 @@ def find_matching_test_target_names(self): ) & set(self._root_targets) if matching_test_targets_contains_all: # Remove any of the targets for all that were not explicitly supplied, - # 'all' is subsequentely added to the matching names below. + # 'all' is subsequently added to the matching names below. matching_test_targets = list( set(matching_test_targets) & set(test_targets_no_all) ) diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py index 2a63f412dbc836..64da385e6aeb40 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py @@ -769,7 +769,7 @@ def ExtractIncludesFromCFlags(self, cflags): Args: cflags: A list of compiler flags, which may be mixed with "-I.." Returns: - A tuple of lists: (clean_clfags, include_paths). "-I.." is trimmed. + A tuple of lists: (clean_cflags, include_paths). "-I.." is trimmed. """ clean_cflags = [] include_paths = [] diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py index 320a891aa8adc9..8720a3daf3a0d8 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py @@ -251,7 +251,7 @@ def WriteActions(target_name, actions, extra_sources, extra_deps, path_to_gyp, o target_name: the name of the CMake target being generated. actions: the Gyp 'actions' dict for this target. extra_sources: [(, )] to append with generated source files. - extra_deps: [] to append with generated targets. + extra_deps: [] to append with generated targets. path_to_gyp: relative path from CMakeLists.txt being generated to the Gyp file in which the target being generated is defined. """ @@ -340,7 +340,7 @@ def WriteRules(target_name, rules, extra_sources, extra_deps, path_to_gyp, outpu target_name: the name of the CMake target being generated. actions: the Gyp 'actions' dict for this target. extra_sources: [(, )] to append with generated source files. - extra_deps: [] to append with generated targets. + extra_deps: [] to append with generated targets. path_to_gyp: relative path from CMakeLists.txt being generated to the Gyp file in which the target being generated is defined. """ @@ -457,7 +457,7 @@ def WriteCopies(target_name, copies, extra_deps, path_to_gyp, output): Args: target_name: the name of the CMake target being generated. actions: the Gyp 'actions' dict for this target. - extra_deps: [] to append with generated targets. + extra_deps: [] to append with generated targets. path_to_gyp: relative path from CMakeLists.txt being generated to the Gyp file in which the target being generated is defined. """ @@ -603,7 +603,7 @@ class CMakeNamer: """ def __init__(self, target_list): - self.cmake_target_base_names_conficting = set() + self.cmake_target_base_names_conflicting = set() cmake_target_base_names_seen = set() for qualified_target in target_list: @@ -612,11 +612,11 @@ def __init__(self, target_list): if cmake_target_base_name not in cmake_target_base_names_seen: cmake_target_base_names_seen.add(cmake_target_base_name) else: - self.cmake_target_base_names_conficting.add(cmake_target_base_name) + self.cmake_target_base_names_conflicting.add(cmake_target_base_name) def CreateCMakeTargetName(self, qualified_target): base_name = CreateCMakeTargetBaseName(qualified_target) - if base_name in self.cmake_target_base_names_conficting: + if base_name in self.cmake_target_base_names_conflicting: return CreateCMakeTargetFullName(qualified_target) return base_name diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py index 392d900914dea9..634da8973c4abe 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py @@ -208,7 +208,7 @@ def CalculateGeneratorInputInfo(params): LINK_COMMANDS_MAC = """\ quiet_cmd_alink = LIBTOOL-STATIC $@ -cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^) +cmd_alink = rm -f $@ && %(python)s gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %%.o,$^) quiet_cmd_link = LINK($(TOOLSET)) $@ cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) @@ -218,7 +218,7 @@ def CalculateGeneratorInputInfo(params): quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -""" # noqa: E501 +""" % {'python': sys.executable} # noqa: E501 LINK_COMMANDS_ANDROID = """\ quiet_cmd_alink = AR($(TOOLSET)) $@ @@ -609,14 +609,14 @@ def CalculateGeneratorInputInfo(params): # Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd # already. quiet_cmd_mac_tool = MACTOOL $(4) $< -cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@" +cmd_mac_tool = %(python)s gyp-mac-tool $(4) $< "$@" quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@ -cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4) +cmd_mac_package_framework = %(python)s gyp-mac-tool package-framework "$@" $(4) quiet_cmd_infoplist = INFOPLIST $@ cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@" -""" # noqa: E501 +""" % {'python': sys.executable} # noqa: E501 def WriteRootHeaderSuffixRules(writer): @@ -788,7 +788,7 @@ def __init__(self, generator_flags, flavor): self.suffix_rules_objdir2 = {} # Generate suffix rules for all compilable extensions. - for ext in COMPILABLE_EXTENSIONS: + for ext, value in COMPILABLE_EXTENSIONS.items(): # Suffix rules for source folder. self.suffix_rules_srcdir.update( { @@ -797,7 +797,7 @@ def __init__(self, generator_flags, flavor): $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(srcdir)/%%%s FORCE_DO_CMD \t@$(call do_cmd,%s,1) """ - % (ext, COMPILABLE_EXTENSIONS[ext]) + % (ext, value) ) } ) @@ -810,7 +810,7 @@ def __init__(self, generator_flags, flavor): $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj).$(TOOLSET)/%%%s FORCE_DO_CMD \t@$(call do_cmd,%s,1) """ - % (ext, COMPILABLE_EXTENSIONS[ext]) + % (ext, value) ) } ) @@ -821,7 +821,7 @@ def __init__(self, generator_flags, flavor): $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD \t@$(call do_cmd,%s,1) """ - % (ext, COMPILABLE_EXTENSIONS[ext]) + % (ext, value) ) } ) @@ -1779,13 +1779,13 @@ def WriteTarget( # using ":=". self.WriteSortedXcodeEnv(self.output, self.GetSortedXcodePostbuildEnv()) - for configname in target_postbuilds: + for configname, value in target_postbuilds.items(): self.WriteLn( "%s: TARGET_POSTBUILDS_%s := %s" % ( QuoteSpaces(self.output), configname, - gyp.common.EncodePOSIXShellList(target_postbuilds[configname]), + gyp.common.EncodePOSIXShellList(value), ) ) @@ -1834,7 +1834,7 @@ def WriteTarget( # Since this target depends on binary and resources which are in # nested subfolders, the framework directory will be older than # its dependencies usually. To prevent this rule from executing - # on every build (expensive, especially with postbuilds), expliclity + # on every build (expensive, especially with postbuilds), explicitly # update the time on the framework directory. self.WriteLn("\t@touch -c %s" % QuoteSpaces(self.output)) @@ -2498,7 +2498,7 @@ def CalculateMakefilePath(build_file, base_name): "PLI.host": PLI_host, } if flavor == "mac": - flock_command = "./gyp-mac-tool flock" + flock_command = "%s gyp-mac-tool flock" % sys.executable header_params.update( { "flock": flock_command, @@ -2548,7 +2548,7 @@ def CalculateMakefilePath(build_file, base_name): header_params.update( { "copy_archive_args": copy_archive_arguments, - "flock": "./gyp-flock-tool flock", + "flock": "%s gyp-flock-tool flock" % sys.executable, "flock_index": 2, } ) @@ -2564,7 +2564,7 @@ def CalculateMakefilePath(build_file, base_name): { "copy_archive_args": copy_archive_arguments, "link_commands": LINK_COMMANDS_AIX, - "flock": "./gyp-flock-tool flock", + "flock": "%s gyp-flock-tool flock" % sys.executable, "flock_index": 2, } ) @@ -2574,7 +2574,7 @@ def CalculateMakefilePath(build_file, base_name): { "copy_archive_args": copy_archive_arguments, "link_commands": LINK_COMMANDS_OS400, - "flock": "./gyp-flock-tool flock", + "flock": "%s gyp-flock-tool flock" % sys.executable, "flock_index": 2, } ) diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py index 6b5b24acc00019..bea6e643488ad1 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py @@ -276,7 +276,7 @@ def _ToolAppend(tools, tool_name, setting, value, only_if_unset=False): def _ToolSetOrAppend(tools, tool_name, setting, value, only_if_unset=False): # TODO(bradnelson): ugly hack, fix this more generally!!! if "Directories" in setting or "Dependencies" in setting: - if type(value) == str: + if isinstance(value, str): value = value.replace("/", "\\") else: value = [i.replace("/", "\\") for i in value] @@ -288,7 +288,7 @@ def _ToolSetOrAppend(tools, tool_name, setting, value, only_if_unset=False): if tool.get(setting): if only_if_unset: return - if type(tool[setting]) == list and type(value) == list: + if isinstance(tool[setting], list) and isinstance(value, list): tool[setting] += value else: raise TypeError( @@ -1423,7 +1423,7 @@ def _ConvertToolsToExpectedForm(tools): # Collapse settings with lists. settings_fixed = {} for setting, value in settings.items(): - if type(value) == list: + if isinstance(value, list): if ( tool == "VCLinkerTool" and setting == "AdditionalDependencies" ) or setting == "AdditionalOptions": @@ -1816,7 +1816,7 @@ def _DictsToFolders(base_path, bucket, flat): # Convert to folders recursively. children = [] for folder, contents in bucket.items(): - if type(contents) == dict: + if isinstance(contents, dict): folder_children = _DictsToFolders( os.path.join(base_path, folder), contents, flat ) @@ -1838,9 +1838,10 @@ def _CollapseSingles(parent, node): # Recursively explorer the tree of dicts looking for projects which are # the sole item in a folder which has the same name as the project. Bring # such projects up one level. - if type(node) == dict and len(node) == 1 and next(iter(node)) == parent + ".vcproj": + if (isinstance(node, dict) and len(node) == 1 and + next(iter(node)) == parent + ".vcproj"): return node[next(iter(node))] - if type(node) != dict: + if not isinstance(node, dict): return node for child in node: node[child] = _CollapseSingles(child, node[child]) @@ -1860,7 +1861,7 @@ def _GatherSolutionFolders(sln_projects, project_objects, flat): # Walk down from the top until we hit a folder that has more than one entry. # In practice, this strips the top-level "src/" dir from the hierarchy in # the solution. - while len(root) == 1 and type(root[next(iter(root))]) == dict: + while len(root) == 1 and isinstance(root[next(iter(root))], dict): root = root[next(iter(root))] # Collapse singles. root = _CollapseSingles("", root) @@ -3274,7 +3275,7 @@ def _GetMSBuildPropertyGroup(spec, label, properties): num_configurations = len(spec["configurations"]) def GetEdges(node): - # Use a definition of edges such that user_of_variable -> used_varible. + # Use a definition of edges such that user_of_variable -> used_variable. # This happens to be easier in this case, since a variable's # definition contains all variables it references in a single string. edges = set() @@ -3411,7 +3412,11 @@ def _FinalizeMSBuildSettings(spec, configuration): ) # Turn on precompiled headers if appropriate. if precompiled_header: - precompiled_header = os.path.split(precompiled_header)[1] + # While MSVC works with just file name eg. "v8_pch.h", ClangCL requires + # the full path eg. "tools/msvs/pch/v8_pch.h" to find the file. + # P.S. Only ClangCL defines msbuild_toolset, for MSVC it is None. + if configuration.get("msbuild_toolset") != 'ClangCL': + precompiled_header = os.path.split(precompiled_header)[1] _ToolAppend(msbuild_settings, "ClCompile", "PrecompiledHeader", "Use") _ToolAppend( msbuild_settings, "ClCompile", "PrecompiledHeaderFile", precompiled_header @@ -3441,7 +3446,7 @@ def _FinalizeMSBuildSettings(spec, configuration): def _GetValueFormattedForMSBuild(tool_name, name, value): - if type(value) == list: + if isinstance(value, list): # For some settings, VS2010 does not automatically extends the settings # TODO(jeanluc) Is this what we want? if name in [ diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py index 0146c4996260a6..ae3dded9b41b73 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py @@ -2595,9 +2595,9 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, config_name "alink", description="LIBTOOL-STATIC $out, POSTBUILDS", command="rm -f $out && " - "./gyp-mac-tool filter-libtool libtool $libtool_flags " + "%s gyp-mac-tool filter-libtool libtool $libtool_flags " "-static -o $out $in" - "$postbuilds", + "$postbuilds" % sys.executable, ) master_ninja.rule( "lipo", @@ -2698,41 +2698,44 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, config_name master_ninja.rule( "copy_infoplist", description="COPY INFOPLIST $in", - command="$env ./gyp-mac-tool copy-info-plist $in $out $binary $keys", + command="$env %s gyp-mac-tool copy-info-plist $in $out $binary $keys" + % sys.executable, ) master_ninja.rule( "merge_infoplist", description="MERGE INFOPLISTS $in", - command="$env ./gyp-mac-tool merge-info-plist $out $in", + command="$env %s gyp-mac-tool merge-info-plist $out $in" % sys.executable, ) master_ninja.rule( "compile_xcassets", description="COMPILE XCASSETS $in", - command="$env ./gyp-mac-tool compile-xcassets $keys $in", + command="$env %s gyp-mac-tool compile-xcassets $keys $in" % sys.executable, ) master_ninja.rule( "compile_ios_framework_headers", description="COMPILE HEADER MAPS AND COPY FRAMEWORK HEADERS $in", - command="$env ./gyp-mac-tool compile-ios-framework-header-map $out " - "$framework $in && $env ./gyp-mac-tool " - "copy-ios-framework-headers $framework $copy_headers", + command="$env %(python)s gyp-mac-tool compile-ios-framework-header-map " + "$out $framework $in && $env %(python)s gyp-mac-tool " + "copy-ios-framework-headers $framework $copy_headers" + % {'python': sys.executable}, ) master_ninja.rule( "mac_tool", description="MACTOOL $mactool_cmd $in", - command="$env ./gyp-mac-tool $mactool_cmd $in $out $binary", + command="$env %s gyp-mac-tool $mactool_cmd $in $out $binary" + % sys.executable, ) master_ninja.rule( "package_framework", description="PACKAGE FRAMEWORK $out, POSTBUILDS", - command="./gyp-mac-tool package-framework $out $version$postbuilds " - "&& touch $out", + command="%s gyp-mac-tool package-framework $out $version$postbuilds " + "&& touch $out" % sys.executable, ) master_ninja.rule( "package_ios_framework", description="PACKAGE IOS FRAMEWORK $out, POSTBUILDS", - command="./gyp-mac-tool package-ios-framework $out $postbuilds " - "&& touch $out", + command="%s gyp-mac-tool package-ios-framework $out $postbuilds " + "&& touch $out" % sys.executable, ) if flavor == "win": master_ninja.rule( diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py index 1ac672c3876bd9..c3c000c4ef683d 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py @@ -959,7 +959,7 @@ def GenerateOutput(target_list, target_dicts, data, params): # would-be additional inputs are newer than the output. Modifying # the source tree - even just modification times - feels dirty. # 6564240 Xcode "custom script" build rules always dump all environment - # variables. This is a low-prioroty problem and is not a + # variables. This is a low-priority problem and is not a # show-stopper. rules_by_ext = {} for rule in spec_rules: diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py index 7150269cda585e..5e71fdace0c663 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py @@ -242,7 +242,7 @@ def LoadOneBuildFile(build_file_path, data, aux_data, includes, is_target, check gyp.common.ExceptionAppend(e, "while reading " + build_file_path) raise - if type(build_file_data) is not dict: + if not isinstance(build_file_data, dict): raise GypError("%s does not evaluate to a dictionary." % build_file_path) data[build_file_path] = build_file_data @@ -303,20 +303,20 @@ def LoadBuildFileIncludesIntoDict( # Recurse into subdictionaries. for k, v in subdict.items(): - if type(v) is dict: + if isinstance(v, dict): LoadBuildFileIncludesIntoDict(v, subdict_path, data, aux_data, None, check) - elif type(v) is list: + elif isinstance(v, list): LoadBuildFileIncludesIntoList(v, subdict_path, data, aux_data, check) # This recurses into lists so that it can look for dicts. def LoadBuildFileIncludesIntoList(sublist, sublist_path, data, aux_data, check): for item in sublist: - if type(item) is dict: + if isinstance(item, dict): LoadBuildFileIncludesIntoDict( item, sublist_path, data, aux_data, None, check ) - elif type(item) is list: + elif isinstance(item, list): LoadBuildFileIncludesIntoList(item, sublist_path, data, aux_data, check) @@ -350,9 +350,9 @@ def ProcessToolsetsInDict(data): data["targets"] = new_target_list if "conditions" in data: for condition in data["conditions"]: - if type(condition) is list: + if isinstance(condition, list): for condition_dict in condition[1:]: - if type(condition_dict) is dict: + if isinstance(condition_dict, dict): ProcessToolsetsInDict(condition_dict) @@ -694,7 +694,7 @@ def IsStrCanonicalInt(string): The canonical form is such that str(int(string)) == string. """ - if type(string) is str: + if isinstance(string, str): # This function is called a lot so for maximum performance, avoid # involving regexps which would otherwise make the code much # shorter. Regexps would need twice the time of this function. @@ -744,7 +744,7 @@ def IsStrCanonicalInt(string): def FixupPlatformCommand(cmd): if sys.platform == "win32": - if type(cmd) is list: + if isinstance(cmd, list): cmd = [re.sub("^cat ", "type ", cmd[0])] + cmd[1:] else: cmd = re.sub("^cat ", "type ", cmd) @@ -870,7 +870,8 @@ def ExpandVariables(input, phase, variables, build_file): # This works around actions/rules which have more inputs than will # fit on the command line. if file_list: - contents_list = contents if type(contents) is list else contents.split(" ") + contents_list = (contents if isinstance(contents, list) + else contents.split(" ")) replacement = contents_list[0] if os.path.isabs(replacement): raise GypError('| cannot handle absolute paths, got "%s"' % replacement) @@ -1011,7 +1012,7 @@ def ExpandVariables(input, phase, variables, build_file): if isinstance(replacement, bytes) and not isinstance(replacement, str): replacement = replacement.decode("utf-8") # done on Python 3 only - if type(replacement) is list: + if isinstance(replacement, list): for item in replacement: if isinstance(item, bytes) and not isinstance(item, str): item = item.decode("utf-8") # done on Python 3 only @@ -1042,7 +1043,7 @@ def ExpandVariables(input, phase, variables, build_file): # Expanding in list context. It's guaranteed that there's only one # replacement to do in |input_str| and that it's this replacement. See # above. - if type(replacement) is list: + if isinstance(replacement, list): # If it's already a list, make a copy. output = replacement[:] else: @@ -1051,7 +1052,7 @@ def ExpandVariables(input, phase, variables, build_file): else: # Expanding in string context. encoded_replacement = "" - if type(replacement) is list: + if isinstance(replacement, list): # When expanding a list into string context, turn the list items # into a string in a way that will work with a subprocess call. # @@ -1081,8 +1082,8 @@ def ExpandVariables(input, phase, variables, build_file): # expanding local variables (variables defined in the same # variables block as this one). gyp.DebugOutput(gyp.DEBUG_VARIABLES, "Found output %r, recursing.", output) - if type(output) is list: - if output and type(output[0]) is list: + if isinstance(output, list): + if output and isinstance(output[0], list): # Leave output alone if it's a list of lists. # We don't want such lists to be stringified. pass @@ -1097,7 +1098,7 @@ def ExpandVariables(input, phase, variables, build_file): output = ExpandVariables(output, phase, variables, build_file) # Convert all strings that are canonically-represented integers into integers. - if type(output) is list: + if isinstance(output, list): for index, outstr in enumerate(output): if IsStrCanonicalInt(outstr): output[index] = int(outstr) @@ -1115,7 +1116,7 @@ def ExpandVariables(input, phase, variables, build_file): def EvalCondition(condition, conditions_key, phase, variables, build_file): """Returns the dict that should be used or None if the result was that nothing should be used.""" - if type(condition) is not list: + if not isinstance(condition, list): raise GypError(conditions_key + " must be a list") if len(condition) < 2: # It's possible that condition[0] won't work in which case this @@ -1133,12 +1134,12 @@ def EvalCondition(condition, conditions_key, phase, variables, build_file): while i < len(condition): cond_expr = condition[i] true_dict = condition[i + 1] - if type(true_dict) is not dict: + if not isinstance(true_dict, dict): raise GypError( f"{conditions_key} {cond_expr} must be followed by a dictionary, " f"not {type(true_dict)}" ) - if len(condition) > i + 2 and type(condition[i + 2]) is dict: + if len(condition) > i + 2 and isinstance(condition[i + 2], dict): false_dict = condition[i + 2] i = i + 3 if i != len(condition): @@ -1239,7 +1240,7 @@ def ProcessConditionsInDict(the_dict, phase, variables, build_file): ) if merge_dict is not None: - # Expand variables and nested conditinals in the merge_dict before + # Expand variables and nested conditionals in the merge_dict before # merging it. ProcessVariablesAndConditionsInDict( merge_dict, phase, variables, build_file @@ -1320,7 +1321,7 @@ def ProcessVariablesAndConditionsInDict( for key, value in the_dict.items(): # Skip "variables", which was already processed if present. - if key != "variables" and type(value) is str: + if key != "variables" and isinstance(value, str): expanded = ExpandVariables(value, phase, variables, build_file) if type(expanded) not in (str, int): raise ValueError( @@ -1383,21 +1384,21 @@ def ProcessVariablesAndConditionsInDict( for key, value in the_dict.items(): # Skip "variables" and string values, which were already processed if # present. - if key == "variables" or type(value) is str: + if key == "variables" or isinstance(value, str): continue - if type(value) is dict: + if isinstance(value, dict): # Pass a copy of the variables dict so that subdicts can't influence # parents. ProcessVariablesAndConditionsInDict( value, phase, variables, build_file, key ) - elif type(value) is list: + elif isinstance(value, list): # The list itself can't influence the variables dict, and # ProcessVariablesAndConditionsInList will make copies of the variables # dict if it needs to pass it to something that can influence it. No # copy is necessary here. ProcessVariablesAndConditionsInList(value, phase, variables, build_file) - elif type(value) is not int: + elif not isinstance(value, int): raise TypeError("Unknown type " + value.__class__.__name__ + " for " + key) @@ -1406,17 +1407,17 @@ def ProcessVariablesAndConditionsInList(the_list, phase, variables, build_file): index = 0 while index < len(the_list): item = the_list[index] - if type(item) is dict: + if isinstance(item, dict): # Make a copy of the variables dict so that it won't influence anything # outside of its own scope. ProcessVariablesAndConditionsInDict(item, phase, variables, build_file) - elif type(item) is list: + elif isinstance(item, list): ProcessVariablesAndConditionsInList(item, phase, variables, build_file) - elif type(item) is str: + elif isinstance(item, str): expanded = ExpandVariables(item, phase, variables, build_file) if type(expanded) in (str, int): the_list[index] = expanded - elif type(expanded) is list: + elif isinstance(expanded, list): the_list[index : index + 1] = expanded index += len(expanded) @@ -1431,7 +1432,7 @@ def ProcessVariablesAndConditionsInList(the_list, phase, variables, build_file): + " at " + index ) - elif type(item) is not int: + elif not isinstance(item, int): raise TypeError( "Unknown type " + item.__class__.__name__ + " at index " + index ) @@ -2232,18 +2233,18 @@ def is_in_set_or_list(x, s, items): # The cheap and easy case. to_item = MakePathRelative(to_file, fro_file, item) if is_paths else item - if not (type(item) is str and item.startswith("-")): + if not (isinstance(item, str) and item.startswith("-")): # Any string that doesn't begin with a "-" is a singleton - it can # only appear once in a list, to be enforced by the list merge append # or prepend. singleton = True - elif type(item) is dict: + elif isinstance(item, dict): # Make a copy of the dictionary, continuing to look for paths to fix. # The other intelligent aspects of merge processing won't apply because # item is being merged into an empty dict. to_item = {} MergeDicts(to_item, item, to_file, fro_file) - elif type(item) is list: + elif isinstance(item, list): # Recurse, making a copy of the list. If the list contains any # descendant dicts, path fixing will occur. Note that here, custom # values for is_paths and append are dropped; those are only to be @@ -2312,12 +2313,12 @@ def MergeDicts(to, fro, to_file, fro_file): to[k] = MakePathRelative(to_file, fro_file, v) else: to[k] = v - elif type(v) is dict: + elif isinstance(v, dict): # Recurse, guaranteeing copies will be made of objects that require it. if k not in to: to[k] = {} MergeDicts(to[k], v, to_file, fro_file) - elif type(v) is list: + elif isinstance(v, list): # Lists in dicts can be merged with different policies, depending on # how the key in the "from" dict (k, the from-key) is written. # @@ -2361,7 +2362,7 @@ def MergeDicts(to, fro, to_file, fro_file): # If the key ends in "?", the list will only be merged if it doesn't # already exist. continue - elif type(to[list_base]) is not list: + elif not isinstance(to[list_base], list): # This may not have been checked above if merging in a list with an # extension character. raise TypeError( @@ -2468,11 +2469,8 @@ def SetUpConfigurations(target, target_dict): merged_configurations[configuration] = new_configuration_dict # Put the new configurations back into the target dict as a configuration. - for configuration in merged_configurations: - target_dict["configurations"][configuration] = merged_configurations[ - configuration - ] - + for configuration, value in merged_configurations.items(): + target_dict["configurations"][configuration] = value # Now drop all the abstract ones. configs = target_dict["configurations"] target_dict["configurations"] = { @@ -2542,7 +2540,7 @@ def ProcessListFiltersInDict(name, the_dict): if operation not in {"!", "/"}: continue - if type(value) is not list: + if not isinstance(value, list): raise ValueError( name + " key " + key + " must be list, not " + value.__class__.__name__ ) @@ -2555,7 +2553,7 @@ def ProcessListFiltersInDict(name, the_dict): del_lists.append(key) continue - if type(the_dict[list_key]) is not list: + if not isinstance(the_dict[list_key], list): value = the_dict[list_key] raise ValueError( name @@ -2668,17 +2666,17 @@ def ProcessListFiltersInDict(name, the_dict): # Now recurse into subdicts and lists that may contain dicts. for key, value in the_dict.items(): - if type(value) is dict: + if isinstance(value, dict): ProcessListFiltersInDict(key, value) - elif type(value) is list: + elif isinstance(value, list): ProcessListFiltersInList(key, value) def ProcessListFiltersInList(name, the_list): for item in the_list: - if type(item) is dict: + if isinstance(item, dict): ProcessListFiltersInDict(name, item) - elif type(item) is list: + elif isinstance(item, list): ProcessListFiltersInList(name, item) @@ -2788,7 +2786,7 @@ def ValidateRunAsInTarget(target, target_dict, build_file): run_as = target_dict.get("run_as") if not run_as: return - if type(run_as) is not dict: + if not isinstance(run_as, dict): raise GypError( "The 'run_as' in target %s from file %s should be a " "dictionary." % (target_name, build_file) @@ -2799,19 +2797,19 @@ def ValidateRunAsInTarget(target, target_dict, build_file): "The 'run_as' in target %s from file %s must have an " "'action' section." % (target_name, build_file) ) - if type(action) is not list: + if not isinstance(action, list): raise GypError( "The 'action' for 'run_as' in target %s from file %s " "must be a list." % (target_name, build_file) ) working_directory = run_as.get("working_directory") - if working_directory and type(working_directory) is not str: + if working_directory and not isinstance(working_directory, str): raise GypError( "The 'working_directory' for 'run_as' in target %s " "in file %s should be a string." % (target_name, build_file) ) environment = run_as.get("environment") - if environment and type(environment) is not dict: + if environment and not isinstance(environment, dict): raise GypError( "The 'environment' for 'run_as' in target %s " "in file %s should be a dictionary." % (target_name, build_file) @@ -2843,15 +2841,15 @@ def TurnIntIntoStrInDict(the_dict): # Use items instead of iteritems because there's no need to try to look at # reinserted keys and their associated values. for k, v in the_dict.items(): - if type(v) is int: + if isinstance(v, int): v = str(v) the_dict[k] = v - elif type(v) is dict: + elif isinstance(v, dict): TurnIntIntoStrInDict(v) - elif type(v) is list: + elif isinstance(v, list): TurnIntIntoStrInList(v) - if type(k) is int: + if isinstance(k, int): del the_dict[k] the_dict[str(k)] = v @@ -2860,11 +2858,11 @@ def TurnIntIntoStrInList(the_list): """Given list the_list, recursively converts all integers into strings. """ for index, item in enumerate(the_list): - if type(item) is int: + if isinstance(item, int): the_list[index] = str(item) - elif type(item) is dict: + elif isinstance(item, dict): TurnIntIntoStrInDict(item) - elif type(item) is list: + elif isinstance(item, list): TurnIntIntoStrInList(item) @@ -3019,8 +3017,8 @@ def Load( del target_dict[key] ProcessListFiltersInDict(target_name, tmp_dict) # Write the results back to |target_dict|. - for key in tmp_dict: - target_dict[key] = tmp_dict[key] + for key, value in tmp_dict.items(): + target_dict[key] = value # Make sure every dependency appears at most once. RemoveDuplicateDependencies(targets) diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py index 5f2c097f63e1f4..aee1a542da3299 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py @@ -1127,8 +1127,8 @@ def _GetIOSPostbuilds(self, configname, output_binary): be deployed to a device. This should be run as the very last step of the build.""" if not ( - self.isIOS - and (self.spec["type"] == "executable" or self._IsXCTest()) + (self.isIOS + and (self.spec["type"] == "executable" or self._IsXCTest())) or self.IsIosFramework() ): return [] @@ -1174,8 +1174,9 @@ def _GetIOSPostbuilds(self, configname, output_binary): # Then re-sign everything with 'preserve=True' postbuilds.extend( [ - '%s code-sign-bundle "%s" "%s" "%s" "%s" %s' + '%s %s code-sign-bundle "%s" "%s" "%s" "%s" %s' % ( + sys.executable, os.path.join("${TARGET_BUILD_DIR}", "gyp-mac-tool"), key, settings.get("CODE_SIGN_ENTITLEMENTS", ""), @@ -1190,8 +1191,9 @@ def _GetIOSPostbuilds(self, configname, output_binary): for target in targets: postbuilds.extend( [ - '%s code-sign-bundle "%s" "%s" "%s" "%s" %s' + '%s %s code-sign-bundle "%s" "%s" "%s" "%s" %s' % ( + sys.executable, os.path.join("${TARGET_BUILD_DIR}", "gyp-mac-tool"), key, settings.get("CODE_SIGN_ENTITLEMENTS", ""), @@ -1204,8 +1206,9 @@ def _GetIOSPostbuilds(self, configname, output_binary): postbuilds.extend( [ - '%s code-sign-bundle "%s" "%s" "%s" "%s" %s' + '%s %s code-sign-bundle "%s" "%s" "%s" "%s" %s' % ( + sys.executable, os.path.join("${TARGET_BUILD_DIR}", "gyp-mac-tool"), key, settings.get("CODE_SIGN_ENTITLEMENTS", ""), @@ -1858,7 +1861,7 @@ def _TopologicallySortedEnvVarKeys(env): regex = re.compile(r"\$\{([a-zA-Z0-9\-_]+)\}") def GetEdges(node): - # Use a definition of edges such that user_of_variable -> used_varible. + # Use a definition of edges such that user_of_variable -> used_variable. # This happens to be easier in this case, since a variable's # definition contains all variables it references in a single string. # We can then reverse the result of the topological sort at the end. diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py index 33c667c266bf69..cd72aa262d2d9d 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py @@ -74,7 +74,7 @@ PBXBuildFile appears extraneous, but there's actually one reason for this: file-specific compiler flags are added to the PBXBuildFile object so as to allow a single file to be a member of multiple targets while having distinct -compiler flags for each. These flags can be modified in the Xcode applciation +compiler flags for each. These flags can be modified in the Xcode application in the "Build" tab of a File Info window. When a project is open in the Xcode application, Xcode will rewrite it. As @@ -662,7 +662,7 @@ def _XCKVPrint(self, file, tabs, key, value): tabs is an int identifying the indentation level. If the class' _should_print_single_line variable is True, tabs is ignored and the - key-value pair will be followed by a space insead of a newline. + key-value pair will be followed by a space instead of a newline. """ if self._should_print_single_line: @@ -781,7 +781,7 @@ def UpdateProperties(self, properties, do_copy=False): # Make sure the property conforms to the schema. (is_list, property_type, is_strong) = self._schema[property][0:3] if is_list: - if value.__class__ != list: + if not isinstance(value, list): raise TypeError( property + " of " @@ -791,7 +791,7 @@ def UpdateProperties(self, properties, do_copy=False): ) for item in value: if not isinstance(item, property_type) and not ( - isinstance(item, str) and property_type == str + isinstance(item, str) and isinstance(property_type, str) ): # Accept unicode where str is specified. str is treated as # UTF-8-encoded. @@ -806,7 +806,7 @@ def UpdateProperties(self, properties, do_copy=False): + item.__class__.__name__ ) elif not isinstance(value, property_type) and not ( - isinstance(value, str) and property_type == str + isinstance(value, str) and isinstance(property_type, str) ): # Accept unicode where str is specified. str is treated as # UTF-8-encoded. @@ -2994,7 +2994,7 @@ def AddOrGetProjectReference(self, other_pbxproject): key=lambda x: x["ProjectRef"].Name().lower() ) else: - # The link already exists. Pull out the relevnt data. + # The link already exists. Pull out the relevant data. project_ref_dict = self._other_pbxprojects[other_pbxproject] product_group = project_ref_dict["ProductGroup"] project_ref = project_ref_dict["ProjectRef"] @@ -3017,10 +3017,10 @@ def _AllSymrootsUnique(self, target, inherit_unique_symroot): symroots = self._DefinedSymroots(target) for s in self._DefinedSymroots(target): if ( - s is not None - and not self._IsUniqueSymrootForTarget(s) - or s is None - and not inherit_unique_symroot + (s is not None + and not self._IsUniqueSymrootForTarget(s)) + or (s is None + and not inherit_unique_symroot) ): return False return True if symroots else inherit_unique_symroot diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py index fb274930799da0..23bb564f3d5ff8 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py @@ -145,7 +145,7 @@ class RawMetadata(TypedDict, total=False): # Metadata 2.3 - PEP 685 # No new fields were added in PEP 685, just some edge case were - # tightened up to provide better interoptability. + # tightened up to provide better interoperability. _STRING_FIELDS = { @@ -206,10 +206,10 @@ def _parse_project_urls(data: List[str]) -> Dict[str, str]: # be the missing value, then they'd have multiple '' values that # overwrite each other in a accumulating dict. # - # The other potentional issue is that it's possible to have the + # The other potential issue is that it's possible to have the # same label multiple times in the metadata, with no solid "right" # answer with what to do in that case. As such, we'll do the only - # thing we can, which is treat the field as unparseable and add it + # thing we can, which is treat the field as unparsable and add it # to our list of unparsed fields. parts = [p.strip() for p in pair.split(",", 1)] parts.extend([""] * (max(0, 2 - len(parts)))) # Ensure 2 items @@ -222,8 +222,8 @@ def _parse_project_urls(data: List[str]) -> Dict[str, str]: label, url = parts if label in urls: # The label already exists in our set of urls, so this field - # is unparseable, and we can just add the whole thing to our - # unparseable data and stop processing it. + # is unparsable, and we can just add the whole thing to our + # unparsable data and stop processing it. raise KeyError("duplicate labels in project urls") urls[label] = url @@ -433,7 +433,7 @@ def parse_email(data: Union[bytes, str]) -> Tuple[RawMetadata, Dict[str, List[st except KeyError: unparsed[name] = value # Nothing that we've done has managed to parse this, so it'll just - # throw it in our unparseable data and move on. + # throw it in our unparsable data and move on. else: unparsed[name] = value @@ -450,7 +450,7 @@ def parse_email(data: Union[bytes, str]) -> Tuple[RawMetadata, Dict[str, List[st else: if payload: # Check to see if we've already got a description, if so then both - # it, and this body move to unparseable. + # it, and this body move to unparsable. if "description" in raw: description_header = cast(str, raw.pop("description")) unparsed.setdefault("description", []).extend( diff --git a/deps/npm/node_modules/node-gyp/gyp/pyproject.toml b/deps/npm/node_modules/node-gyp/gyp/pyproject.toml index def9858e444c55..4b0c88c8a22c43 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pyproject.toml +++ b/deps/npm/node_modules/node-gyp/gyp/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "gyp-next" -version = "0.18.1" +version = "0.19.1" authors = [ { name="Node.js contributors", email="ryzokuken@disroot.org" }, ] @@ -92,7 +92,6 @@ select = [ # "TRY", # tryceratops ] ignore = [ - "E721", "PLC1901", "PLR0402", "PLR1714", diff --git a/deps/npm/node_modules/node-gyp/lib/find-visualstudio.js b/deps/npm/node_modules/node-gyp/lib/find-visualstudio.js index 2dc1930fd78280..e9aa7fafdc98a4 100644 --- a/deps/npm/node_modules/node-gyp/lib/find-visualstudio.js +++ b/deps/npm/node_modules/node-gyp/lib/find-visualstudio.js @@ -145,6 +145,7 @@ class VisualStudioFinder { version: process.env.VSCMD_VER, packages: [ 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', + 'Microsoft.VisualStudio.Component.VC.Tools.ARM64', // Assume MSBuild exists. It will be checked in processing. 'Microsoft.VisualStudio.VC.MSBuild.Base' ] @@ -429,12 +430,21 @@ class VisualStudioFinder { // Helper - process toolset information getToolset (info, versionYear) { - const pkg = 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' + const vcToolsArm64 = 'VC.Tools.ARM64' + const pkgArm64 = `Microsoft.VisualStudio.Component.${vcToolsArm64}` + const vcToolsX64 = 'VC.Tools.x86.x64' + const pkgX64 = `Microsoft.VisualStudio.Component.${vcToolsX64}` const express = 'Microsoft.VisualStudio.WDExpress' - if (info.packages.indexOf(pkg) !== -1) { - this.log.silly('- found VC.Tools.x86.x64') - } else if (info.packages.indexOf(express) !== -1) { + if (process.arch === 'arm64' && info.packages.includes(pkgArm64)) { + this.log.silly(`- found ${vcToolsArm64}`) + } else if (info.packages.includes(pkgX64)) { + if (process.arch === 'arm64') { + this.addLog(`- found ${vcToolsX64} on ARM64 platform. Expect less performance and/or link failure with ARM64 binary.`) + } else { + this.log.silly(`- found ${vcToolsX64}`) + } + } else if (info.packages.includes(express)) { this.log.silly('- found Visual Studio Express (looking for toolset)') } else { return null diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json index 4a1cfb0eb1a283..2bc123c87ed4c7 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": "11.0.0", + "version": "11.1.0", "installVersion": 11, "author": "Nathan Rajlich (http://tootallnate.net)", "repository": { diff --git a/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.cc b/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.cc index 169f8029f10fd2..c6e80aa31320d0 100644 --- a/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.cc +++ b/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.cc @@ -28,7 +28,9 @@ static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) { if (_stricmp(info->szDll, HOST_BINARY) != 0) return NULL; - m = GetModuleHandle(NULL); + // try for libnode.dll to compat node.js that using 'vcbuild.bat dll' + m = GetModuleHandle("libnode.dll"); + if (m == NULL) m = GetModuleHandle(NULL); return (FARPROC) m; } diff --git a/deps/npm/node_modules/nopt/README.md b/deps/npm/node_modules/nopt/README.md index a99531c04655fe..19ef097bb2c220 100644 --- a/deps/npm/node_modules/nopt/README.md +++ b/deps/npm/node_modules/nopt/README.md @@ -141,14 +141,15 @@ config object and remove its invalid properties. ## Error Handling -By default, nopt outputs a warning to standard error when invalid values for -known options are found. You can change this behavior by assigning a method -to `nopt.invalidHandler`. This method will be called with -the offending `nopt.invalidHandler(key, val, types)`. - -If no `nopt.invalidHandler` is assigned, then it will console.error -its whining. If it is assigned to boolean `false` then the warning is -suppressed. +By default nopt logs debug messages if `DEBUG_NOPT` or `NOPT_DEBUG` are set in the environment. + +You can assign the following methods to `nopt` for a more granular notification of invalid, unknown, and expanding options: + +`nopt.invalidHandler(key, value, type, data)` - Called when a value is invalid for its option. +`nopt.unknownHandler(key, next)` - Called when an option is found that has no configuration. In certain situations the next option on the command line will be parsed on its own instead of as part of the unknown option. In this case `next` will contain that option. +`nopt.abbrevHandler(short, long)` - Called when an option is automatically translated via abbreviations. + +You can also set any of these to `false` to disable the debugging messages that they generate. ## Abbreviations diff --git a/deps/npm/node_modules/nopt/lib/nopt-lib.js b/deps/npm/node_modules/nopt/lib/nopt-lib.js index d3d1de0255ba9b..441c9cc30377af 100644 --- a/deps/npm/node_modules/nopt/lib/nopt-lib.js +++ b/deps/npm/node_modules/nopt/lib/nopt-lib.js @@ -25,7 +25,9 @@ function nopt (args, { types, shorthands, typeDefs, - invalidHandler, + invalidHandler, // opt is configured but its value does not validate against given type + unknownHandler, // opt is not configured + abbrevHandler, // opt is being expanded via abbrev typeDefault, dynamicTypes, } = {}) { @@ -38,7 +40,9 @@ function nopt (args, { original: args.slice(0), } - parse(args, data, argv.remain, { typeDefs, types, dynamicTypes, shorthands }) + parse(args, data, argv.remain, { + typeDefs, types, dynamicTypes, shorthands, unknownHandler, abbrevHandler, + }) // now data is full clean(data, { types, dynamicTypes, typeDefs, invalidHandler, typeDefault }) @@ -247,6 +251,8 @@ function parse (args, data, remain, { typeDefs = {}, shorthands = {}, dynamicTypes, + unknownHandler, + abbrevHandler, } = {}) { const StringType = typeDefs.String?.type const NumberType = typeDefs.Number?.type @@ -282,7 +288,7 @@ function parse (args, data, remain, { // see if it's a shorthand // if so, splice and back up to re-parse it. - const shRes = resolveShort(arg, shortAbbr, abbrevs, { shorthands }) + const shRes = resolveShort(arg, shortAbbr, abbrevs, { shorthands, abbrevHandler }) debug('arg=%j shRes=%j', arg, shRes) if (shRes) { args.splice.apply(args, [i, 1].concat(shRes)) @@ -298,7 +304,13 @@ function parse (args, data, remain, { arg = arg.slice(3) } - if (abbrevs[arg]) { + // abbrev includes the original full string in its abbrev list + if (abbrevs[arg] && abbrevs[arg] !== arg) { + if (abbrevHandler) { + abbrevHandler(arg, abbrevs[arg]) + } else if (abbrevHandler !== false) { + debug(`abbrev: ${arg} -> ${abbrevs[arg]}`) + } arg = abbrevs[arg] } @@ -331,6 +343,23 @@ function parse (args, data, remain, { (argType === null || isTypeArray && ~argType.indexOf(null))) + if (typeof argType === 'undefined') { + // la is going to unexpectedly be parsed outside the context of this arg + const hangingLa = !hadEq && la && !la?.startsWith('-') && !['true', 'false'].includes(la) + if (unknownHandler) { + if (hangingLa) { + unknownHandler(arg, la) + } else { + unknownHandler(arg) + } + } else if (unknownHandler !== false) { + debug(`unknown: ${arg}`) + if (hangingLa) { + debug(`unknown: ${la} parsed as normal opt`) + } + } + } + if (isBool) { // just set and move along val = !no @@ -420,7 +449,7 @@ const singleCharacters = (arg, shorthands) => { } function resolveShort (arg, ...rest) { - const { types = {}, shorthands = {} } = rest.length ? rest.pop() : {} + const { abbrevHandler, types = {}, shorthands = {} } = rest.length ? rest.pop() : {} const shortAbbr = rest[0] ?? abbrev(Object.keys(shorthands)) const abbrevs = rest[1] ?? abbrev(Object.keys(types)) @@ -457,7 +486,13 @@ function resolveShort (arg, ...rest) { } // if it's an abbr for a shorthand, then use that + // exact match has already happened so we don't need to account for that here if (shortAbbr[arg]) { + if (abbrevHandler) { + abbrevHandler(arg, shortAbbr[arg]) + } else if (abbrevHandler !== false) { + debug(`abbrev: ${arg} -> ${shortAbbr[arg]}`) + } arg = shortAbbr[arg] } diff --git a/deps/npm/node_modules/nopt/lib/nopt.js b/deps/npm/node_modules/nopt/lib/nopt.js index 37f01a08783f87..9a24342b374aa0 100644 --- a/deps/npm/node_modules/nopt/lib/nopt.js +++ b/deps/npm/node_modules/nopt/lib/nopt.js @@ -18,6 +18,8 @@ function nopt (types, shorthands, args = process.argv, slice = 2) { shorthands: shorthands || {}, typeDefs: exports.typeDefs, invalidHandler: exports.invalidHandler, + unknownHandler: exports.unknownHandler, + abbrevHandler: exports.abbrevHandler, }) } @@ -26,5 +28,7 @@ function clean (data, types, typeDefs = exports.typeDefs) { types: types || {}, typeDefs, invalidHandler: exports.invalidHandler, + unknownHandler: exports.unknownHandler, + abbrevHandler: exports.abbrevHandler, }) } diff --git a/deps/npm/node_modules/nopt/node_modules/abbrev/LICENSE b/deps/npm/node_modules/nopt/node_modules/abbrev/LICENSE deleted file mode 100644 index 9bcfa9d7d8d26e..00000000000000 --- a/deps/npm/node_modules/nopt/node_modules/abbrev/LICENSE +++ /dev/null @@ -1,46 +0,0 @@ -This software is dual-licensed under the ISC and MIT licenses. -You may use this software under EITHER of the following licenses. - ----------- - -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. - ----------- - -Copyright Isaac Z. Schlueter and Contributors -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/nopt/node_modules/abbrev/lib/index.js b/deps/npm/node_modules/nopt/node_modules/abbrev/lib/index.js deleted file mode 100644 index 9f48801f049c9e..00000000000000 --- a/deps/npm/node_modules/nopt/node_modules/abbrev/lib/index.js +++ /dev/null @@ -1,50 +0,0 @@ -module.exports = abbrev - -function abbrev (...args) { - let list = args.length === 1 || Array.isArray(args[0]) ? args[0] : args - - for (let i = 0, l = list.length; i < l; i++) { - list[i] = typeof list[i] === 'string' ? list[i] : String(list[i]) - } - - // sort them lexicographically, so that they're next to their nearest kin - list = list.sort(lexSort) - - // walk through each, seeing how much it has in common with the next and previous - const abbrevs = {} - let prev = '' - for (let ii = 0, ll = list.length; ii < ll; ii++) { - const current = list[ii] - const next = list[ii + 1] || '' - let nextMatches = true - let prevMatches = true - if (current === next) { - continue - } - let j = 0 - const cl = current.length - for (; j < cl; j++) { - const curChar = current.charAt(j) - nextMatches = nextMatches && curChar === next.charAt(j) - prevMatches = prevMatches && curChar === prev.charAt(j) - if (!nextMatches && !prevMatches) { - j++ - break - } - } - prev = current - if (j === cl) { - abbrevs[current] = current - continue - } - for (let a = current.slice(0, j); j <= cl; j++) { - abbrevs[a] = current - a += current.charAt(j) - } - } - return abbrevs -} - -function lexSort (a, b) { - return a === b ? 0 : a > b ? 1 : -1 -} diff --git a/deps/npm/node_modules/nopt/node_modules/abbrev/package.json b/deps/npm/node_modules/nopt/node_modules/abbrev/package.json deleted file mode 100644 index e26400445631ad..00000000000000 --- a/deps/npm/node_modules/nopt/node_modules/abbrev/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "abbrev", - "version": "2.0.0", - "description": "Like ruby's abbrev module, but in js", - "author": "GitHub Inc.", - "main": "lib/index.js", - "scripts": { - "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": "https://github.com/npm/abbrev-js.git" - }, - "license": "ISC", - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.8.0", - "tap": "^16.3.0" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "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.8.0" - } -} diff --git a/deps/npm/node_modules/nopt/package.json b/deps/npm/node_modules/nopt/package.json index 508b8e28b59f70..0732ada73c1d00 100644 --- a/deps/npm/node_modules/nopt/package.json +++ b/deps/npm/node_modules/nopt/package.json @@ -1,6 +1,6 @@ { "name": "nopt", - "version": "8.0.0", + "version": "8.1.0", "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", "author": "GitHub Inc.", "main": "lib/nopt.js", @@ -23,11 +23,11 @@ }, "license": "ISC", "dependencies": { - "abbrev": "^2.0.0" + "abbrev": "^3.0.0" }, "devDependencies": { "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.3", + "@npmcli/template-oss": "4.23.6", "tap": "^16.3.0" }, "tap": { @@ -46,7 +46,7 @@ "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "windowsCI": false, - "version": "4.23.3", + "version": "4.23.6", "publish": true } } diff --git a/deps/npm/node_modules/npm-package-arg/lib/npa.js b/deps/npm/node_modules/npm-package-arg/lib/npa.js index e92605811ae3e6..d409b7f1becfcc 100644 --- a/deps/npm/node_modules/npm-package-arg/lib/npa.js +++ b/deps/npm/node_modules/npm-package-arg/lib/npa.js @@ -1,23 +1,24 @@ 'use strict' -module.exports = npa -module.exports.resolve = resolve -module.exports.toPurl = toPurl -module.exports.Result = Result -const { URL } = require('url') +const isWindows = process.platform === 'win32' + +const { URL } = require('node:url') +// We need to use path/win32 so that we get consistent results in tests, but this also means we need to manually convert backslashes to forward slashes when generating file: urls with paths. +const path = isWindows ? require('node:path/win32') : require('node:path') +const { homedir } = require('node:os') const HostedGit = require('hosted-git-info') const semver = require('semver') -const path = global.FAKE_WINDOWS ? require('path').win32 : require('path') const validatePackageName = require('validate-npm-package-name') -const { homedir } = require('os') const { log } = require('proc-log') -const isWindows = process.platform === 'win32' || global.FAKE_WINDOWS const hasSlashes = isWindows ? /\\|[/]/ : /[/]/ const isURL = /^(?:git[+])?[a-z]+:/i const isGit = /^[^@]+@[^:.]+\.[^:]+:.+$/i -const isFilename = /[.](?:tgz|tar.gz|tar)$/i +const isFileType = /[.](?:tgz|tar.gz|tar)$/i const isPortNumber = /:[0-9]+(\/|$)/i +const isWindowsFile = /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ +const isPosixFile = /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/ +const defaultRegistry = 'https://registry.npmjs.org' function npa (arg, where) { let name @@ -31,13 +32,14 @@ function npa (arg, where) { return npa(arg.raw, where || arg.where) } } - const nameEndsAt = arg[0] === '@' ? arg.slice(1).indexOf('@') + 1 : arg.indexOf('@') + const nameEndsAt = arg.indexOf('@', 1) // Skip possible leading @ const namePart = nameEndsAt > 0 ? arg.slice(0, nameEndsAt) : arg if (isURL.test(arg)) { spec = arg } else if (isGit.test(arg)) { spec = `git+ssh://${arg}` - } else if (namePart[0] !== '@' && (hasSlashes.test(namePart) || isFilename.test(namePart))) { + // eslint-disable-next-line max-len + } else if (!namePart.startsWith('@') && (hasSlashes.test(namePart) || isFileType.test(namePart))) { spec = arg } else if (nameEndsAt > 0) { name = namePart @@ -54,7 +56,27 @@ function npa (arg, where) { return resolve(name, spec, where, arg) } -const isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/ +function isFileSpec (spec) { + if (!spec) { + return false + } + if (spec.toLowerCase().startsWith('file:')) { + return true + } + if (isWindows) { + return isWindowsFile.test(spec) + } + // We never hit this in windows tests, obviously + /* istanbul ignore next */ + return isPosixFile.test(spec) +} + +function isAliasSpec (spec) { + if (!spec) { + return false + } + return spec.toLowerCase().startsWith('npm:') +} function resolve (name, spec, where, arg) { const res = new Result({ @@ -65,12 +87,16 @@ function resolve (name, spec, where, arg) { }) if (name) { - res.setName(name) + res.name = name } - if (spec && (isFilespec.test(spec) || /^file:/i.test(spec))) { + if (!where) { + where = process.cwd() + } + + if (isFileSpec(spec)) { return fromFile(res, where) - } else if (spec && /^npm:/i.test(spec)) { + } else if (isAliasSpec(spec)) { return fromAlias(res, where) } @@ -82,15 +108,13 @@ function resolve (name, spec, where, arg) { return fromHostedGit(res, hosted) } else if (spec && isURL.test(spec)) { return fromURL(res) - } else if (spec && (hasSlashes.test(spec) || isFilename.test(spec))) { + } else if (spec && (hasSlashes.test(spec) || isFileType.test(spec))) { return fromFile(res, where) } else { return fromRegistry(res) } } -const defaultRegistry = 'https://registry.npmjs.org' - function toPurl (arg, reg = defaultRegistry) { const res = npa(arg) @@ -128,60 +152,62 @@ function invalidPurlType (type, raw) { return err } -function Result (opts) { - this.type = opts.type - this.registry = opts.registry - this.where = opts.where - if (opts.raw == null) { - this.raw = opts.name ? opts.name + '@' + opts.rawSpec : opts.rawSpec - } else { - this.raw = opts.raw +class Result { + constructor (opts) { + this.type = opts.type + this.registry = opts.registry + this.where = opts.where + if (opts.raw == null) { + this.raw = opts.name ? `${opts.name}@${opts.rawSpec}` : opts.rawSpec + } else { + this.raw = opts.raw + } + this.name = undefined + this.escapedName = undefined + this.scope = undefined + this.rawSpec = opts.rawSpec || '' + this.saveSpec = opts.saveSpec + this.fetchSpec = opts.fetchSpec + if (opts.name) { + this.setName(opts.name) + } + this.gitRange = opts.gitRange + this.gitCommittish = opts.gitCommittish + this.gitSubdir = opts.gitSubdir + this.hosted = opts.hosted } - this.name = undefined - this.escapedName = undefined - this.scope = undefined - this.rawSpec = opts.rawSpec || '' - this.saveSpec = opts.saveSpec - this.fetchSpec = opts.fetchSpec - if (opts.name) { - this.setName(opts.name) - } - this.gitRange = opts.gitRange - this.gitCommittish = opts.gitCommittish - this.gitSubdir = opts.gitSubdir - this.hosted = opts.hosted -} + // TODO move this to a getter/setter in a semver major + setName (name) { + const valid = validatePackageName(name) + if (!valid.validForOldPackages) { + throw invalidPackageName(name, valid, this.raw) + } -Result.prototype.setName = function (name) { - const valid = validatePackageName(name) - if (!valid.validForOldPackages) { - throw invalidPackageName(name, valid, this.raw) + this.name = name + this.scope = name[0] === '@' ? name.slice(0, name.indexOf('/')) : undefined + // scoped packages in couch must have slash url-encoded, e.g. @foo%2Fbar + this.escapedName = name.replace('/', '%2f') + return this } - this.name = name - this.scope = name[0] === '@' ? name.slice(0, name.indexOf('/')) : undefined - // scoped packages in couch must have slash url-encoded, e.g. @foo%2Fbar - this.escapedName = name.replace('/', '%2f') - return this -} - -Result.prototype.toString = function () { - const full = [] - if (this.name != null && this.name !== '') { - full.push(this.name) - } - const spec = this.saveSpec || this.fetchSpec || this.rawSpec - if (spec != null && spec !== '') { - full.push(spec) + toString () { + const full = [] + if (this.name != null && this.name !== '') { + full.push(this.name) + } + const spec = this.saveSpec || this.fetchSpec || this.rawSpec + if (spec != null && spec !== '') { + full.push(spec) + } + return full.length ? full.join('@') : this.raw } - return full.length ? full.join('@') : this.raw -} -Result.prototype.toJSON = function () { - const result = Object.assign({}, this) - delete result.hosted - return result + toJSON () { + const result = Object.assign({}, this) + delete result.hosted + return result + } } // sets res.gitCommittish, res.gitRange, and res.gitSubdir @@ -228,25 +254,67 @@ function setGitAttrs (res, committish) { } } -function fromFile (res, where) { - if (!where) { - where = process.cwd() +// Taken from: EncodePathChars and lookup_table in src/node_url.cc +// url.pathToFileURL only returns absolute references. We can't use it to encode paths. +// encodeURI mangles windows paths. We can't use it to encode paths. +// Under the hood, url.pathToFileURL does a limited set of encoding, with an extra windows step, and then calls path.resolve. +// The encoding node does without path.resolve is not available outside of the source, so we are recreating it here. +const encodedPathChars = new Map([ + ['\0', '%00'], + ['\t', '%09'], + ['\n', '%0A'], + ['\r', '%0D'], + [' ', '%20'], + ['"', '%22'], + ['#', '%23'], + ['%', '%25'], + ['?', '%3F'], + ['[', '%5B'], + ['\\', isWindows ? '/' : '%5C'], + [']', '%5D'], + ['^', '%5E'], + ['|', '%7C'], + ['~', '%7E'], +]) + +function pathToFileURL (str) { + let result = '' + for (let i = 0; i < str.length; i++) { + result = `${result}${encodedPathChars.get(str[i]) ?? str[i]}` + } + if (result.startsWith('file:')) { + return result } - res.type = isFilename.test(res.rawSpec) ? 'file' : 'directory' + return `file:${result}` +} + +function fromFile (res, where) { + res.type = isFileType.test(res.rawSpec) ? 'file' : 'directory' res.where = where - // always put the '/' on where when resolving urls, or else - // file:foo from /path/to/bar goes to /path/to/foo, when we want - // it to be /path/to/bar/foo + let rawSpec = pathToFileURL(res.rawSpec) + + if (rawSpec.startsWith('file:/')) { + // XXX backwards compatibility lack of compliance with RFC 8089 + + // turn file://path into file:/path + if (/^file:\/\/[^/]/.test(rawSpec)) { + rawSpec = `file:/${rawSpec.slice(5)}` + } + + // turn file:/../path into file:../path + // for 1 or 3 leading slashes (2 is already ruled out from handling file:// explicitly above) + if (/^\/{1,3}\.\.?(\/|$)/.test(rawSpec.slice(5))) { + rawSpec = rawSpec.replace(/^file:\/{1,3}/, 'file:') + } + } - let specUrl let resolvedUrl - const prefix = (!/^file:/.test(res.rawSpec) ? 'file:' : '') - const rawWithPrefix = prefix + res.rawSpec - let rawNoPrefix = rawWithPrefix.replace(/^file:/, '') + let specUrl try { - resolvedUrl = new URL(rawWithPrefix, `file://${path.resolve(where)}/`) - specUrl = new URL(rawWithPrefix) + // always put the '/' on "where", or else file:foo from /path/to/bar goes to /path/to/foo, when we want it to be /path/to/bar/foo + resolvedUrl = new URL(rawSpec, `${pathToFileURL(path.resolve(where))}/`) + specUrl = new URL(rawSpec) } catch (originalError) { const er = new Error('Invalid file: URL, must comply with RFC 8089') throw Object.assign(er, { @@ -257,24 +325,6 @@ function fromFile (res, where) { }) } - // XXX backwards compatibility lack of compliance with RFC 8089 - if (resolvedUrl.host && resolvedUrl.host !== 'localhost') { - const rawSpec = res.rawSpec.replace(/^file:\/\//, 'file:///') - resolvedUrl = new URL(rawSpec, `file://${path.resolve(where)}/`) - specUrl = new URL(rawSpec) - rawNoPrefix = rawSpec.replace(/^file:/, '') - } - // turn file:/../foo into file:../foo - // for 1, 2 or 3 leading slashes since we attempted - // in the previous step to make it a file protocol url with a leading slash - if (/^\/{1,3}\.\.?(\/|$)/.test(rawNoPrefix)) { - const rawSpec = res.rawSpec.replace(/^file:\/{1,3}/, 'file:') - resolvedUrl = new URL(rawSpec, `file://${path.resolve(where)}/`) - specUrl = new URL(rawSpec) - rawNoPrefix = rawSpec.replace(/^file:/, '') - } - // XXX end RFC 8089 violation backwards compatibility section - // turn /C:/blah into just C:/blah on windows let specPath = decodeURIComponent(specUrl.pathname) let resolvedPath = decodeURIComponent(resolvedUrl.pathname) @@ -288,13 +338,21 @@ function fromFile (res, where) { if (/^\/~(\/|$)/.test(specPath)) { res.saveSpec = `file:${specPath.substr(1)}` resolvedPath = path.resolve(homedir(), specPath.substr(3)) - } else if (!path.isAbsolute(rawNoPrefix)) { + } else if (!path.isAbsolute(rawSpec.slice(5))) { res.saveSpec = `file:${path.relative(where, resolvedPath)}` } else { res.saveSpec = `file:${path.resolve(resolvedPath)}` } res.fetchSpec = path.resolve(where, resolvedPath) + // re-normalize the slashes in saveSpec due to node:path/win32 behavior in windows + res.saveSpec = res.saveSpec.split('\\').join('/') + // Ignoring because this only happens in windows + /* istanbul ignore next */ + if (res.saveSpec.startsWith('file://')) { + // normalization of \\win32\root paths can cause a double / which we don't want + res.saveSpec = `file:/${res.saveSpec.slice(7)}` + } return res } @@ -416,3 +474,8 @@ function fromRegistry (res) { } return res } + +module.exports = npa +module.exports.resolve = resolve +module.exports.toPurl = toPurl +module.exports.Result = Result diff --git a/deps/npm/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/npm-package-arg/package.json index ab285eb6c610c6..58920fe240e5fc 100644 --- a/deps/npm/node_modules/npm-package-arg/package.json +++ b/deps/npm/node_modules/npm-package-arg/package.json @@ -1,6 +1,6 @@ { "name": "npm-package-arg", - "version": "12.0.1", + "version": "12.0.2", "description": "Parse the things that can be arguments to `npm install`", "main": "./lib/npa.js", "directories": { @@ -18,7 +18,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.4", + "@npmcli/template-oss": "4.23.5", "tap": "^16.0.1" }, "scripts": { @@ -55,7 +55,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.4", + "version": "4.23.5", "publish": true } } diff --git a/deps/npm/node_modules/promise-inflight/LICENSE b/deps/npm/node_modules/promise-inflight/LICENSE deleted file mode 100644 index 83e7c4c62903d7..00000000000000 --- a/deps/npm/node_modules/promise-inflight/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2017, Rebecca Turner - -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/promise-inflight/inflight.js b/deps/npm/node_modules/promise-inflight/inflight.js deleted file mode 100644 index ce054d34be8595..00000000000000 --- a/deps/npm/node_modules/promise-inflight/inflight.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict' -module.exports = inflight - -let Bluebird -try { - Bluebird = require('bluebird') -} catch (_) { - Bluebird = Promise -} - -const active = {} -inflight.active = active -function inflight (unique, doFly) { - return Bluebird.all([unique, doFly]).then(function (args) { - const unique = args[0] - const doFly = args[1] - if (Array.isArray(unique)) { - return Bluebird.all(unique).then(function (uniqueArr) { - return _inflight(uniqueArr.join(''), doFly) - }) - } else { - return _inflight(unique, doFly) - } - }) - - function _inflight (unique, doFly) { - if (!active[unique]) { - active[unique] = (new Bluebird(function (resolve) { - return resolve(doFly()) - })) - active[unique].then(cleanup, cleanup) - function cleanup() { delete active[unique] } - } - return active[unique] - } -} diff --git a/deps/npm/node_modules/promise-inflight/package.json b/deps/npm/node_modules/promise-inflight/package.json deleted file mode 100644 index 0d8930c5b6d492..00000000000000 --- a/deps/npm/node_modules/promise-inflight/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "promise-inflight", - "version": "1.0.1", - "description": "One promise for multiple requests in flight to avoid async duplication", - "main": "inflight.js", - "files": [ - "inflight.js" - ], - "license": "ISC", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "Rebecca Turner (http://re-becca.org/)", - "devDependencies": {}, - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/promise-inflight.git" - }, - "bugs": { - "url": "https://github.com/iarna/promise-inflight/issues" - }, - "homepage": "https://github.com/iarna/promise-inflight#readme" -} diff --git a/deps/npm/node_modules/read/dist/commonjs/read.js b/deps/npm/node_modules/read/dist/commonjs/read.js index c0600d2b4e8cae..744a5f3bf4baf8 100644 --- a/deps/npm/node_modules/read/dist/commonjs/read.js +++ b/deps/npm/node_modules/read/dist/commonjs/read.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.read = read; const mute_stream_1 = __importDefault(require("mute-stream")); const readline_1 = require("readline"); -async function read({ default: def, input = process.stdin, output = process.stdout, completer, prompt = '', silent, timeout, edit, terminal, replace, }) { +async function read({ default: def, input = process.stdin, output = process.stdout, completer, prompt = '', silent, timeout, edit, terminal, replace, history, }) { if (typeof def !== 'undefined' && typeof def !== 'string' && typeof def !== 'number') { @@ -34,7 +34,7 @@ async function read({ default: def, input = process.stdin, output = process.stdo m.pipe(output, { end: false }); output = m; return new Promise((resolve, reject) => { - const rl = (0, readline_1.createInterface)({ input, output, terminal, completer }); + const rl = (0, readline_1.createInterface)({ input, output, terminal, completer, history }); // TODO: add tests for timeout /* c8 ignore start */ const timer = timeout && setTimeout(() => onError(new Error('timed out')), timeout); diff --git a/deps/npm/node_modules/read/dist/esm/read.js b/deps/npm/node_modules/read/dist/esm/read.js index 716d394c876ac9..672be49ae88a76 100644 --- a/deps/npm/node_modules/read/dist/esm/read.js +++ b/deps/npm/node_modules/read/dist/esm/read.js @@ -1,6 +1,6 @@ import Mute from 'mute-stream'; import { createInterface } from 'readline'; -export async function read({ default: def, input = process.stdin, output = process.stdout, completer, prompt = '', silent, timeout, edit, terminal, replace, }) { +export async function read({ default: def, input = process.stdin, output = process.stdout, completer, prompt = '', silent, timeout, edit, terminal, replace, history, }) { if (typeof def !== 'undefined' && typeof def !== 'string' && typeof def !== 'number') { @@ -28,7 +28,7 @@ export async function read({ default: def, input = process.stdin, output = proce m.pipe(output, { end: false }); output = m; return new Promise((resolve, reject) => { - const rl = createInterface({ input, output, terminal, completer }); + const rl = createInterface({ input, output, terminal, completer, history }); // TODO: add tests for timeout /* c8 ignore start */ const timer = timeout && setTimeout(() => onError(new Error('timed out')), timeout); diff --git a/deps/npm/node_modules/read/package.json b/deps/npm/node_modules/read/package.json index 337f7d26d4dd94..1d88f22dd59f52 100644 --- a/deps/npm/node_modules/read/package.json +++ b/deps/npm/node_modules/read/package.json @@ -1,6 +1,6 @@ { "name": "read", - "version": "4.0.0", + "version": "4.1.0", "exports": { "./package.json": "./package.json", ".": { diff --git a/deps/npm/node_modules/semver/README.md b/deps/npm/node_modules/semver/README.md index b31570c9514e1c..67c311f87ca3cd 100644 --- a/deps/npm/node_modules/semver/README.md +++ b/deps/npm/node_modules/semver/README.md @@ -100,7 +100,7 @@ Options: -i --increment [] Increment a version by the specified level. Level can be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. + prepatch, prerelease, or release. Default level is 'patch'. Only one version may be specified. --preid @@ -141,6 +141,8 @@ A "version" is described by the `v2.0.0` specification found at . A leading `"="` or `"v"` character is stripped off and ignored. +Support for stripping a leading "v" is kept for compatibility with `v1.0.0` of the SemVer +specification but should not be used anymore. ## Ranges @@ -237,6 +239,13 @@ $ semver 1.2.4-beta.0 -i prerelease 1.2.4-beta.1 ``` +To get out of the prerelease phase, use the `release` option: + +```bash +$ semver 1.2.4-beta.1 -i release +1.2.4 +``` + #### Prerelease Identifier Base The method `.inc` takes an optional parameter 'identifierBase' string @@ -415,10 +424,10 @@ Strict-mode Comparators and Ranges will be strict about the SemVer strings that they parse. * `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release, options, identifier, identifierBase)`: +* `inc(v, releaseType, options, identifier, identifierBase)`: Return the version incremented by the release type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid + `prepatch`, `prerelease`, or `release`), or null if it's not valid * `premajor` in one call will bump the version up to the next major version and down to a prerelease of that major version. `preminor`, and `prepatch` work the same way. @@ -426,6 +435,7 @@ strings that they parse. same as `prepatch`. It increments the patch version and then makes a prerelease. If the input version is already a prerelease it simply increments it. + * `release` will remove any prerelease part of the version. * `identifier` can be used to prefix `premajor`, `preminor`, `prepatch`, or `prerelease` version increments. `identifierBase` is the base to be used for the `prerelease` identifier. @@ -477,7 +487,7 @@ strings that they parse. ### Ranges -* `validRange(range)`: Return the valid range or null if it's not valid +* `validRange(range)`: Return the valid range or null if it's not valid. * `satisfies(version, range)`: Return true if the version satisfies the range. * `maxSatisfying(versions, range)`: Return the highest version in the list diff --git a/deps/npm/node_modules/semver/bin/semver.js b/deps/npm/node_modules/semver/bin/semver.js index f62b566f74bc63..22fc76ea2506e8 100755 --- a/deps/npm/node_modules/semver/bin/semver.js +++ b/deps/npm/node_modules/semver/bin/semver.js @@ -61,6 +61,7 @@ const main = () => { switch (argv[0]) { case 'major': case 'minor': case 'patch': case 'prerelease': case 'premajor': case 'preminor': case 'prepatch': + case 'release': inc = argv.shift() break default: @@ -149,7 +150,7 @@ Options: -i --increment [] Increment a version by the specified level. Level can be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. + prepatch, prerelease, or release. Default level is 'patch'. Only one version may be specified. --preid diff --git a/deps/npm/node_modules/semver/classes/semver.js b/deps/npm/node_modules/semver/classes/semver.js index 13e66ce4415694..6fbc062bc246a1 100644 --- a/deps/npm/node_modules/semver/classes/semver.js +++ b/deps/npm/node_modules/semver/classes/semver.js @@ -1,6 +1,6 @@ const debug = require('../internal/debug') const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants') -const { safeRe: re, t } = require('../internal/re') +const { safeRe: re, safeSrc: src, t } = require('../internal/re') const parseOptions = require('../internal/parse-options') const { compareIdentifiers } = require('../internal/identifiers') @@ -10,7 +10,7 @@ class SemVer { if (version instanceof SemVer) { if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { + version.includePrerelease === !!options.includePrerelease) { return version } else { version = version.version @@ -176,6 +176,20 @@ class SemVer { // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. inc (release, identifier, identifierBase) { + if (release.startsWith('pre')) { + if (!identifier && identifierBase === false) { + throw new Error('invalid increment argument: identifier is empty') + } + // Avoid an invalid semver results + if (identifier) { + const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`) + const match = `-${identifier}`.match(r) + if (!match || match[1] !== identifier) { + throw new Error(`invalid identifier: ${identifier}`) + } + } + } + switch (release) { case 'premajor': this.prerelease.length = 0 @@ -206,6 +220,12 @@ class SemVer { } this.inc('pre', identifier, identifierBase) break + case 'release': + if (this.prerelease.length === 0) { + throw new Error(`version ${this.raw} is not a prerelease`) + } + this.prerelease.length = 0 + break case 'major': // If this is a pre-major version, bump up to the same major version. @@ -249,10 +269,6 @@ class SemVer { case 'pre': { const base = Number(identifierBase) ? 1 : 0 - if (!identifier && identifierBase === false) { - throw new Error('invalid increment argument: identifier is empty') - } - if (this.prerelease.length === 0) { this.prerelease = [base] } else { diff --git a/deps/npm/node_modules/semver/functions/diff.js b/deps/npm/node_modules/semver/functions/diff.js index fc224e302c0e42..33171dc1ca45ae 100644 --- a/deps/npm/node_modules/semver/functions/diff.js +++ b/deps/npm/node_modules/semver/functions/diff.js @@ -27,20 +27,13 @@ const diff = (version1, version2) => { return 'major' } - // Otherwise it can be determined by checking the high version - - if (highVersion.patch) { - // anything higher than a patch bump would result in the wrong version + // If the main part has no difference + if (lowVersion.compareMain(highVersion) === 0) { + if (lowVersion.minor && !lowVersion.patch) { + return 'minor' + } return 'patch' } - - if (highVersion.minor) { - // anything higher than a minor bump would result in the wrong version - return 'minor' - } - - // bumping major/minor/patch all have same result - return 'major' } // add the `pre` prefix if we are going to a prerelease version diff --git a/deps/npm/node_modules/semver/internal/re.js b/deps/npm/node_modules/semver/internal/re.js index fd8920e7baa717..2a956ba0a318de 100644 --- a/deps/npm/node_modules/semver/internal/re.js +++ b/deps/npm/node_modules/semver/internal/re.js @@ -10,6 +10,7 @@ exports = module.exports = {} const re = exports.re = [] const safeRe = exports.safeRe = [] const src = exports.src = [] +const safeSrc = exports.safeSrc = [] const t = exports.t = {} let R = 0 @@ -42,6 +43,7 @@ const createToken = (name, value, isGlobal) => { debug(name, index, value) t[name] = index src[index] = value + safeSrc[index] = safe re[index] = new RegExp(value, isGlobal ? 'g' : undefined) safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) } diff --git a/deps/npm/node_modules/semver/package.json b/deps/npm/node_modules/semver/package.json index 663d3701b7e6b0..c2644547a2a678 100644 --- a/deps/npm/node_modules/semver/package.json +++ b/deps/npm/node_modules/semver/package.json @@ -1,20 +1,21 @@ { "name": "semver", - "version": "7.6.3", + "version": "7.7.1", "description": "The semantic version parser used by npm.", "main": "index.js", "scripts": { "test": "tap", "snap": "tap", - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", + "lint": "npm run eslint", "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", + "lintfix": "npm run eslint -- --fix", "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" + "template-oss-apply": "template-oss-apply --force", + "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" }, "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.22.0", + "@npmcli/eslint-config": "^5.0.0", + "@npmcli/template-oss": "4.23.4", "benchmark": "^2.1.4", "tap": "^16.0.0" }, @@ -51,7 +52,7 @@ "author": "GitHub Inc.", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.22.0", + "version": "4.23.4", "engines": ">=10", "distPaths": [ "classes/", diff --git a/deps/npm/node_modules/sigstore/dist/sigstore.js b/deps/npm/node_modules/sigstore/dist/sigstore.js index c45524bbe21c22..b82b6208d45dfa 100644 --- a/deps/npm/node_modules/sigstore/dist/sigstore.js +++ b/deps/npm/node_modules/sigstore/dist/sigstore.js @@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.sign = sign; exports.attest = attest; diff --git a/deps/npm/node_modules/sigstore/package.json b/deps/npm/node_modules/sigstore/package.json index 0f798a263657b4..dab40a8ea8fbc6 100644 --- a/deps/npm/node_modules/sigstore/package.json +++ b/deps/npm/node_modules/sigstore/package.json @@ -1,6 +1,6 @@ { "name": "sigstore", - "version": "3.0.0", + "version": "3.1.0", "description": "code-signing for npm packages", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -29,17 +29,17 @@ "devDependencies": { "@sigstore/rekor-types": "^3.0.0", "@sigstore/jest": "^0.0.0", - "@sigstore/mock": "^0.8.0", + "@sigstore/mock": "^0.10.0", "@tufjs/repo-mock": "^3.0.1", "@types/make-fetch-happen": "^10.0.4" }, "dependencies": { - "@sigstore/bundle": "^3.0.0", + "@sigstore/bundle": "^3.1.0", "@sigstore/core": "^2.0.0", - "@sigstore/protobuf-specs": "^0.3.2", - "@sigstore/sign": "^3.0.0", - "@sigstore/tuf": "^3.0.0", - "@sigstore/verify": "^2.0.0" + "@sigstore/protobuf-specs": "^0.4.0", + "@sigstore/sign": "^3.1.0", + "@sigstore/tuf": "^3.1.0", + "@sigstore/verify": "^2.1.0" }, "engines": { "node": "^18.17.0 || >=20.5.0" diff --git a/deps/npm/node_modules/socks/package.json b/deps/npm/node_modules/socks/package.json index 5cc2a6836072e5..1c4018b8606448 100644 --- a/deps/npm/node_modules/socks/package.json +++ b/deps/npm/node_modules/socks/package.json @@ -1,7 +1,7 @@ { "name": "socks", "private": false, - "version": "2.8.3", + "version": "2.8.4", "description": "Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.", "main": "build/index.js", "typings": "typings/index.d.ts", diff --git a/deps/npm/node_modules/supports-color/browser.js b/deps/npm/node_modules/supports-color/browser.js index 1ffde642ae2eac..f9008d8e713572 100644 --- a/deps/npm/node_modules/supports-color/browser.js +++ b/deps/npm/node_modules/supports-color/browser.js @@ -1,14 +1,19 @@ /* eslint-env browser */ +/* eslint-disable n/no-unsupported-features/node-builtins */ const level = (() => { - if (navigator.userAgentData) { + if (!('navigator' in globalThis)) { + return 0; + } + + if (globalThis.navigator.userAgentData) { const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium'); if (brand?.version > 93) { return 3; } } - if (/\b(Chrome|Chromium)\//.test(navigator.userAgent)) { + if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) { return 1; } diff --git a/deps/npm/node_modules/supports-color/index.js b/deps/npm/node_modules/supports-color/index.js index 4ce0a2da8d2242..b22d50edbdc52b 100644 --- a/deps/npm/node_modules/supports-color/index.js +++ b/deps/npm/node_modules/supports-color/index.js @@ -31,17 +31,29 @@ if ( } function envForceColor() { - if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === 'true') { - return 1; - } + if (!('FORCE_COLOR' in env)) { + return; + } - if (env.FORCE_COLOR === 'false') { - return 0; - } + if (env.FORCE_COLOR === 'true') { + return 1; + } + + if (env.FORCE_COLOR === 'false') { + return 0; + } - return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3); + if (env.FORCE_COLOR.length === 0) { + return 1; } + + const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3); + + if (![0, 1, 2, 3].includes(level)) { + return; + } + + return level; } function translateLevel(level) { @@ -112,11 +124,11 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) { } if ('CI' in env) { - if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) { + if (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) { return 3; } - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + if (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { return 1; } diff --git a/deps/npm/node_modules/supports-color/package.json b/deps/npm/node_modules/supports-color/package.json index 738684722643c9..8f71b410982b49 100644 --- a/deps/npm/node_modules/supports-color/package.json +++ b/deps/npm/node_modules/supports-color/package.json @@ -1,6 +1,6 @@ { "name": "supports-color", - "version": "9.4.0", + "version": "10.0.0", "description": "Detect whether a terminal supports color", "license": "MIT", "repository": "chalk/supports-color", @@ -12,15 +12,16 @@ }, "type": "module", "exports": { + "types": "./index.d.ts", "node": "./index.js", "default": "./browser.js" }, + "sideEffects": false, "engines": { - "node": ">=12" + "node": ">=18" }, "scripts": { - "//test": "xo && ava && tsd", - "test": "tsd" + "test": "xo && ava && tsd" }, "files": [ "index.js", @@ -51,10 +52,13 @@ "16m" ], "devDependencies": { - "@types/node": "^20.3.2", - "ava": "^5.3.1", - "import-fresh": "^3.3.0", - "tsd": "^0.18.0", - "xo": "^0.54.2" + "@types/node": "^22.10.2", + "ava": "^6.2.0", + "tsd": "^0.31.2", + "xo": "^0.60.0" + }, + "ava": { + "serial": true, + "workerThreads": false } } diff --git a/deps/npm/package.json b/deps/npm/package.json index 2494292ec55c94..2a06813e7db90b 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "11.1.0", + "version": "11.2.0", "name": "npm", "description": "a package manager for JavaScript", "workspaces": [ @@ -52,13 +52,13 @@ }, "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^9.0.0", - "@npmcli/config": "^10.0.1", + "@npmcli/arborist": "^9.0.1", + "@npmcli/config": "^10.1.0", "@npmcli/fs": "^4.0.0", "@npmcli/map-workspaces": "^4.0.2", "@npmcli/package-json": "^6.1.1", "@npmcli/promise-spawn": "^8.0.2", - "@npmcli/redact": "^3.0.0", + "@npmcli/redact": "^3.1.1", "@npmcli/run-script": "^9.0.1", "@sigstore/tuf": "^3.0.0", "abbrev": "^3.0.0", @@ -74,14 +74,14 @@ "hosted-git-info": "^8.0.2", "ini": "^5.0.0", "init-package-json": "^8.0.0", - "is-cidr": "^5.1.0", + "is-cidr": "^5.1.1", "json-parse-even-better-errors": "^4.0.0", "libnpmaccess": "^10.0.0", - "libnpmdiff": "^8.0.0", - "libnpmexec": "^10.0.0", - "libnpmfund": "^7.0.0", + "libnpmdiff": "^8.0.1", + "libnpmexec": "^10.1.0", + "libnpmfund": "^7.0.1", "libnpmorg": "^8.0.0", - "libnpmpack": "^9.0.0", + "libnpmpack": "^9.0.1", "libnpmpublish": "^11.0.0", "libnpmsearch": "^9.0.0", "libnpmteam": "^8.0.0", @@ -91,12 +91,12 @@ "minipass": "^7.1.1", "minipass-pipeline": "^1.2.4", "ms": "^2.1.2", - "node-gyp": "^11.0.0", - "nopt": "^8.0.0", + "node-gyp": "^11.1.0", + "nopt": "^8.1.0", "normalize-package-data": "^7.0.0", "npm-audit-report": "^6.0.0", "npm-install-checks": "^7.1.1", - "npm-package-arg": "^12.0.1", + "npm-package-arg": "^12.0.2", "npm-pick-manifest": "^10.0.0", "npm-profile": "^11.0.1", "npm-registry-fetch": "^18.0.2", @@ -106,11 +106,11 @@ "parse-conflict-json": "^4.0.0", "proc-log": "^5.0.0", "qrcode-terminal": "^0.12.0", - "read": "^4.0.0", - "semver": "^7.6.3", + "read": "^4.1.0", + "semver": "^7.7.1", "spdx-expression-parse": "^4.0.0", "ssri": "^12.0.0", - "supports-color": "^9.4.0", + "supports-color": "^10.0.0", "tar": "^6.2.1", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", @@ -189,7 +189,7 @@ "devDependencies": { "@npmcli/docs": "^1.0.0", "@npmcli/eslint-config": "^5.1.0", - "@npmcli/git": "^6.0.1", + "@npmcli/git": "^6.0.3", "@npmcli/mock-globals": "^1.0.0", "@npmcli/mock-registry": "^1.0.0", "@npmcli/template-oss": "4.23.6", diff --git a/deps/npm/tap-snapshots/test/lib/cli/update-notifier.js.test.cjs b/deps/npm/tap-snapshots/test/lib/cli/update-notifier.js.test.cjs index 244d5216340f80..8736ee4623cd43 100644 --- a/deps/npm/tap-snapshots/test/lib/cli/update-notifier.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/cli/update-notifier.js.test.cjs @@ -5,6 +5,14 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' +exports[`test/lib/cli/update-notifier.js TAP notification situation with engine compatibility > must match snapshot 1`] = ` + +New minor version of npm available! 123.420.70 -> 123.421.60 +Changelog: https://github.com/npm/cli/releases/tag/v123.421.60 +To update run: npm install -g npm@123.421.60 + +` + exports[`test/lib/cli/update-notifier.js TAP notification situations 122.420.69 - color=always > must match snapshot 1`] = ` New major version of npm available! 122.420.69 -> 123.420.69 diff --git a/deps/npm/tap-snapshots/test/lib/commands/cache.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/cache.js.test.cjs index 1cd699453478e7..d5ce43922f0247 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/cache.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/cache.js.test.cjs @@ -41,6 +41,82 @@ make-fetch-happen:request-cache:https://registry.npmjs.org/foo make-fetch-happen:request-cache:https://registry.npmjs.org/foo/-/foo-1.2.3-beta.tgz ` +exports[`test/lib/commands/cache.js TAP cache npx info: valid and invalid entry > shows invalid package info 1`] = ` +invalid npx cache entry with key deadbeef +location: {CWD}/cache/_npx/deadbeef + +invalid npx cache entry with key badc0de +location: {CWD}/cache/_npx/badc0de +` + +exports[`test/lib/commands/cache.js TAP cache npx info: valid and invalid entry > shows valid package info 1`] = ` +invalid npx cache entry with key deadbeef +location: {CWD}/cache/_npx/deadbeef +` + +exports[`test/lib/commands/cache.js TAP cache npx info: valid entry with _npx directory package > shows valid package info with _npx directory package 1`] = ` +valid npx cache entry with key valid123 +location: {CWD}/cache/_npx/valid123 +packages: +- /path/to/valid-package +` + +exports[`test/lib/commands/cache.js TAP cache npx info: valid entry with _npx packages > shows valid package info with _npx packages 1`] = ` +valid npx cache entry with key valid123 +location: {CWD}/cache/_npx/valid123 +packages: +- valid-package@1.0.0 (valid-package@1.0.0) +` + +exports[`test/lib/commands/cache.js TAP cache npx info: valid entry with a link dependency > shows link dependency realpath (child.isLink branch) 1`] = ` +valid npx cache entry with key link123 +location: {CWD}/cache/_npx/link123 +packages: (unknown) +dependencies: +- {CWD}/cache/_npx/some-other-loc +` + +exports[`test/lib/commands/cache.js TAP cache npx info: valid entry with dependencies > shows valid package info with dependencies 1`] = ` +valid npx cache entry with key valid456 +location: {CWD}/cache/_npx/valid456 +packages: (unknown) +dependencies: +- dep-package@1.0.0 +` + +exports[`test/lib/commands/cache.js TAP cache npx ls: empty cache > logs message for empty npx cache 1`] = ` +npx cache does not exist +` + +exports[`test/lib/commands/cache.js TAP cache npx ls: entry with unknown package > lists entry with unknown package 1`] = ` +unknown123: (unknown) +` + +exports[`test/lib/commands/cache.js TAP cache npx ls: some entries > lists one valid and one invalid entry 1`] = ` +abc123: fake-npx-package@1.0.0 +z9y8x7: (empty/invalid) +` + +exports[`test/lib/commands/cache.js TAP cache npx rm: remove single entry > logs removing single npx cache entry 1`] = ` +Removing npx key at {CWD}/cache/_npx/123removeme +Removing npx key at {CWD}/cache/_npx/123removeme +` + +exports[`test/lib/commands/cache.js TAP cache npx rm: removing all with --force works > logs removing everything 1`] = ` +Removing npx key at {CWD}/cache/_npx/remove-all-yes-force +` + +exports[`test/lib/commands/cache.js TAP cache npx rm: removing all without --force fails > logs usage error when removing all without --force 1`] = ` + +` + +exports[`test/lib/commands/cache.js TAP cache npx rm: removing more than 1, less than all entries > logs removing 2 of 3 entries 1`] = ` +Removing npx key at {CWD}/cache/_npx/123removeme +Removing npx key at {CWD}/cache/_npx/456removeme +Removing npx key at {CWD}/cache/_npx/123removeme +Removing npx key at {CWD}/cache/_npx/456removeme +` + exports[`test/lib/commands/cache.js TAP cache rm > logs deleting single entry 1`] = ` Deleted: make-fetch-happen:request-cache:https://registry.npmjs.org/test-package/-/test-package-1.0.0.tgz ` diff --git a/deps/npm/tap-snapshots/test/lib/commands/config.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/config.js.test.cjs index 0d62bacd45fa19..f4058ee9c600f5 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/config.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/config.js.test.cjs @@ -74,6 +74,7 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna "init-author-url": "", "init-license": "ISC", "init-module": "{CWD}/home/.npm-init.js", + "init-type": "commonjs", "init-version": "1.0.0", "init.author.email": "", "init.author.name": "", @@ -237,6 +238,7 @@ init-author-name = "" init-author-url = "" init-license = "ISC" init-module = "{CWD}/home/.npm-init.js" +init-type = "commonjs" init-version = "1.0.0" init.author.email = "" init.author.name = "" @@ -413,6 +415,13 @@ color = {COLOR} ; "publishConfig" from {CWD}/prefix/package.json ; This set of config values will be used at publish-time. -_authToken = (protected) +//some.registry:_authToken = (protected) +other = "not defined" registry = "https://some.registry" ` + +exports[`test/lib/commands/config.js TAP config list with publishConfig local > warns about unknown config 1`] = ` +Array [ + "Unknown publishConfig config /"other/". This will stop working in the next major version of npm.", +] +` diff --git a/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs index c36e9c190483eb..dd07bce07de7f0 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs @@ -135,8 +135,8 @@ verbose stack Error: The developer of this package has specified the following t verbose stack Invalid engine "runtime" verbose stack Invalid name "nondescript" does not match "node" for "runtime" verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) -verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:251:7) -verbose stack at MockNpm.exec ({CWD}/lib/npm.js:207:9) +verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7) +verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9) error code EBADDEVENGINES error EBADDEVENGINES The developer of this package has specified the following through devEngines error EBADDEVENGINES Invalid engine "runtime" @@ -200,8 +200,8 @@ verbose stack Error: The developer of this package has specified the following t verbose stack Invalid engine "runtime" verbose stack Invalid name "nondescript" does not match "node" for "runtime" verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) -verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:251:7) -verbose stack at MockNpm.exec ({CWD}/lib/npm.js:207:9) +verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7) +verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9) error code EBADDEVENGINES error EBADDEVENGINES The developer of this package has specified the following through devEngines error EBADDEVENGINES Invalid engine "runtime" @@ -226,8 +226,8 @@ verbose stack Error: The developer of this package has specified the following t verbose stack Invalid engine "runtime" verbose stack Invalid name "nondescript" does not match "node" for "runtime" verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) -verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:251:7) -verbose stack at MockNpm.exec ({CWD}/lib/npm.js:207:9) +verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7) +verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9) error code EBADDEVENGINES error EBADDEVENGINES The developer of this package has specified the following through devEngines error EBADDEVENGINES Invalid engine "runtime" diff --git a/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs index 81c7dbe908d24e..4d3606b93bfa6c 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs @@ -290,6 +290,15 @@ exports[`test/lib/commands/publish.js TAP re-loads publishConfig.registry if add exports[`test/lib/commands/publish.js TAP respects publishConfig.registry, runs appropriate scripts > new package version 1`] = ` +> @npmcli/test-package@1.0.0 prepublishOnly +> touch scripts-prepublishonly + +> @npmcli/test-package@1.0.0 publish +> touch scripts-publish + +> @npmcli/test-package@1.0.0 postpublish +> touch scripts-postpublish ++ @npmcli/test-package@1.0.0 ` exports[`test/lib/commands/publish.js TAP restricted access > must match snapshot 1`] = ` diff --git a/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs b/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs index 6064ed581c1f8b..30ed3474024192 100644 --- a/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs @@ -854,6 +854,16 @@ more information, or [npm init](/commands/npm-init). +#### \`init-type\` + +* Default: "commonjs" +* Type: String + +The value that \`npm init\` should use by default for the package.json type +field. + + + #### \`init-version\` * Default: "1.0.0" @@ -2123,6 +2133,7 @@ Array [ "init-author-url", "init-license", "init-module", + "init-type", "init-version", "init.author.email", "init.author.name", @@ -2357,6 +2368,7 @@ Array [ "init-author-url", "init-license", "init-module", + "init-type", "init-version", "init.author.email", "init.author.name", @@ -2624,7 +2636,7 @@ Options: [--include [--include ...]] [--foreground-scripts] [--ignore-scripts] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] Run "npm help audit" for more info @@ -2657,7 +2669,7 @@ npm bugs [ [ ...]] Options: [--no-browser|--browser ] [--registry ] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] +[--workspaces] [--include-workspace-root] alias: issues @@ -2677,13 +2689,16 @@ alias: issues ` exports[`test/lib/docs.js TAP usage cache > must match snapshot 1`] = ` -Manipulates packages cache +Manipulates packages and npx cache Usage: npm cache add npm cache clean [] npm cache ls [@] npm cache verify +npm cache npx ls +npm cache npx rm [...] +npm cache npx info ... Options: [--cache ] @@ -2695,6 +2710,9 @@ npm cache add npm cache clean [] npm cache ls [@] npm cache verify +npm cache npx ls +npm cache npx rm [...] +npm cache npx info ... \`\`\` Note: This command is unaware of workspaces. @@ -2715,7 +2733,7 @@ Options: [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] aliases: clean-install, ic, install-clean, isntall-clean @@ -2814,7 +2832,7 @@ Options: [--include [--include ...]] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] alias: ddp @@ -2878,7 +2896,7 @@ Options: [--diff-src-prefix ] [--diff-dst-prefix ] [--diff-text] [-g|--global] [--tag ] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] +[--workspaces] [--include-workspace-root] Run "npm help diff" for more info @@ -2911,7 +2929,7 @@ npm dist-tag ls [] Options: [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] +[--workspaces] [--include-workspace-root] alias: dist-tags @@ -2939,7 +2957,7 @@ npm docs [ [ ...]] Options: [--no-browser|--browser ] [--registry ] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] +[--workspaces] [--include-workspace-root] alias: home @@ -3010,7 +3028,7 @@ npm exec --package=foo -c ' [args...]' Options: [--package [--package ...]] [-c|--call ] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] +[--workspaces] [--include-workspace-root] alias: x @@ -3088,7 +3106,7 @@ Options: [--include [--include ...]] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] Run "npm help find-dupes" for more info @@ -3210,10 +3228,10 @@ npm init <@scope> (same as \`npx <@scope>/create\`) Options: [--init-author-name ] [--init-author-url ] [--init-license ] -[--init-module ] [--init-version ] [-y|--yes] [-f|--force] -[--scope <@scope>] +[--init-module ] [--init-type ] [--init-version ] +[-y|--yes] [-f|--force] [--scope <@scope>] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root] +[--workspaces] [--no-workspaces-update] [--include-workspace-root] aliases: create, innit @@ -3230,6 +3248,7 @@ aliases: create, innit #### \`init-author-url\` #### \`init-license\` #### \`init-module\` +#### \`init-type\` #### \`init-version\` #### \`yes\` #### \`force\` @@ -3256,7 +3275,7 @@ Options: [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [--cpu ] [--os ] [--libc ] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall @@ -3308,7 +3327,7 @@ Options: [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] aliases: cit, clean-install-test, sit @@ -3354,7 +3373,7 @@ Options: [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [--cpu ] [--os ] [--libc ] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] alias: it @@ -3408,7 +3427,7 @@ Options: [--include [--include ...]] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] alias: ln @@ -3453,7 +3472,7 @@ Options: [--include [--include ...]] [--link] [--package-lock-only] [--unicode] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] alias: la @@ -3537,7 +3556,7 @@ Options: [--include [--include ...]] [--link] [--package-lock-only] [--unicode] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] alias: list @@ -3653,7 +3672,7 @@ npm owner ls Options: [--registry ] [--otp ] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] +[--workspaces] alias: author @@ -3682,7 +3701,7 @@ npm pack Options: [--dry-run] [--json] [--pack-destination ] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--ignore-scripts] +[--workspaces] [--include-workspace-root] [--ignore-scripts] Run "npm help pack" for more info @@ -3733,7 +3752,7 @@ npm pkg fix Options: [-f|--force] [--json] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] +[--workspaces] Run "npm help pkg" for more info @@ -3812,7 +3831,7 @@ Options: [--include [--include ...]] [--dry-run] [--json] [--foreground-scripts] [--ignore-scripts] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] Run "npm help prune" for more info @@ -3841,8 +3860,7 @@ npm publish Options: [--tag ] [--access ] [--dry-run] [--otp ] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] -[--provenance|--provenance-file ] +[--workspaces] [--include-workspace-root] [--provenance|--provenance-file ] Run "npm help publish" for more info @@ -3870,7 +3888,7 @@ npm query Options: [-g|--global] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--package-lock-only] +[--workspaces] [--include-workspace-root] [--package-lock-only] [--expect-results|--expect-result-count ] Run "npm help query" for more info @@ -3897,7 +3915,7 @@ npm rebuild [] ...] Options: [-g|--global] [--no-bin-links] [--foreground-scripts] [--ignore-scripts] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] alias: rb @@ -3928,7 +3946,7 @@ npm repo [ [ ...]] Options: [--no-browser|--browser ] [--registry ] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] +[--workspaces] [--include-workspace-root] Run "npm help repo" for more info @@ -3990,7 +4008,7 @@ npm run-script [-- ] Options: [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts] +[--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts] [--foreground-scripts] [--script-shell ] aliases: run, rum, urn @@ -4023,7 +4041,7 @@ Options: [--package-lock-only] [--sbom-format ] [--sbom-type ] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] +[--workspaces] Run "npm help sbom" for more info @@ -4308,7 +4326,7 @@ Options: [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] [-g|--global] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] aliases: unlink, remove, rm, r, un @@ -4337,7 +4355,7 @@ npm unpublish [] Options: [--dry-run] [-f|--force] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] +[--workspaces] Run "npm help unpublish" for more info @@ -4388,7 +4406,7 @@ Options: [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[--workspaces] [--include-workspace-root] [--install-links] aliases: up, upgrade, udpate @@ -4431,7 +4449,7 @@ Options: [--allow-same-version] [--no-commit-hooks] [--no-git-tag-version] [--json] [--preid prerelease-id] [--sign-git-tag] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root] +[--workspaces] [--no-workspaces-update] [--include-workspace-root] alias: verison @@ -4463,7 +4481,7 @@ npm view [] [[.subfield]...] Options: [--json] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] +[--workspaces] [--include-workspace-root] aliases: info, show, v diff --git a/deps/npm/test/lib/cli/update-notifier.js b/deps/npm/test/lib/cli/update-notifier.js index 929e088bd4fa5c..a4f1ee6885a6b3 100644 --- a/deps/npm/test/lib/cli/update-notifier.js +++ b/deps/npm/test/lib/cli/update-notifier.js @@ -2,21 +2,59 @@ const t = require('tap') const { basename } = require('node:path') const tmock = require('../../fixtures/tmock') const mockNpm = require('../../fixtures/mock-npm') +const MockRegistry = require('@npmcli/mock-registry') +const mockGlobals = require('@npmcli/mock-globals') const CURRENT_VERSION = '123.420.69' const CURRENT_MAJOR = '122.420.69' const CURRENT_MINOR = '123.419.69' const CURRENT_PATCH = '123.420.68' const NEXT_VERSION = '123.421.70' +const NEXT_VERSION_ENGINE_COMPATIBLE = '123.421.60' +const NEXT_VERSION_ENGINE_COMPATIBLE_MINOR = `123.420.70` +const NEXT_VERSION_ENGINE_COMPATIBLE_PATCH = `123.421.58` const NEXT_MINOR = '123.420.70' const NEXT_PATCH = '123.421.69' const CURRENT_BETA = '124.0.0-beta.99999' const HAVE_BETA = '124.0.0-beta.0' +const packumentResponse = { + _id: 'npm', + name: 'npm', + 'dist-tags': { + latest: CURRENT_VERSION, + }, + access: 'public', + versions: { + [CURRENT_VERSION]: { version: CURRENT_VERSION, engines: { node: '>1' } }, + [CURRENT_MAJOR]: { version: CURRENT_MAJOR, engines: { node: '>1' } }, + [CURRENT_MINOR]: { version: CURRENT_MINOR, engines: { node: '>1' } }, + [CURRENT_PATCH]: { version: CURRENT_PATCH, engines: { node: '>1' } }, + [NEXT_VERSION]: { version: NEXT_VERSION, engines: { node: '>1' } }, + [NEXT_MINOR]: { version: NEXT_MINOR, engines: { node: '>1' } }, + [NEXT_PATCH]: { version: NEXT_PATCH, engines: { node: '>1' } }, + [CURRENT_BETA]: { version: CURRENT_BETA, engines: { node: '>1' } }, + [HAVE_BETA]: { version: HAVE_BETA, engines: { node: '>1' } }, + [NEXT_VERSION_ENGINE_COMPATIBLE]: { + version: NEXT_VERSION_ENGINE_COMPATIBLE, + engiges: { node: '<=1' }, + }, + [NEXT_VERSION_ENGINE_COMPATIBLE_MINOR]: { + version: NEXT_VERSION_ENGINE_COMPATIBLE_MINOR, + engines: { node: '<=1' }, + }, + [NEXT_VERSION_ENGINE_COMPATIBLE_PATCH]: { + version: NEXT_VERSION_ENGINE_COMPATIBLE_PATCH, + engines: { node: '<=1' }, + }, + }, +} + const runUpdateNotifier = async (t, { STAT_ERROR, WRITE_ERROR, PACOTE_ERROR, + PACOTE_MOCK_REQ_COUNT = 1, STAT_MTIME = 0, mocks: _mocks = {}, command = 'help', @@ -51,24 +89,7 @@ const runUpdateNotifier = async (t, { }, } - const MANIFEST_REQUEST = [] - const mockPacote = { - manifest: async (spec) => { - if (!spec.match(/^npm@/)) { - t.fail('no pacote manifest allowed for non npm packages') - } - MANIFEST_REQUEST.push(spec) - if (PACOTE_ERROR) { - throw PACOTE_ERROR - } - const manifestV = spec === 'npm@latest' ? CURRENT_VERSION - : /-/.test(spec) ? CURRENT_BETA : NEXT_VERSION - return { version: manifestV } - }, - } - const mocks = { - pacote: mockPacote, 'node:fs/promises': mockFs, '{ROOT}/package.json': { version }, 'ci-info': { isCI: false, name: null }, @@ -83,6 +104,15 @@ const runUpdateNotifier = async (t, { prefixDir, argv, }) + const registry = new MockRegistry({ + tap: t, + registry: mock.npm.config.get('registry'), + }) + + if (PACOTE_MOCK_REQ_COUNT > 0) { + registry.nock.get('/npm').times(PACOTE_MOCK_REQ_COUNT).reply(200, packumentResponse) + } + const updateNotifier = tmock(t, '{LIB}/cli/update-notifier.js', mocks) const result = await updateNotifier(mock.npm) @@ -90,29 +120,28 @@ const runUpdateNotifier = async (t, { return { wroteFile, result, - MANIFEST_REQUEST, } } t.test('duration has elapsed, no updates', async t => { - const { wroteFile, result, MANIFEST_REQUEST } = await runUpdateNotifier(t) + const { wroteFile, result } = await runUpdateNotifier(t) t.equal(wroteFile, true) t.not(result) - t.equal(MANIFEST_REQUEST.length, 1) }) t.test('situations in which we do not notify', t => { t.test('nothing to do if notifier disabled', async t => { - const { wroteFile, result, MANIFEST_REQUEST } = await runUpdateNotifier(t, { + const { wroteFile, result } = await runUpdateNotifier(t, { + PACOTE_MOCK_REQ_COUNT: 0, 'update-notifier': false, }) t.equal(wroteFile, false) t.equal(result, null) - t.strictSame(MANIFEST_REQUEST, [], 'no requests for manifests') }) t.test('do not suggest update if already updating', async t => { - const { wroteFile, result, MANIFEST_REQUEST } = await runUpdateNotifier(t, { + const { wroteFile, result } = await runUpdateNotifier(t, { + PACOTE_MOCK_REQ_COUNT: 0, command: 'install', prefixDir: { 'package.json': `{"name":"${t.testName}"}` }, argv: ['npm'], @@ -120,11 +149,11 @@ t.test('situations in which we do not notify', t => { }) t.equal(wroteFile, false) t.equal(result, null) - t.strictSame(MANIFEST_REQUEST, [], 'no requests for manifests') }) t.test('do not suggest update if already updating with spec', async t => { - const { wroteFile, result, MANIFEST_REQUEST } = await runUpdateNotifier(t, { + const { wroteFile, result } = await runUpdateNotifier(t, { + PACOTE_MOCK_REQ_COUNT: 0, command: 'install', prefixDir: { 'package.json': `{"name":"${t.testName}"}` }, argv: ['npm@latest'], @@ -132,75 +161,68 @@ t.test('situations in which we do not notify', t => { }) t.equal(wroteFile, false) t.equal(result, null) - t.strictSame(MANIFEST_REQUEST, [], 'no requests for manifests') }) t.test('do not update if same as latest', async t => { - const { wroteFile, result, MANIFEST_REQUEST } = await runUpdateNotifier(t) + const { wroteFile, result } = await runUpdateNotifier(t) t.equal(wroteFile, true) t.equal(result, null) - t.strictSame(MANIFEST_REQUEST, ['npm@latest'], 'requested latest version') }) t.test('check if stat errors (here for coverage)', async t => { const STAT_ERROR = new Error('blorg') - const { wroteFile, result, MANIFEST_REQUEST } = await runUpdateNotifier(t, { STAT_ERROR }) + const { wroteFile, result } = await runUpdateNotifier(t, { STAT_ERROR }) t.equal(wroteFile, true) t.equal(result, null) - t.strictSame(MANIFEST_REQUEST, ['npm@latest'], 'requested latest version') }) t.test('ok if write errors (here for coverage)', async t => { const WRITE_ERROR = new Error('grolb') - const { wroteFile, result, MANIFEST_REQUEST } = await runUpdateNotifier(t, { WRITE_ERROR }) + const { wroteFile, result } = await runUpdateNotifier(t, { WRITE_ERROR }) t.equal(wroteFile, true) t.equal(result, null) - t.strictSame(MANIFEST_REQUEST, ['npm@latest'], 'requested latest version') }) t.test('ignore pacote failures (here for coverage)', async t => { const PACOTE_ERROR = new Error('pah-KO-tchay') - const { wroteFile, result, MANIFEST_REQUEST } = await runUpdateNotifier(t, { PACOTE_ERROR }) + const { wroteFile, result } = await runUpdateNotifier(t, { + PACOTE_ERROR, PACOTE_MOCK_REQ_COUNT: 0, + }) t.equal(result, null) t.equal(wroteFile, true) - t.strictSame(MANIFEST_REQUEST, ['npm@latest'], 'requested latest version') }) t.test('do not update if newer than latest, but same as next', async t => { const { wroteFile, result, - MANIFEST_REQUEST, } = await runUpdateNotifier(t, { version: NEXT_VERSION }) t.equal(result, null) t.equal(wroteFile, true) - const reqs = ['npm@latest', `npm@^${NEXT_VERSION}`] - t.strictSame(MANIFEST_REQUEST, reqs, 'requested latest and next versions') }) t.test('do not update if on the latest beta', async t => { const { wroteFile, result, - MANIFEST_REQUEST, } = await runUpdateNotifier(t, { version: CURRENT_BETA }) t.equal(result, null) t.equal(wroteFile, true) - const reqs = [`npm@^${CURRENT_BETA}`] - t.strictSame(MANIFEST_REQUEST, reqs, 'requested latest and next versions') }) t.test('do not update in CI', async t => { - const { wroteFile, result, MANIFEST_REQUEST } = await runUpdateNotifier(t, { mocks: { + const { wroteFile, result } = await runUpdateNotifier(t, { mocks: { 'ci-info': { isCI: true, name: 'something' }, - } }) + }, + PACOTE_MOCK_REQ_COUNT: 0 }) t.equal(wroteFile, false) t.equal(result, null) - t.strictSame(MANIFEST_REQUEST, [], 'no requests for manifests') }) t.test('only check weekly for GA releases', async t => { // One week (plus five minutes to account for test environment fuzziness) const STAT_MTIME = Date.now() - 1000 * 60 * 60 * 24 * 7 + 1000 * 60 * 5 - const { wroteFile, result, MANIFEST_REQUEST } = await runUpdateNotifier(t, { STAT_MTIME }) + const { wroteFile, result } = await runUpdateNotifier(t, { + STAT_MTIME, + PACOTE_MOCK_REQ_COUNT: 0, + }) t.equal(wroteFile, false, 'duration was not reset') t.equal(result, null) - t.strictSame(MANIFEST_REQUEST, [], 'no requests for manifests') }) t.test('only check daily for betas', async t => { @@ -209,37 +231,48 @@ t.test('situations in which we do not notify', t => { const { wroteFile, result, - MANIFEST_REQUEST, - } = await runUpdateNotifier(t, { STAT_MTIME, version: HAVE_BETA }) + } = await runUpdateNotifier(t, { STAT_MTIME, version: HAVE_BETA, PACOTE_MOCK_REQ_COUNT: 0 }) t.equal(wroteFile, false, 'duration was not reset') t.equal(result, null) - t.strictSame(MANIFEST_REQUEST, [], 'no requests for manifests') }) t.end() }) +t.test('notification situation with engine compatibility', async t => { + // no version which are greater than node 1.0.0 should be selected. + mockGlobals(t, { 'process.version': 'v1.0.0' }, { replace: true }) + + const { + wroteFile, + result, + } = await runUpdateNotifier(t, { + version: NEXT_VERSION_ENGINE_COMPATIBLE_MINOR, + PACOTE_MOCK_REQ_COUNT: 1 }) + + t.matchSnapshot(result) + t.equal(wroteFile, true) +}) + t.test('notification situations', async t => { const cases = { - [HAVE_BETA]: [`^{V}`], - [NEXT_PATCH]: [`latest`, `^{V}`], - [NEXT_MINOR]: [`latest`, `^{V}`], - [CURRENT_PATCH]: ['latest'], - [CURRENT_MINOR]: ['latest'], - [CURRENT_MAJOR]: ['latest'], + [HAVE_BETA]: 1, + [NEXT_PATCH]: 2, + [NEXT_MINOR]: 2, + [CURRENT_PATCH]: 1, + [CURRENT_MINOR]: 1, + [CURRENT_MAJOR]: 1, } - for (const [version, reqs] of Object.entries(cases)) { + for (const [version, requestCount] of Object.entries(cases)) { for (const color of [false, 'always']) { await t.test(`${version} - color=${color}`, async t => { const { wroteFile, result, - MANIFEST_REQUEST, - } = await runUpdateNotifier(t, { version, color }) + } = await runUpdateNotifier(t, { version, color, PACOTE_MOCK_REQ_COUNT: requestCount }) t.matchSnapshot(result) t.equal(wroteFile, true) - t.strictSame(MANIFEST_REQUEST, reqs.map(r => `npm@${r.replace('{V}', version)}`)) }) } } diff --git a/deps/npm/test/lib/commands/audit.js b/deps/npm/test/lib/commands/audit.js index bf0a055d13c710..26853823a72b0b 100644 --- a/deps/npm/test/lib/commands/audit.js +++ b/deps/npm/test/lib/commands/audit.js @@ -940,7 +940,7 @@ t.test('audit signatures', async t => { }) t.test('with key fallback to legacy API', async t => { - const { npm, joinedOutput } = await loadMockNpm(t, { + const { logs, npm, joinedOutput } = await loadMockNpm(t, { prefixDir: installWithValidSigs, }) const registry = new MockRegistry({ tap: t, registry: npm.config.get('registry') }) @@ -952,6 +952,7 @@ t.test('audit signatures', async t => { t.notOk(process.exitCode, 'should exit successfully') t.match(joinedOutput(), /audited 1 package/) + t.match(logs.warn, ['Fetching verification keys using TUF failed. Fetching directly from https://registry.npmjs.org/.']) t.matchSnapshot(joinedOutput()) }) diff --git a/deps/npm/test/lib/commands/cache.js b/deps/npm/test/lib/commands/cache.js index a1f2a8fbfda02a..7b79e111cd246c 100644 --- a/deps/npm/test/lib/commands/cache.js +++ b/deps/npm/test/lib/commands/cache.js @@ -5,11 +5,26 @@ const MockRegistry = require('@npmcli/mock-registry') const cacache = require('cacache') const fs = require('node:fs') const path = require('node:path') +const { cleanCwd } = require('../../fixtures/clean-snapshot.js') const pkg = 'test-package' +const createNpxCacheEntry = (npxCacheDir, hash, pkgJson, shrinkwrapJson) => { + fs.mkdirSync(path.join(npxCacheDir, hash)) + fs.writeFileSync( + path.join(npxCacheDir, hash, 'package.json'), + JSON.stringify(pkgJson) + ) + if (shrinkwrapJson) { + fs.writeFileSync( + path.join(npxCacheDir, hash, 'npm-shrinkwrap.json'), + JSON.stringify(shrinkwrapJson) + ) + } +} + t.cleanSnapshot = str => { - return str + return cleanCwd(str) .replace(/Finished in [0-9.s]+/g, 'Finished in xxxs') .replace(/Cache verified and compressed (.*)/, 'Cache verified and compressed ({PATH})') } @@ -310,3 +325,393 @@ t.test('cache completion', async t => { testComp(['npm', 'cache', 'verify'], []), ]) }) + +t.test('cache npx ls: empty cache', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + await npm.exec('cache', ['npx', 'ls']) + t.matchSnapshot(joinedOutput(), 'logs message for empty npx cache') +}) + +t.test('cache npx ls: some entries', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + const npxCacheDir = path.join(npm.flatOptions.npxCache || path.join(npm.cache, '..', '_npx')) + fs.mkdirSync(npxCacheDir, { recursive: true }) + + // Make two fake entries: one valid, one invalid + const hash1 = 'abc123' + const hash2 = 'z9y8x7' + fs.mkdirSync(path.join(npxCacheDir, hash1)) + fs.writeFileSync( + path.join(npxCacheDir, hash1, 'package.json'), + JSON.stringify({ + name: 'fake-npx-package', + version: '1.0.0', + _npx: { packages: ['fake-npx-package@1.0.0'] }, + }) + ) + // invalid (missing or broken package.json) directory + fs.mkdirSync(path.join(npxCacheDir, hash2)) + + await npm.exec('cache', ['npx', 'ls']) + t.matchSnapshot(joinedOutput(), 'lists one valid and one invalid entry') +}) + +t.test('cache npx info: valid and invalid entry', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + const npxCacheDir = path.join(npm.flatOptions.npxCache || path.join(npm.cache, '..', '_npx')) + fs.mkdirSync(npxCacheDir, { recursive: true }) + + const goodHash = 'deadbeef' + fs.mkdirSync(path.join(npxCacheDir, goodHash)) + fs.writeFileSync( + path.join(npxCacheDir, goodHash, 'package.json'), + JSON.stringify({ + name: 'good-npx-package', + version: '2.0.0', + dependencies: { + rimraf: '^3.0.0', + }, + _npx: { packages: ['good-npx-package@2.0.0'] }, + }) + ) + + const badHash = 'badc0de' + fs.mkdirSync(path.join(npxCacheDir, badHash)) + + await npm.exec('cache', ['npx', 'info', goodHash]) + t.matchSnapshot(joinedOutput(), 'shows valid package info') + + await npm.exec('cache', ['npx', 'info', badHash]) + t.matchSnapshot(joinedOutput(), 'shows invalid package info') +}) + +t.test('cache npx rm: remove single entry', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + const npxCacheDir = path.join(npm.flatOptions.npxCache || path.join(npm.cache, '..', '_npx')) + fs.mkdirSync(npxCacheDir, { recursive: true }) + + const removableHash = '123removeme' + fs.mkdirSync(path.join(npxCacheDir, removableHash)) + fs.writeFileSync( + path.join(npxCacheDir, removableHash, 'package.json'), + JSON.stringify({ name: 'removable-package', _npx: { packages: ['removable-package@1.0.0'] } }) + ) + + npm.config.set('dry-run', true) + await npm.exec('cache', ['npx', 'rm', removableHash]) + t.ok(fs.existsSync(path.join(npxCacheDir, removableHash)), 'entry folder remains') + npm.config.set('dry-run', false) + + await npm.exec('cache', ['npx', 'rm', removableHash]) + t.matchSnapshot(joinedOutput(), 'logs removing single npx cache entry') + t.notOk(fs.existsSync(path.join(npxCacheDir, removableHash)), 'entry folder removed') +}) + +t.test('cache npx rm: removing all without --force fails', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + const npxCacheDir = path.join(npm.flatOptions.npxCache || path.join(npm.cache, '..', '_npx')) + fs.mkdirSync(npxCacheDir, { recursive: true }) + + const testHash = 'remove-all-no-force' + fs.mkdirSync(path.join(npxCacheDir, testHash)) + fs.writeFileSync( + path.join(npxCacheDir, testHash, 'package.json'), + JSON.stringify({ name: 'no-force-pkg', _npx: { packages: ['no-force-pkg@1.0.0'] } }) + ) + + await t.rejects( + npm.exec('cache', ['npx', 'rm']), + /Please use --force to remove entire npx cache/, + 'fails without --force' + ) + t.matchSnapshot(joinedOutput(), 'logs usage error when removing all without --force') + + t.ok(fs.existsSync(path.join(npxCacheDir, testHash)), 'folder still exists') +}) + +t.test('cache npx rm: removing all with --force works', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + config: { force: true }, + }) + const npxCacheDir = path.join(npm.flatOptions.npxCache || path.join(npm.cache, '..', '_npx')) + fs.mkdirSync(npxCacheDir, { recursive: true }) + + const testHash = 'remove-all-yes-force' + fs.mkdirSync(path.join(npxCacheDir, testHash)) + fs.writeFileSync( + path.join(npxCacheDir, testHash, 'package.json'), + JSON.stringify({ name: 'yes-force-pkg', _npx: { packages: ['yes-force-pkg@1.0.0'] } }) + ) + + npm.config.set('dry-run', true) + await npm.exec('cache', ['npx', 'rm']) + t.ok(fs.existsSync(npxCacheDir), 'npx cache directory remains') + npm.config.set('dry-run', false) + + await npm.exec('cache', ['npx', 'rm']) + + t.matchSnapshot(joinedOutput(), 'logs removing everything') + t.notOk(fs.existsSync(npxCacheDir), 'npx cache directory removed') +}) + +t.test('cache npx rm: removing more than 1, less than all entries', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + const npxCacheDir = path.join(npm.flatOptions.npxCache || path.join(npm.cache, '..', '_npx')) + fs.mkdirSync(npxCacheDir, { recursive: true }) + + // Removable folder + const removableHash = '123removeme' + fs.mkdirSync(path.join(npxCacheDir, removableHash)) + fs.writeFileSync( + path.join(npxCacheDir, removableHash, 'package.json'), + JSON.stringify({ name: 'removable-package', _npx: { packages: ['removable-package@1.0.0'] } }) + ) + + // Another Removable folder + const anotherRemovableHash = '456removeme' + fs.mkdirSync(path.join(npxCacheDir, anotherRemovableHash)) + fs.writeFileSync( + path.join(npxCacheDir, anotherRemovableHash, 'package.json'), + JSON.stringify({ name: 'another-removable-package', _npx: { packages: ['another-removable-package@1.0.0'] } }) + ) + + // Another folder that should remain + const keepHash = '999keep' + fs.mkdirSync(path.join(npxCacheDir, keepHash)) + fs.writeFileSync( + path.join(npxCacheDir, keepHash, 'package.json'), + JSON.stringify({ name: 'keep-package', _npx: { packages: ['keep-package@1.0.0'] } }) + ) + + npm.config.set('dry-run', true) + await npm.exec('cache', ['npx', 'rm', removableHash, anotherRemovableHash]) + t.ok(fs.existsSync(path.join(npxCacheDir, removableHash)), 'entry folder remains') + t.ok(fs.existsSync(path.join(npxCacheDir, anotherRemovableHash)), 'entry folder remains') + t.ok(fs.existsSync(path.join(npxCacheDir, keepHash)), 'entry folder remains') + npm.config.set('dry-run', false) + + await npm.exec('cache', ['npx', 'rm', removableHash, anotherRemovableHash]) + t.matchSnapshot(joinedOutput(), 'logs removing 2 of 3 entries') + + t.notOk(fs.existsSync(path.join(npxCacheDir, removableHash)), 'removed folder no longer exists') + t.notOk(fs.existsSync(path.join(npxCacheDir, anotherRemovableHash)), 'the other folder no longer exists') + t.ok(fs.existsSync(path.join(npxCacheDir, keepHash)), 'the other folder remains') +}) + +t.test('cache npx should throw usage error', async t => { + const { npm } = await loadMockNpm(t) + await t.rejects( + npm.exec('cache', ['npx', 'badcommand']), + { code: 'EUSAGE' }, + 'should throw usage error' + ) +}) + +t.test('cache npx should throw usage error for invalid key', async t => { + const { npm } = await loadMockNpm(t) + const npxCacheDir = path.join(npm.flatOptions.npxCache || path.join(npm.cache, '..', '_npx')) + fs.mkdirSync(npxCacheDir, { recursive: true }) + + const key = 'badkey' + await t.rejects( + npm.exec('cache', ['npx', 'rm', key]), + { code: 'EUSAGE' }, + `Invalid npx key ${key}` + ) +}) + +t.test('cache npx ls: entry with unknown package', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + const npxCacheDir = path.join(npm.flatOptions.npxCache || path.join(npm.cache, '..', '_npx')) + fs.mkdirSync(npxCacheDir, { recursive: true }) + + // Create an entry without the _npx property + const unknownHash = 'unknown123' + fs.mkdirSync(path.join(npxCacheDir, unknownHash)) + fs.writeFileSync( + path.join(npxCacheDir, unknownHash, 'package.json'), + JSON.stringify({ + name: 'unknown-package', + version: '1.0.0', + }) + ) + + await npm.exec('cache', ['npx', 'ls']) + t.matchSnapshot(joinedOutput(), 'lists entry with unknown package') +}) + +t.test('cache npx info: should throw usage error when no keys are provided', async t => { + const { npm } = await loadMockNpm(t) + await t.rejects( + npm.exec('cache', ['npx', 'info']), + { code: 'EUSAGE' }, + 'should throw usage error when no keys are provided' + ) +}) + +t.test('cache npx info: valid entry with _npx packages', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + const npxCacheDir = path.join(npm.flatOptions.npxCache || path.join(npm.cache, '..', '_npx')) + fs.mkdirSync(npxCacheDir, { recursive: true }) + + const validHash = 'valid123' + createNpxCacheEntry(npxCacheDir, validHash, { + name: 'valid-package', + version: '1.0.0', + _npx: { packages: ['valid-package@1.0.0'] }, + }, { + name: 'valid-package', + version: '1.0.0', + dependencies: { + 'valid-package': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/valid-package/-/valid-package-1.0.0.tgz', + integrity: 'sha512-...', + }, + }, + }) + + const nodeModulesDir = path.join(npxCacheDir, validHash, 'node_modules') + fs.mkdirSync(nodeModulesDir, { recursive: true }) + fs.mkdirSync(path.join(nodeModulesDir, 'valid-package')) + fs.writeFileSync( + path.join(nodeModulesDir, 'valid-package', 'package.json'), + JSON.stringify({ + name: 'valid-package', + version: '1.0.0', + }) + ) + + await npm.exec('cache', ['npx', 'info', validHash]) + t.matchSnapshot(joinedOutput(), 'shows valid package info with _npx packages') +}) + +t.test('cache npx info: valid entry with dependencies', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + const npxCacheDir = path.join(npm.flatOptions.npxCache || path.join(npm.cache, '..', '_npx')) + fs.mkdirSync(npxCacheDir, { recursive: true }) + + const validHash = 'valid456' + createNpxCacheEntry(npxCacheDir, validHash, { + name: 'valid-package', + version: '1.0.0', + dependencies: { + 'dep-package': '1.0.0', + }, + }, { + name: 'valid-package', + version: '1.0.0', + dependencies: { + 'dep-package': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/dep-package/-/dep-package-1.0.0.tgz', + integrity: 'sha512-...', + }, + }, + }) + + const nodeModulesDir = path.join(npxCacheDir, validHash, 'node_modules') + fs.mkdirSync(nodeModulesDir, { recursive: true }) + fs.mkdirSync(path.join(nodeModulesDir, 'dep-package')) + fs.writeFileSync( + path.join(nodeModulesDir, 'dep-package', 'package.json'), + JSON.stringify({ + name: 'dep-package', + version: '1.0.0', + }) + ) + + await npm.exec('cache', ['npx', 'info', validHash]) + t.matchSnapshot(joinedOutput(), 'shows valid package info with dependencies') +}) + +t.test('cache npx info: valid entry with _npx directory package', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + const npxCacheDir = path.join(npm.flatOptions.npxCache || path.join(npm.cache, '..', '_npx')) + fs.mkdirSync(npxCacheDir, { recursive: true }) + + const validHash = 'valid123' + createNpxCacheEntry(npxCacheDir, validHash, { + name: 'valid-package', + version: '1.0.0', + _npx: { packages: ['/path/to/valid-package'] }, + }, { + name: 'valid-package', + version: '1.0.0', + dependencies: { + 'valid-package': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/valid-package/-/valid-package-1.0.0.tgz', + integrity: 'sha512-...', + }, + }, + }) + + const nodeModulesDir = path.join(npxCacheDir, validHash, 'node_modules') + fs.mkdirSync(nodeModulesDir, { recursive: true }) + fs.mkdirSync(path.join(nodeModulesDir, 'valid-package')) + fs.writeFileSync( + path.join(nodeModulesDir, 'valid-package', 'package.json'), + JSON.stringify({ + name: 'valid-package', + version: '1.0.0', + }) + ) + + await npm.exec('cache', ['npx', 'info', validHash]) + t.matchSnapshot(joinedOutput(), 'shows valid package info with _npx directory package') +}) + +t.test('cache npx info: valid entry with a link dependency', async t => { + const { npm, joinedOutput } = await loadMockNpm(t) + const npxCacheDir = path.join( + npm.flatOptions.npxCache || path.join(npm.cache, '..', '_npx') + ) + fs.mkdirSync(npxCacheDir, { recursive: true }) + + const validHash = 'link123' + const pkgDir = path.join(npxCacheDir, validHash) + fs.mkdirSync(pkgDir) + + fs.writeFileSync( + path.join(pkgDir, 'package.json'), + JSON.stringify({ + name: 'link-package', + version: '1.0.0', + dependencies: { + 'linked-dep': 'file:./some-other-loc', + }, + }) + ) + + fs.writeFileSync( + path.join(pkgDir, 'npm-shrinkwrap.json'), + JSON.stringify({ + name: 'link-package', + version: '1.0.0', + dependencies: { + 'linked-dep': { + version: 'file:../some-other-loc', + }, + }, + }) + ) + + const nodeModulesDir = path.join(pkgDir, 'node_modules') + fs.mkdirSync(nodeModulesDir, { recursive: true }) + + const linkTarget = path.join(pkgDir, 'some-other-loc') + fs.mkdirSync(linkTarget) + fs.writeFileSync( + path.join(linkTarget, 'package.json'), + JSON.stringify({ name: 'linked-dep', version: '1.0.0' }) + ) + + fs.symlinkSync('../some-other-loc', path.join(nodeModulesDir, 'linked-dep')) + await npm.exec('cache', ['npx', 'info', validHash]) + + t.matchSnapshot( + joinedOutput(), + 'shows link dependency realpath (child.isLink branch)' + ) +}) diff --git a/deps/npm/test/lib/commands/config.js b/deps/npm/test/lib/commands/config.js index 849f832554aab1..bcd88915dc97a7 100644 --- a/deps/npm/test/lib/commands/config.js +++ b/deps/npm/test/lib/commands/config.js @@ -164,8 +164,9 @@ t.test('config list with publishConfig', async t => { prefixDir: { 'package.json': JSON.stringify({ publishConfig: { + other: 'not defined', registry: 'https://some.registry', - _authToken: 'mytoken', + '//some.registry:_authToken': 'mytoken', }, }), }, @@ -173,7 +174,7 @@ t.test('config list with publishConfig', async t => { }) t.test('local', async t => { - const { npm, joinedOutput } = await loadMockNpmWithPublishConfig(t) + const { npm, logs, joinedOutput } = await loadMockNpmWithPublishConfig(t) await npm.exec('config', ['list']) @@ -182,6 +183,7 @@ t.test('config list with publishConfig', async t => { t.match(output, 'registry = "https://some.registry"') t.matchSnapshot(output, 'output matches snapshot') + t.matchSnapshot(logs.warn, 'warns about unknown config') }) t.test('global', async t => { diff --git a/deps/npm/test/lib/commands/publish.js b/deps/npm/test/lib/commands/publish.js index f310587418b1f2..3d1d629e31ba40 100644 --- a/deps/npm/test/lib/commands/publish.js +++ b/deps/npm/test/lib/commands/publish.js @@ -29,11 +29,14 @@ t.test('respects publishConfig.registry, runs appropriate scripts', async t => { publish: 'touch scripts-publish', postpublish: 'touch scripts-postpublish', }, - publishConfig: { registry: alternateRegistry }, + publishConfig: { + other: 'not defined', + registry: alternateRegistry, + }, } - const { npm, joinedOutput, prefix, registry } = await loadNpmWithRegistry(t, { + const { npm, joinedOutput, logs, prefix, registry } = await loadNpmWithRegistry(t, { config: { - loglevel: 'silent', + loglevel: 'warn', [`${alternateRegistry.slice(6)}/:_authToken`]: 'test-other-token', }, prefixDir: { @@ -49,6 +52,7 @@ t.test('respects publishConfig.registry, runs appropriate scripts', async t => { t.equal(fs.existsSync(path.join(prefix, 'scripts-prepublish')), false, 'did not run prepublish') t.equal(fs.existsSync(path.join(prefix, 'scripts-publish')), true, 'ran publish') t.equal(fs.existsSync(path.join(prefix, 'scripts-postpublish')), true, 'ran postpublish') + t.same(logs.warn, ['Unknown publishConfig config "other". This will stop working in the next major version of npm.']) }) t.test('re-loads publishConfig.registry if added during script process', async t => { diff --git a/deps/npm/test/lib/commands/unpublish.js b/deps/npm/test/lib/commands/unpublish.js index 31dc77ea46cd0c..996edf2b881fc4 100644 --- a/deps/npm/test/lib/commands/unpublish.js +++ b/deps/npm/test/lib/commands/unpublish.js @@ -380,7 +380,7 @@ t.test('dryRun with no args', async t => { t.test('publishConfig no spec', async t => { const alternateRegistry = 'https://other.registry.npmjs.org' - const { joinedOutput, npm } = await loadMockNpm(t, { + const { logs, joinedOutput, npm } = await loadMockNpm(t, { config: { force: true, '//other.registry.npmjs.org/:_authToken': 'test-other-token', @@ -390,6 +390,7 @@ t.test('publishConfig no spec', async t => { name: pkg, version: '1.0.0', publishConfig: { + other: 'not defined', registry: alternateRegistry, }, }, null, 2), @@ -406,6 +407,10 @@ t.test('publishConfig no spec', async t => { registry.unpublish({ manifest }) await npm.exec('unpublish', []) t.equal(joinedOutput(), '- test-package') + t.same(logs.warn, [ + 'using --force Recommended protections disabled.', + 'Unknown publishConfig config "other". This will stop working in the next major version of npm.', + ]) }) t.test('prioritize CLI flags over publishConfig no spec', async t => {