@contrast/agent-bundle 5.47.0 → 5.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@contrast/agent/package.json +10 -10
- package/node_modules/@contrast/agentify/package.json +14 -14
- package/node_modules/@contrast/architecture-components/package.json +4 -4
- package/node_modules/@contrast/assess/lib/configuration-analysis/install/apollo-server.js +1 -1
- package/node_modules/@contrast/assess/lib/configuration-analysis/install/graphql-yoga.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/sinks/install/fs.js +8 -15
- package/node_modules/@contrast/assess/package.json +11 -11
- package/node_modules/@contrast/config/package.json +2 -2
- package/node_modules/@contrast/core/package.json +4 -4
- package/node_modules/@contrast/deadzones/package.json +4 -4
- package/node_modules/@contrast/dep-hooks/lib/export-handler-registry.js +1 -10
- package/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.js +1 -1
- package/node_modules/@contrast/dep-hooks/lib/index.d.ts +1 -1
- package/node_modules/@contrast/dep-hooks/lib/index.js +1 -1
- package/node_modules/@contrast/dep-hooks/lib/package-finder.d.ts +2 -1
- package/node_modules/@contrast/dep-hooks/lib/package-finder.js +11 -2
- package/node_modules/@contrast/dep-hooks/package.json +3 -3
- package/node_modules/@contrast/esm-hooks/package.json +5 -5
- package/node_modules/@contrast/instrumentation/package.json +4 -4
- package/node_modules/@contrast/library-analysis/lib/install/library-reporting/dep.json +144 -202
- package/node_modules/@contrast/library-analysis/package.json +3 -3
- package/node_modules/@contrast/logger/package.json +3 -3
- package/node_modules/@contrast/metrics/package.json +5 -5
- package/node_modules/@contrast/patcher/package.json +2 -2
- package/node_modules/@contrast/protect/lib/input-tracing/install/fs.js +0 -8
- package/node_modules/@contrast/protect/package.json +10 -10
- package/node_modules/@contrast/reporter/package.json +5 -5
- package/node_modules/@contrast/rewriter/package.json +4 -4
- package/node_modules/@contrast/route-coverage/lib/index.d.ts +2 -0
- package/node_modules/@contrast/route-coverage/lib/index.js +2 -1
- package/node_modules/@contrast/route-coverage/lib/install/express.js +535 -0
- package/node_modules/@contrast/route-coverage/lib/install/fastify/fastify-express.js +71 -0
- package/node_modules/@contrast/route-coverage/lib/install/fastify/fastify-middie.js +67 -0
- package/node_modules/@contrast/route-coverage/lib/install/{fastify.js → fastify/fastify.js} +12 -12
- package/node_modules/@contrast/route-coverage/lib/install/{express → fastify}/index.js +6 -5
- package/node_modules/@contrast/route-coverage/lib/install/koa.js +39 -45
- package/node_modules/@contrast/route-coverage/lib/utils/route-info.js +26 -1
- package/node_modules/@contrast/route-coverage/package.json +7 -7
- package/node_modules/@contrast/scopes/package.json +5 -5
- package/node_modules/@contrast/sec-obs/package.json +8 -8
- package/node_modules/@contrast/sources/package.json +2 -2
- package/node_modules/@contrast/telemetry/package.json +4 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.d.ts +697 -30
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +697 -30
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.d.ts +6 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js +6 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.d.ts +877 -49
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js +877 -49
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.d.ts +13 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js +13 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.d.ts +697 -30
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js +697 -30
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.d.ts +6 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js +6 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.d.ts +877 -49
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js +877 -49
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.d.ts +13 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js +13 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.d.ts +697 -30
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js +729 -61
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.d.ts +6 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js +7 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.d.ts +877 -49
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +886 -56
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.d.ts +13 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +13 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/package.json +3 -5
- package/node_modules/{pino → @pinojs/redact}/.github/dependabot.yml +1 -1
- package/node_modules/@pinojs/redact/.github/workflows/ci.yml +48 -0
- package/node_modules/@pinojs/redact/.github/workflows/publish-release.yml +43 -0
- package/node_modules/{abort-controller → @pinojs/redact}/LICENSE +1 -1
- package/node_modules/@pinojs/redact/README.md +350 -0
- package/node_modules/@pinojs/redact/benchmarks/basic.js +184 -0
- package/node_modules/@pinojs/redact/eslint.config.js +1 -0
- package/node_modules/@pinojs/redact/index.d.ts +52 -0
- package/node_modules/@pinojs/redact/index.js +529 -0
- package/node_modules/@pinojs/redact/index.test-d.ts +22 -0
- package/node_modules/@pinojs/redact/package.json +37 -0
- package/node_modules/@pinojs/redact/scripts/sync-version.mjs +20 -0
- package/node_modules/@pinojs/redact/test/actual-redact-comparison.test.js +211 -0
- package/node_modules/@pinojs/redact/test/index.test.js +824 -0
- package/node_modules/@pinojs/redact/test/integration.test.js +390 -0
- package/node_modules/@pinojs/redact/test/multiple-wildcards.test.js +227 -0
- package/node_modules/@pinojs/redact/test/prototype-pollution.test.js +223 -0
- package/node_modules/@pinojs/redact/test/selective-clone.test.js +115 -0
- package/node_modules/@pinojs/redact/tsconfig.json +19 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/console.d.ts +3 -2
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/process.d.ts +7 -0
- package/node_modules/@types/node/sqlite.d.ts +107 -0
- package/node_modules/@types/node/url.d.ts +32 -8
- package/node_modules/axios/CHANGELOG.md +18 -0
- package/node_modules/axios/README.md +1 -4
- package/node_modules/axios/dist/axios.js +2 -2
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +2 -2
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +2 -2
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +25 -20
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/lib/adapters/http.js +22 -18
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/package.json +1 -1
- package/node_modules/form-data/CHANGELOG.md +60 -2
- package/node_modules/form-data/README.md +4 -4
- package/node_modules/form-data/lib/form_data.js +2 -2
- package/node_modules/form-data/package.json +4 -4
- package/node_modules/ipaddr.js/README.md +1 -0
- package/node_modules/ipaddr.js/ipaddr.min.js +1 -1
- package/node_modules/ipaddr.js/lib/ipaddr.js +11 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +1 -0
- package/node_modules/ipaddr.js/package.json +2 -3
- package/node_modules/nan/.github/workflows/ci.yml +3 -1
- package/node_modules/nan/CHANGELOG.md +4 -1
- package/node_modules/nan/README.md +2 -2
- package/node_modules/nan/nan.h +25 -15
- package/node_modules/nan/nan_maybe_43_inl.h +5 -1
- package/node_modules/nan/package.json +2 -2
- package/node_modules/node-abi/abi_registry.json +8 -1
- package/node_modules/node-abi/package.json +1 -1
- package/node_modules/pino/CONTRIBUTING.md +4 -0
- package/node_modules/pino/LICENSE +1 -1
- package/node_modules/pino/README.md +20 -3
- package/node_modules/pino/benchmarks/basic.bench.js +1 -1
- package/node_modules/pino/benchmarks/child-child.bench.js +1 -1
- package/node_modules/pino/benchmarks/child-creation.bench.js +1 -1
- package/node_modules/pino/benchmarks/child.bench.js +1 -1
- package/node_modules/pino/benchmarks/deep-object.bench.js +1 -1
- package/node_modules/pino/benchmarks/internal/just-pino-heavy.bench.js +1 -1
- package/node_modules/pino/benchmarks/internal/just-pino.bench.js +1 -1
- package/node_modules/pino/benchmarks/internal/redact.bench.js +1 -1
- package/node_modules/pino/benchmarks/long-string.bench.js +1 -1
- package/node_modules/pino/benchmarks/multi-arg.bench.js +1 -1
- package/node_modules/pino/benchmarks/multistream.js +1 -1
- package/node_modules/pino/benchmarks/object.bench.js +1 -1
- package/node_modules/pino/benchmarks/utils/generate-benchmark-doc.js +2 -2
- package/node_modules/pino/benchmarks/utils/runbench.js +3 -3
- package/node_modules/pino/benchmarks/utils/wrap-log-level.js +2 -2
- package/node_modules/pino/browser.js +76 -36
- package/node_modules/pino/build/sync-version.js +18 -3
- package/node_modules/pino/docs/api.md +155 -13
- package/node_modules/pino/docs/browser.md +16 -1
- package/node_modules/pino/docs/bundling.md +5 -3
- package/node_modules/pino/docs/diagnostics.md +16 -0
- package/node_modules/pino/docs/ecosystem.md +15 -12
- package/node_modules/pino/docs/help.md +29 -3
- package/node_modules/pino/docs/lts.md +5 -4
- package/node_modules/pino/docs/transports.md +442 -271
- package/node_modules/pino/docs/web.md +59 -9
- package/node_modules/pino/eslint.config.js +19 -0
- package/node_modules/pino/examples/transport.js +2 -2
- package/node_modules/pino/file.js +1 -1
- package/node_modules/pino/lib/meta.js +1 -1
- package/node_modules/pino/lib/multistream.js +17 -2
- package/node_modules/pino/lib/proto.js +35 -11
- package/node_modules/pino/lib/redaction.js +9 -13
- package/node_modules/pino/lib/time.js +29 -1
- package/node_modules/pino/lib/tools.js +37 -8
- package/node_modules/pino/lib/transport-stream.js +10 -4
- package/node_modules/pino/lib/transport.js +23 -9
- package/node_modules/pino/lib/worker.js +164 -24
- package/node_modules/pino/package.json +28 -27
- package/node_modules/pino/pino.d.ts +244 -203
- package/node_modules/pino/pino.js +7 -3
- package/node_modules/pino/test/basic.test.js +181 -169
- package/node_modules/pino/test/broken-pipe.test.js +18 -16
- package/node_modules/pino/test/browser-child.test.js +26 -0
- package/node_modules/pino/test/browser-is-level-enabled.test.js +101 -0
- package/node_modules/pino/test/browser-serializers.test.js +0 -2
- package/node_modules/pino/test/browser-transmit.test.js +68 -0
- package/node_modules/pino/test/browser.test.js +98 -13
- package/node_modules/pino/test/complex-objects.test.js +8 -6
- package/node_modules/pino/test/crlf.test.js +7 -5
- package/node_modules/pino/test/custom-levels.test.js +80 -66
- package/node_modules/pino/test/diagnostics.test.js +107 -0
- package/node_modules/pino/test/error-key.test.js +37 -0
- package/node_modules/pino/test/error.test.js +48 -43
- package/node_modules/pino/test/escaping.test.js +8 -6
- package/node_modules/pino/test/esm/esm.mjs +5 -3
- package/node_modules/pino/test/esm/index.test.js +14 -27
- package/node_modules/pino/test/esm/named-exports.mjs +9 -8
- package/node_modules/pino/test/exit.test.js +18 -16
- package/node_modules/pino/test/fixtures/broken-pipe/basic.js +1 -1
- package/node_modules/pino/test/fixtures/broken-pipe/destination.js +1 -1
- package/node_modules/pino/test/fixtures/broken-pipe/syncfalse.js +1 -1
- package/node_modules/pino/test/fixtures/console-transport.js +1 -1
- package/node_modules/pino/test/fixtures/crashing-transport.js +13 -0
- package/node_modules/pino/test/fixtures/default-exit.js +1 -1
- package/node_modules/pino/test/fixtures/destination-exit.js +1 -1
- package/node_modules/pino/test/fixtures/noop-transport.js +1 -1
- package/node_modules/pino/test/fixtures/pretty/null-prototype.js +1 -1
- package/node_modules/pino/test/fixtures/stdout-hack-protection.js +1 -1
- package/node_modules/pino/test/fixtures/syncfalse-child.js +1 -1
- package/node_modules/pino/test/fixtures/syncfalse-exit.js +1 -1
- package/node_modules/pino/test/fixtures/syncfalse-flush-exit.js +1 -1
- package/node_modules/pino/test/fixtures/syncfalse.js +1 -1
- package/node_modules/pino/test/fixtures/syntax-error-esm.mjs +2 -0
- package/node_modules/pino/test/fixtures/to-file-transport-with-transform.js +3 -3
- package/node_modules/pino/test/fixtures/to-file-transport.js +2 -2
- package/node_modules/pino/test/fixtures/to-file-transport.mjs +2 -2
- package/node_modules/pino/test/fixtures/transport/index.js +2 -2
- package/node_modules/pino/test/fixtures/transport-main.js +1 -1
- package/node_modules/pino/test/fixtures/transport-transform.js +1 -1
- package/node_modules/pino/test/fixtures/transport-uses-pino-config.js +1 -1
- package/node_modules/pino/test/fixtures/transport-worker-data.js +1 -1
- package/node_modules/pino/test/fixtures/transport-worker.js +2 -2
- package/node_modules/pino/test/fixtures/ts/to-file-transport-with-transform.ts +3 -3
- package/node_modules/pino/test/fixtures/ts/to-file-transport.ts +2 -2
- package/node_modules/pino/test/fixtures/ts/transpile.cjs +1 -1
- package/node_modules/pino/test/fixtures/ts/transport-exit-immediately-with-async-dest.ts +1 -1
- package/node_modules/pino/test/fixtures/ts/transport-main.ts +1 -1
- package/node_modules/pino/test/fixtures/ts/transport-worker.ts +1 -1
- package/node_modules/pino/test/formatters.test.js +46 -37
- package/node_modules/pino/test/helper.d.ts +1 -1
- package/node_modules/pino/test/helper.js +37 -10
- package/node_modules/pino/test/hooks.test.js +45 -28
- package/node_modules/pino/test/http.test.js +39 -67
- package/node_modules/pino/test/internals/version.test.js +11 -9
- package/node_modules/pino/test/is-level-enabled.test.js +66 -72
- package/node_modules/pino/test/levels.test.js +245 -141
- package/node_modules/pino/test/metadata.test.js +45 -31
- package/node_modules/pino/test/mixin-merge-strategy.test.js +9 -7
- package/node_modules/pino/test/mixin.test.js +63 -40
- package/node_modules/pino/test/multistream.test.js +174 -118
- package/node_modules/pino/test/redact.test.js +172 -126
- package/node_modules/pino/test/serializers.test.js +61 -57
- package/node_modules/pino/test/stdout-protection.test.js +14 -12
- package/node_modules/pino/test/syncfalse.test.js +29 -34
- package/node_modules/pino/test/timestamp-nano.test.js +37 -0
- package/node_modules/pino/test/timestamp.test.js +37 -34
- package/node_modules/pino/test/transport/big.test.js +11 -12
- package/node_modules/pino/test/transport/bundlers-support.test.js +15 -43
- package/node_modules/pino/test/transport/caller.test.js +9 -8
- package/node_modules/pino/test/transport/core.test.js +175 -145
- package/node_modules/pino/test/transport/core.transpiled.test.ts +17 -19
- package/node_modules/pino/test/transport/crash.test.js +36 -0
- package/node_modules/pino/test/transport/module-link.test.js +21 -19
- package/node_modules/pino/test/transport/pipeline.test.js +109 -8
- package/node_modules/pino/test/transport/repl.test.js +4 -3
- package/node_modules/pino/test/transport/{syncfalse.test.js → sync-false.test.js} +14 -12
- package/node_modules/pino/test/transport/sync-true.test.js +57 -0
- package/node_modules/pino/test/transport/targets.test.js +25 -5
- package/node_modules/pino/test/transport/uses-pino-config.test.js +16 -17
- package/node_modules/pino/test/transport-stream.test.js +40 -0
- package/node_modules/pino/test/types/{pino-import.test-d.ts → pino-import.test-d.cts} +4 -3
- package/node_modules/pino/test/types/pino-multistream.test-d.ts +1 -1
- package/node_modules/pino/test/types/pino-top-export.test-d.ts +1 -0
- package/node_modules/pino/test/types/pino-transport.test-d.ts +1 -1
- package/node_modules/pino/test/types/pino-type-only.test-d.ts +24 -6
- package/node_modules/pino/test/types/pino.test-d.ts +161 -6
- package/node_modules/pino/test/types/pino.ts +31 -19
- package/node_modules/pino/tsconfig.json +1 -1
- package/node_modules/pino-abstract-transport/.github/workflows/ci.yml +2 -4
- package/node_modules/pino-abstract-transport/index.js +1 -1
- package/node_modules/pino-abstract-transport/package.json +2 -3
- package/node_modules/pino-abstract-transport/test/base.test.js +1 -1
- package/node_modules/pino-abstract-transport/test/worker.test.js +7 -14
- package/node_modules/pino-std-serializers/.github/workflows/ci.yml +5 -5
- package/node_modules/pino-std-serializers/Readme.md +1 -0
- package/node_modules/pino-std-serializers/package.json +9 -8
- package/node_modules/pino-std-serializers/test/err-with-cause.test.js +72 -88
- package/node_modules/pino-std-serializers/test/err.test.js +76 -91
- package/node_modules/pino-std-serializers/test/req.test.js +142 -98
- package/node_modules/pino-std-serializers/test/res.test.js +42 -31
- package/node_modules/process-warning/.github/dependabot.yml +1 -1
- package/node_modules/process-warning/.github/workflows/ci.yml +1 -2
- package/node_modules/process-warning/README.md +4 -4
- package/node_modules/process-warning/eslint.config.js +6 -0
- package/node_modules/process-warning/package.json +39 -8
- package/node_modules/process-warning/test/emit-interpolated-string.test.js +11 -6
- package/node_modules/process-warning/test/emit-once-only.test.js +11 -6
- package/node_modules/process-warning/test/emit-reset.test.js +10 -6
- package/node_modules/process-warning/test/emit-set.test.js +10 -5
- package/node_modules/process-warning/test/emit-unlimited.test.js +12 -7
- package/node_modules/process-warning/test/index.test.js +20 -20
- package/node_modules/process-warning/test/issue-88.test.js +8 -3
- package/node_modules/process-warning/test/jest.test.js +17 -15
- package/node_modules/process-warning/test/no-warnings.test.js +9 -9
- package/node_modules/process-warning/test/promise.js +10 -0
- package/node_modules/process-warning/types/index.d.ts +5 -5
- package/node_modules/thread-stream/.github/workflows/ci.yml +4 -8
- package/node_modules/thread-stream/index.d.ts +4 -5
- package/node_modules/thread-stream/lib/worker.js +5 -2
- package/node_modules/thread-stream/package.json +6 -4
- package/node_modules/thread-stream/test/base.test.js +12 -0
- package/node_modules/thread-stream/test/never-drain.test.js +3 -1
- package/node_modules/thread-stream/test/pkg/pkg.test.js +2 -0
- package/node_modules/thread-stream/test/syntax-error.mjs +2 -0
- package/node_modules/thread-stream/tsconfig.json +8 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +1 -1
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +1 -1
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +2 -2
- package/node_modules/yaml/browser/dist/errors.js +1 -1
- package/node_modules/yaml/browser/dist/nodes/Alias.js +1 -1
- package/node_modules/yaml/browser/dist/parse/parser.js +2 -2
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +1 -1
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +1 -1
- package/node_modules/yaml/dist/compose/compose-collection.js +1 -1
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +1 -1
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +2 -2
- package/node_modules/yaml/dist/errors.js +1 -1
- package/node_modules/yaml/dist/nodes/Alias.js +1 -1
- package/node_modules/yaml/dist/parse/parser.js +2 -2
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +1 -1
- package/node_modules/yaml/dist/stringify/stringifyPair.js +1 -1
- package/node_modules/yaml/package.json +4 -4
- package/package.json +2 -2
- package/node_modules/@contrast/route-coverage/lib/install/express/express4.js +0 -157
- package/node_modules/@contrast/route-coverage/lib/install/express/express5.js +0 -553
- package/node_modules/abort-controller/README.md +0 -98
- package/node_modules/abort-controller/browser.js +0 -13
- package/node_modules/abort-controller/browser.mjs +0 -11
- package/node_modules/abort-controller/dist/abort-controller.d.ts +0 -43
- package/node_modules/abort-controller/dist/abort-controller.js +0 -127
- package/node_modules/abort-controller/dist/abort-controller.js.map +0 -1
- package/node_modules/abort-controller/dist/abort-controller.mjs +0 -118
- package/node_modules/abort-controller/dist/abort-controller.mjs.map +0 -1
- package/node_modules/abort-controller/dist/abort-controller.umd.js +0 -5
- package/node_modules/abort-controller/dist/abort-controller.umd.js.map +0 -1
- package/node_modules/abort-controller/package.json +0 -97
- package/node_modules/abort-controller/polyfill.js +0 -21
- package/node_modules/abort-controller/polyfill.mjs +0 -19
- package/node_modules/base64-js/LICENSE +0 -21
- package/node_modules/base64-js/README.md +0 -34
- package/node_modules/base64-js/base64js.min.js +0 -1
- package/node_modules/base64-js/index.d.ts +0 -3
- package/node_modules/base64-js/index.js +0 -150
- package/node_modules/base64-js/package.json +0 -47
- package/node_modules/buffer/AUTHORS.md +0 -73
- package/node_modules/buffer/LICENSE +0 -21
- package/node_modules/buffer/README.md +0 -410
- package/node_modules/buffer/index.d.ts +0 -194
- package/node_modules/buffer/index.js +0 -2106
- package/node_modules/buffer/package.json +0 -93
- package/node_modules/event-target-shim/LICENSE +0 -22
- package/node_modules/event-target-shim/README.md +0 -293
- package/node_modules/event-target-shim/dist/event-target-shim.js +0 -871
- package/node_modules/event-target-shim/dist/event-target-shim.js.map +0 -1
- package/node_modules/event-target-shim/dist/event-target-shim.mjs +0 -862
- package/node_modules/event-target-shim/dist/event-target-shim.mjs.map +0 -1
- package/node_modules/event-target-shim/dist/event-target-shim.umd.js +0 -6
- package/node_modules/event-target-shim/dist/event-target-shim.umd.js.map +0 -1
- package/node_modules/event-target-shim/index.d.ts +0 -399
- package/node_modules/event-target-shim/package.json +0 -82
- package/node_modules/events/.airtap.yml +0 -15
- package/node_modules/events/.github/FUNDING.yml +0 -12
- package/node_modules/events/.travis.yml +0 -18
- package/node_modules/events/History.md +0 -118
- package/node_modules/events/LICENSE +0 -22
- package/node_modules/events/Readme.md +0 -50
- package/node_modules/events/events.js +0 -497
- package/node_modules/events/package.json +0 -37
- package/node_modules/events/security.md +0 -10
- package/node_modules/events/tests/add-listeners.js +0 -111
- package/node_modules/events/tests/check-listener-leaks.js +0 -101
- package/node_modules/events/tests/common.js +0 -104
- package/node_modules/events/tests/errors.js +0 -13
- package/node_modules/events/tests/events-list.js +0 -28
- package/node_modules/events/tests/events-once.js +0 -234
- package/node_modules/events/tests/index.js +0 -64
- package/node_modules/events/tests/legacy-compat.js +0 -16
- package/node_modules/events/tests/listener-count.js +0 -37
- package/node_modules/events/tests/listeners-side-effects.js +0 -56
- package/node_modules/events/tests/listeners.js +0 -168
- package/node_modules/events/tests/max-listeners.js +0 -47
- package/node_modules/events/tests/method-names.js +0 -35
- package/node_modules/events/tests/modify-in-emit.js +0 -90
- package/node_modules/events/tests/num-args.js +0 -60
- package/node_modules/events/tests/once.js +0 -83
- package/node_modules/events/tests/prepend.js +0 -31
- package/node_modules/events/tests/remove-all-listeners.js +0 -133
- package/node_modules/events/tests/remove-listeners.js +0 -212
- package/node_modules/events/tests/set-max-listeners-side-effects.js +0 -31
- package/node_modules/events/tests/special-event-names.js +0 -45
- package/node_modules/events/tests/subclass.js +0 -66
- package/node_modules/events/tests/symbols.js +0 -25
- package/node_modules/fast-redact/.github/workflows/ci.yml +0 -37
- package/node_modules/fast-redact/LICENSE +0 -21
- package/node_modules/fast-redact/benchmark/index.js +0 -223
- package/node_modules/fast-redact/example/default-usage.js +0 -14
- package/node_modules/fast-redact/example/intermediate-wildcard-array.js +0 -11
- package/node_modules/fast-redact/example/multi-wildcard-array-depth.js +0 -11
- package/node_modules/fast-redact/example/multi-wildcard-array-end.js +0 -11
- package/node_modules/fast-redact/example/multi-wildcard-array.js +0 -11
- package/node_modules/fast-redact/example/serialize-false.js +0 -11
- package/node_modules/fast-redact/example/serialize-function.js +0 -4
- package/node_modules/fast-redact/example/top-wildcard-object.js +0 -9
- package/node_modules/fast-redact/index.js +0 -56
- package/node_modules/fast-redact/lib/modifiers.js +0 -291
- package/node_modules/fast-redact/lib/parse.js +0 -44
- package/node_modules/fast-redact/lib/redactor.js +0 -108
- package/node_modules/fast-redact/lib/restorer.js +0 -92
- package/node_modules/fast-redact/lib/rx.js +0 -16
- package/node_modules/fast-redact/lib/state.js +0 -20
- package/node_modules/fast-redact/lib/validator.js +0 -33
- package/node_modules/fast-redact/package.json +0 -50
- package/node_modules/fast-redact/readme.md +0 -282
- package/node_modules/fast-redact/test/index.js +0 -1502
- package/node_modules/ieee754/LICENSE +0 -11
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/ieee754/index.d.ts +0 -10
- package/node_modules/ieee754/index.js +0 -85
- package/node_modules/ieee754/package.json +0 -52
- package/node_modules/pino/.eslintignore +0 -2
- package/node_modules/pino/.eslintrc +0 -8
- package/node_modules/pino/.github/workflows/bench.yml +0 -61
- package/node_modules/pino/.github/workflows/ci.yml +0 -86
- package/node_modules/pino/.github/workflows/lock-threads.yml +0 -30
- package/node_modules/pino/.github/workflows/package-manager-ci.yml +0 -99
- package/node_modules/pino/.github/workflows/target-main.yml +0 -23
- package/node_modules/pino/.taprc.yaml +0 -8
- package/node_modules/pino/docsify/sidebar.md +0 -26
- package/node_modules/pino/favicon-16x16.png +0 -0
- package/node_modules/pino/favicon-32x32.png +0 -0
- package/node_modules/pino/lib/worker-pipeline.js +0 -38
- package/node_modules/pino/node_modules/sonic-boom/.eslintignore +0 -2
- package/node_modules/pino/node_modules/sonic-boom/.husky/pre-commit +0 -4
- package/node_modules/pino/node_modules/sonic-boom/.taprc.yaml +0 -11
- package/node_modules/pino/node_modules/sonic-boom/LICENSE +0 -21
- package/node_modules/pino/node_modules/sonic-boom/README.md +0 -151
- package/node_modules/pino/node_modules/sonic-boom/bench.js +0 -98
- package/node_modules/pino/node_modules/sonic-boom/check.js +0 -18
- package/node_modules/pino/node_modules/sonic-boom/example.js +0 -8
- package/node_modules/pino/node_modules/sonic-boom/fixtures/firehose.js +0 -22
- package/node_modules/pino/node_modules/sonic-boom/index.js +0 -690
- package/node_modules/pino/node_modules/sonic-boom/package.json +0 -50
- package/node_modules/pino/node_modules/sonic-boom/test/destroy.test.js +0 -49
- package/node_modules/pino/node_modules/sonic-boom/test/end.test.js +0 -98
- package/node_modules/pino/node_modules/sonic-boom/test/flush-sync.test.js +0 -140
- package/node_modules/pino/node_modules/sonic-boom/test/flush.test.js +0 -419
- package/node_modules/pino/node_modules/sonic-boom/test/fsync.test.js +0 -63
- package/node_modules/pino/node_modules/sonic-boom/test/helper.js +0 -42
- package/node_modules/pino/node_modules/sonic-boom/test/minlength.test.js +0 -35
- package/node_modules/pino/node_modules/sonic-boom/test/mode.test.js +0 -116
- package/node_modules/pino/node_modules/sonic-boom/test/reopen.test.js +0 -239
- package/node_modules/pino/node_modules/sonic-boom/test/retry.test.js +0 -414
- package/node_modules/pino/node_modules/sonic-boom/test/sync.test.js +0 -261
- package/node_modules/pino/node_modules/sonic-boom/test/write.test.js +0 -465
- package/node_modules/pino/node_modules/sonic-boom/types/index.d.ts +0 -62
- package/node_modules/pino/node_modules/sonic-boom/types/tests/test.ts +0 -4
- package/node_modules/pino/pino-banner.png +0 -0
- package/node_modules/pino/pino-logo-hire.png +0 -0
- package/node_modules/pino/pino-tree.png +0 -0
- package/node_modules/pino/pretty-demo.png +0 -0
- package/node_modules/pino/test/errorKey.test.js +0 -34
- package/node_modules/pino/test/transport/core.test.ts +0 -236
- package/node_modules/pino-std-serializers/.taprc +0 -2
- package/node_modules/process/.eslintrc +0 -21
- package/node_modules/process/LICENSE +0 -22
- package/node_modules/process/README.md +0 -26
- package/node_modules/process/browser.js +0 -184
- package/node_modules/process/index.js +0 -2
- package/node_modules/process/package.json +0 -27
- package/node_modules/process/test.js +0 -199
- package/node_modules/process-warning/.taprc +0 -2
- package/node_modules/readable-stream/LICENSE +0 -47
- package/node_modules/readable-stream/README.md +0 -116
- package/node_modules/readable-stream/lib/_stream_duplex.js +0 -4
- package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -4
- package/node_modules/readable-stream/lib/_stream_readable.js +0 -4
- package/node_modules/readable-stream/lib/_stream_transform.js +0 -4
- package/node_modules/readable-stream/lib/_stream_writable.js +0 -4
- package/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +0 -52
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -157
- package/node_modules/readable-stream/lib/internal/streams/compose.js +0 -194
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -290
- package/node_modules/readable-stream/lib/internal/streams/duplex.js +0 -143
- package/node_modules/readable-stream/lib/internal/streams/duplexify.js +0 -378
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -286
- package/node_modules/readable-stream/lib/internal/streams/from.js +0 -98
- package/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +0 -51
- package/node_modules/readable-stream/lib/internal/streams/legacy.js +0 -89
- package/node_modules/readable-stream/lib/internal/streams/operators.js +0 -457
- package/node_modules/readable-stream/lib/internal/streams/passthrough.js +0 -39
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -471
- package/node_modules/readable-stream/lib/internal/streams/readable.js +0 -1290
- package/node_modules/readable-stream/lib/internal/streams/state.js +0 -39
- package/node_modules/readable-stream/lib/internal/streams/transform.js +0 -180
- package/node_modules/readable-stream/lib/internal/streams/utils.js +0 -327
- package/node_modules/readable-stream/lib/internal/streams/writable.js +0 -819
- package/node_modules/readable-stream/lib/internal/validators.js +0 -530
- package/node_modules/readable-stream/lib/ours/browser.js +0 -35
- package/node_modules/readable-stream/lib/ours/errors.js +0 -343
- package/node_modules/readable-stream/lib/ours/index.js +0 -65
- package/node_modules/readable-stream/lib/ours/primordials.js +0 -124
- package/node_modules/readable-stream/lib/ours/util/inspect.js +0 -55
- package/node_modules/readable-stream/lib/ours/util.js +0 -148
- package/node_modules/readable-stream/lib/stream/promises.js +0 -43
- package/node_modules/readable-stream/lib/stream.js +0 -143
- package/node_modules/readable-stream/package.json +0 -88
- package/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/safe-buffer/index.js +0 -65
- package/node_modules/safe-buffer/package.json +0 -51
- package/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/string_decoder/README.md +0 -47
- package/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/string_decoder/package.json +0 -34
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { connect, constants } from 'http2';
|
|
2
1
|
import utils from './../utils.js';
|
|
3
2
|
import settle from './../core/settle.js';
|
|
4
3
|
import buildFullPath from '../core/buildFullPath.js';
|
|
@@ -6,6 +5,7 @@ import buildURL from './../helpers/buildURL.js';
|
|
|
6
5
|
import proxyFromEnv from 'proxy-from-env';
|
|
7
6
|
import http from 'http';
|
|
8
7
|
import https from 'https';
|
|
8
|
+
import http2 from 'http2';
|
|
9
9
|
import util from 'util';
|
|
10
10
|
import followRedirects from 'follow-redirects';
|
|
11
11
|
import zlib from 'zlib';
|
|
@@ -36,13 +36,6 @@ const brotliOptions = {
|
|
|
36
36
|
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
const {
|
|
40
|
-
HTTP2_HEADER_SCHEME,
|
|
41
|
-
HTTP2_HEADER_METHOD,
|
|
42
|
-
HTTP2_HEADER_PATH,
|
|
43
|
-
HTTP2_HEADER_STATUS
|
|
44
|
-
} = constants;
|
|
45
|
-
|
|
46
39
|
const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);
|
|
47
40
|
|
|
48
41
|
const {http: httpFollow, https: httpsFollow} = followRedirects;
|
|
@@ -72,9 +65,9 @@ class Http2Sessions {
|
|
|
72
65
|
sessionTimeout: 1000
|
|
73
66
|
}, options);
|
|
74
67
|
|
|
75
|
-
let authoritySessions;
|
|
68
|
+
let authoritySessions = this.sessions[authority];
|
|
76
69
|
|
|
77
|
-
if (
|
|
70
|
+
if (authoritySessions) {
|
|
78
71
|
let len = authoritySessions.length;
|
|
79
72
|
|
|
80
73
|
for (let i = 0; i < len; i++) {
|
|
@@ -85,7 +78,7 @@ class Http2Sessions {
|
|
|
85
78
|
}
|
|
86
79
|
}
|
|
87
80
|
|
|
88
|
-
const session = connect(authority, options);
|
|
81
|
+
const session = http2.connect(authority, options);
|
|
89
82
|
|
|
90
83
|
let removed;
|
|
91
84
|
|
|
@@ -100,11 +93,12 @@ class Http2Sessions {
|
|
|
100
93
|
|
|
101
94
|
while (i--) {
|
|
102
95
|
if (entries[i][0] === session) {
|
|
103
|
-
entries.splice(i, 1);
|
|
104
96
|
if (len === 1) {
|
|
105
97
|
delete this.sessions[authority];
|
|
106
|
-
|
|
98
|
+
} else {
|
|
99
|
+
entries.splice(i, 1);
|
|
107
100
|
}
|
|
101
|
+
return;
|
|
108
102
|
}
|
|
109
103
|
}
|
|
110
104
|
};
|
|
@@ -143,12 +137,12 @@ class Http2Sessions {
|
|
|
143
137
|
|
|
144
138
|
session.once('close', removeSession);
|
|
145
139
|
|
|
146
|
-
let
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
140
|
+
let entry = [
|
|
141
|
+
session,
|
|
142
|
+
options
|
|
143
|
+
];
|
|
150
144
|
|
|
151
|
-
|
|
145
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
152
146
|
|
|
153
147
|
return session;
|
|
154
148
|
}
|
|
@@ -276,6 +270,13 @@ const http2Transport = {
|
|
|
276
270
|
|
|
277
271
|
const session = http2Sessions.getSession(authority, http2Options);
|
|
278
272
|
|
|
273
|
+
const {
|
|
274
|
+
HTTP2_HEADER_SCHEME,
|
|
275
|
+
HTTP2_HEADER_METHOD,
|
|
276
|
+
HTTP2_HEADER_PATH,
|
|
277
|
+
HTTP2_HEADER_STATUS
|
|
278
|
+
} = http2.constants;
|
|
279
|
+
|
|
279
280
|
const http2Headers = {
|
|
280
281
|
[HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''),
|
|
281
282
|
[HTTP2_HEADER_METHOD]: options.method,
|
|
@@ -857,6 +858,9 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
857
858
|
req
|
|
858
859
|
));
|
|
859
860
|
});
|
|
861
|
+
} else {
|
|
862
|
+
// explicitly reset the socket timeout value for a possible `keep-alive` request
|
|
863
|
+
req.setTimeout(0);
|
|
860
864
|
}
|
|
861
865
|
|
|
862
866
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.13.
|
|
1
|
+
export const VERSION = "1.13.2";
|
|
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v4.0.5](https://github.com/form-data/form-data/compare/v4.0.4...v4.0.5) - 2025-11-17
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Tests] Switch to newer v8 prediction library; enable node 24 testing [`16e0076`](https://github.com/form-data/form-data/commit/16e00765342106876f98a1c9703314006c9e937a)
|
|
13
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `eslint` [`5822467`](https://github.com/form-data/form-data/commit/5822467f0ec21f6ad613c1c90856375e498793c7)
|
|
14
|
+
- [Fix] set Symbol.toStringTag in the proper place [`76d0dee`](https://github.com/form-data/form-data/commit/76d0dee43933b5e167f7f09e5d9cbbd1cf911aa7)
|
|
15
|
+
|
|
8
16
|
## [v4.0.4](https://github.com/form-data/form-data/compare/v4.0.3...v4.0.4) - 2025-07-16
|
|
9
17
|
|
|
10
18
|
### Commits
|
|
@@ -86,7 +94,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
86
94
|
- fix (npmignore): ignore temporary build files [`335ad19`](https://github.com/form-data/form-data/commit/335ad19c6e17dc2d7298ffe0e9b37ba63600e94b)
|
|
87
95
|
- fix: move util.isArray to Array.isArray [`440d3be`](https://github.com/form-data/form-data/commit/440d3bed752ac2f9213b4c2229dbccefe140e5fa)
|
|
88
96
|
|
|
89
|
-
## [v4.0.0](https://github.com/form-data/form-data/compare/v3.0.
|
|
97
|
+
## [v4.0.0](https://github.com/form-data/form-data/compare/v3.0.4...v4.0.0) - 2021-02-15
|
|
90
98
|
|
|
91
99
|
### Merged
|
|
92
100
|
|
|
@@ -97,6 +105,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
97
105
|
- Fix typo [`e705c0a`](https://github.com/form-data/form-data/commit/e705c0a1fdaf90d21501f56460b93e43a18bd435)
|
|
98
106
|
- Update README for custom stream behavior [`6dd8624`](https://github.com/form-data/form-data/commit/6dd8624b2999e32768d62752c9aae5845a803b0d)
|
|
99
107
|
|
|
108
|
+
## [v3.0.4](https://github.com/form-data/form-data/compare/v3.0.3...v3.0.4) - 2025-07-16
|
|
109
|
+
|
|
110
|
+
### Fixed
|
|
111
|
+
|
|
112
|
+
- [Fix] `append`: avoid a crash on nullish values [`#577`](https://github.com/form-data/form-data/issues/577)
|
|
113
|
+
|
|
114
|
+
### Commits
|
|
115
|
+
|
|
116
|
+
- [eslint] update linting config [`f5e7eb0`](https://github.com/form-data/form-data/commit/f5e7eb024bc3fc7e2074ff80f143a4f4cbc1dbda)
|
|
117
|
+
- [meta] add `auto-changelog` [`d2eb290`](https://github.com/form-data/form-data/commit/d2eb290a3e47ed5bcad7020d027daa15b3cf5ef5)
|
|
118
|
+
- [Tests] handle predict-v8-randomness failures in node < 17 and node > 23 [`e8c574c`](https://github.com/form-data/form-data/commit/e8c574cb07ff3a0de2ecc0912d783ef22e190c1f)
|
|
119
|
+
- [Fix] Switch to using `crypto` random for boundary values [`c6ced61`](https://github.com/form-data/form-data/commit/c6ced61d4fae8f617ee2fd692133ed87baa5d0fd)
|
|
120
|
+
- [Refactor] use `hasown` [`1a78b5d`](https://github.com/form-data/form-data/commit/1a78b5dd05e508d67e97764d812ac7c6d92ea88d)
|
|
121
|
+
- [Fix] validate boundary type in `setBoundary()` method [`70bbaa0`](https://github.com/form-data/form-data/commit/70bbaa0b395ca0fb975c309de8d7286979254cc4)
|
|
122
|
+
- [Tests] add tests to check the behavior of `getBoundary` with non-strings [`b22a64e`](https://github.com/form-data/form-data/commit/b22a64ef94ba4f3f6ff7d1ac72a54cca128567df)
|
|
123
|
+
- [meta] actually ensure the readme backup isn’t published [`0150851`](https://github.com/form-data/form-data/commit/01508513ffb26fd662ae7027834b325af8efb9ea)
|
|
124
|
+
- [meta] remove local commit hooks [`fc42bb9`](https://github.com/form-data/form-data/commit/fc42bb9315b641bfa6dae51cb4e188a86bb04769)
|
|
125
|
+
- [Dev Deps] remove unused deps [`a14d09e`](https://github.com/form-data/form-data/commit/a14d09ea8ed7e0a2e1705269ce6fb54bb7ee6bdb)
|
|
126
|
+
- [meta] fix scripts to use prepublishOnly [`11d9f73`](https://github.com/form-data/form-data/commit/11d9f7338f18a59b431832a3562b49baece0a432)
|
|
127
|
+
- [meta] fix readme capitalization [`fc38b48`](https://github.com/form-data/form-data/commit/fc38b4834a117a1856f3d877eb2f5b7496a24932)
|
|
128
|
+
|
|
100
129
|
## [v3.0.3](https://github.com/form-data/form-data/compare/v3.0.2...v3.0.3) - 2025-02-14
|
|
101
130
|
|
|
102
131
|
### Merged
|
|
@@ -137,7 +166,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
137
166
|
|
|
138
167
|
- feat: add setBoundary method [`55d90ce`](https://github.com/form-data/form-data/commit/55d90ce4a4c22b0ea0647991d85cb946dfb7395b)
|
|
139
168
|
|
|
140
|
-
## [v3.0.0](https://github.com/form-data/form-data/compare/v2.5.
|
|
169
|
+
## [v3.0.0](https://github.com/form-data/form-data/compare/v2.5.5...v3.0.0) - 2019-11-05
|
|
141
170
|
|
|
142
171
|
### Merged
|
|
143
172
|
|
|
@@ -161,6 +190,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
161
190
|
- Pass options to constructor if not used with new [`4bde68e`](https://github.com/form-data/form-data/commit/4bde68e12de1ba90fefad2e7e643f6375b902763)
|
|
162
191
|
- Make userHeaders optional [`2b4e478`](https://github.com/form-data/form-data/commit/2b4e4787031490942f2d1ee55c56b85a250875a7)
|
|
163
192
|
|
|
193
|
+
## [v2.5.5](https://github.com/form-data/form-data/compare/v2.5.4...v2.5.5) - 2025-07-18
|
|
194
|
+
|
|
195
|
+
### Commits
|
|
196
|
+
|
|
197
|
+
- [meta] actually ensure the readme backup isn’t published [`10626c0`](https://github.com/form-data/form-data/commit/10626c0a9b78c7d3fcaa51772265015ee0afc25c)
|
|
198
|
+
- [Fix] use proper dependency [`026abe5`](https://github.com/form-data/form-data/commit/026abe5c5c0489d8a2ccb59d5cfd14fb63078377)
|
|
199
|
+
|
|
200
|
+
## [v2.5.4](https://github.com/form-data/form-data/compare/v2.5.3...v2.5.4) - 2025-07-17
|
|
201
|
+
|
|
202
|
+
### Fixed
|
|
203
|
+
|
|
204
|
+
- [Fix] `append`: avoid a crash on nullish values [`#577`](https://github.com/form-data/form-data/issues/577)
|
|
205
|
+
|
|
206
|
+
### Commits
|
|
207
|
+
|
|
208
|
+
- [eslint] update linting config [`8bf2492`](https://github.com/form-data/form-data/commit/8bf2492e0555d41ff58fa04c91593af998f87a3c)
|
|
209
|
+
- [meta] add `auto-changelog` [`b5101ad`](https://github.com/form-data/form-data/commit/b5101ad3d5f73cfd0143aae3735b92826fd731ea)
|
|
210
|
+
- [Tests] handle predict-v8-randomness failures in node < 17 and node > 23 [`0e93122`](https://github.com/form-data/form-data/commit/0e93122358414942393d9c2dc434ae69e58be7c8)
|
|
211
|
+
- [Fix] Switch to using `crypto` random for boundary values [`b88316c`](https://github.com/form-data/form-data/commit/b88316c94bb004323669cd3639dc8bb8262539eb)
|
|
212
|
+
- [Fix] validate boundary type in `setBoundary()` method [`131ae5e`](https://github.com/form-data/form-data/commit/131ae5efa30b9c608add4faef3befb38aa2e1bf1)
|
|
213
|
+
- [Tests] Switch to newer v8 prediction library; enable node 24 testing [`c97cfbe`](https://github.com/form-data/form-data/commit/c97cfbed9eb6d2d4b5d53090f69ded4bf9fd8a21)
|
|
214
|
+
- [Refactor] use `hasown` [`97ac9c2`](https://github.com/form-data/form-data/commit/97ac9c208be0b83faeee04bb3faef1ed3474ee4c)
|
|
215
|
+
- [meta] remove local commit hooks [`be99d4e`](https://github.com/form-data/form-data/commit/be99d4eea5ce47139c23c1f0914596194019d7fb)
|
|
216
|
+
- [Dev Deps] remove unused deps [`ddbc89b`](https://github.com/form-data/form-data/commit/ddbc89b6d6d64f730bcb27cb33b7544068466a05)
|
|
217
|
+
- [meta] fix scripts to use prepublishOnly [`e351a97`](https://github.com/form-data/form-data/commit/e351a97e9f6c57c74ffd01625e83b09de805d08a)
|
|
218
|
+
- [Dev Deps] remove unused script [`8f23366`](https://github.com/form-data/form-data/commit/8f233664842da5bd605ce85541defc713d1d1e0a)
|
|
219
|
+
- [Dev Deps] add missing peer dep [`02ff026`](https://github.com/form-data/form-data/commit/02ff026fda71f9943cfdd5754727c628adb8d135)
|
|
220
|
+
- [meta] fix readme capitalization [`2fd5f61`](https://github.com/form-data/form-data/commit/2fd5f61ebfb526cd015fb8e7b8b8c1add4a38872)
|
|
221
|
+
|
|
164
222
|
## [v2.5.3](https://github.com/form-data/form-data/compare/v2.5.2...v2.5.3) - 2025-02-14
|
|
165
223
|
|
|
166
224
|
### Merged
|
|
@@ -6,11 +6,11 @@ The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface]
|
|
|
6
6
|
|
|
7
7
|
[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface
|
|
8
8
|
|
|
9
|
-
[](https://travis-ci.org/form-data/form-data)
|
|
10
|
+
[](https://travis-ci.org/form-data/form-data)
|
|
11
|
+
[](https://travis-ci.org/form-data/form-data)
|
|
12
12
|
|
|
13
|
-
[](https://coveralls.io/github/form-data/form-data?branch=master)
|
|
14
14
|
[](https://david-dm.org/form-data/form-data)
|
|
15
15
|
|
|
16
16
|
## Install
|
|
@@ -464,7 +464,7 @@ FormData.prototype.submit = function (params, cb) {
|
|
|
464
464
|
request.removeListener('error', callback);
|
|
465
465
|
request.removeListener('response', onResponse);
|
|
466
466
|
|
|
467
|
-
return cb.call(this, error, responce);
|
|
467
|
+
return cb.call(this, error, responce);
|
|
468
468
|
};
|
|
469
469
|
|
|
470
470
|
onResponse = callback.bind(this, null);
|
|
@@ -488,7 +488,7 @@ FormData.prototype._error = function (err) {
|
|
|
488
488
|
FormData.prototype.toString = function () {
|
|
489
489
|
return '[object FormData]';
|
|
490
490
|
};
|
|
491
|
-
setToStringTag(FormData, 'FormData');
|
|
491
|
+
setToStringTag(FormData.prototype, 'FormData');
|
|
492
492
|
|
|
493
493
|
// Public API
|
|
494
494
|
module.exports = FormData;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",
|
|
3
3
|
"name": "form-data",
|
|
4
4
|
"description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
|
|
5
|
-
"version": "4.0.
|
|
5
|
+
"version": "4.0.5",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git://github.com/form-data/form-data.git"
|
|
@@ -47,23 +47,23 @@
|
|
|
47
47
|
"mime-types": "^2.1.12"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@ljharb/eslint-config": "^21.
|
|
50
|
+
"@ljharb/eslint-config": "^21.4.0",
|
|
51
51
|
"auto-changelog": "^2.5.0",
|
|
52
52
|
"browserify": "^13.3.0",
|
|
53
53
|
"browserify-istanbul": "^2.0.0",
|
|
54
54
|
"coveralls": "^3.1.1",
|
|
55
55
|
"cross-spawn": "^6.0.6",
|
|
56
|
-
"eslint": "
|
|
56
|
+
"eslint": "^8.57.1",
|
|
57
57
|
"fake": "^0.2.2",
|
|
58
58
|
"far": "^0.0.7",
|
|
59
59
|
"formidable": "^1.2.6",
|
|
60
60
|
"in-publish": "^2.0.1",
|
|
61
61
|
"is-node-modern": "^1.0.0",
|
|
62
62
|
"istanbul": "^0.4.5",
|
|
63
|
+
"js-randomness-predictor": "^1.5.5",
|
|
63
64
|
"obake": "^0.1.2",
|
|
64
65
|
"pkgfiles": "^2.3.2",
|
|
65
66
|
"pre-commit": "^1.2.2",
|
|
66
|
-
"predict-v8-randomness": "^1.0.35",
|
|
67
67
|
"puppeteer": "^1.20.0",
|
|
68
68
|
"request": "~2.87.0",
|
|
69
69
|
"rimraf": "^2.7.1",
|
|
@@ -127,6 +127,7 @@ The `ipaddr.IPv4` and `ipaddr.IPv6` objects have some methods defined, too. All
|
|
|
127
127
|
`ipaddr.IPvX.isValid(string)` can be used to check if the string is a valid address for particular protocol, and `ipaddr.IPvX.parse(string)` is the error-throwing parser.
|
|
128
128
|
|
|
129
129
|
`ipaddr.IPvX.isValid(string)` uses the same format for parsing as the POSIX `inet_ntoa` function, which accepts unusual formats like `0xc0.168.1.1` or `0x10000000`. The function `ipaddr.IPv4.isValidFourPartDecimal(string)` validates the IPv4 address and also ensures that it is written in four-part decimal format.
|
|
130
|
+
`ipaddr.IPv4.isValidCIDRFourPartDecimal(string)` validates an IPv4 address in CIDR notation and also ensures that its address portion is written in four-part decimal format.
|
|
130
131
|
|
|
131
132
|
[IPv6 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/lib/ipaddr.js#L530
|
|
132
133
|
[IPv4 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/lib/ipaddr.js#L182
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){!function(t){"use strict";const r="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp(`^${r}\\.${r}\\.${r}\\.${r}$`,"i"),threeOctet:new RegExp(`^${r}\\.${r}\\.${r}$`,"i"),twoOctet:new RegExp(`^${r}\\.${r}$`,"i"),longValue:new RegExp(`^${r}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),o="(?:[0-9a-f]+::?)+",s={zoneIndex:new RegExp("%[0-9a-z]{1,}","i"),native:new RegExp(`^(::)?(${o})?([0-9a-f]+)?(::)?(%[0-9a-z]{1,})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${r}\\.${r}\\.${r}\\.${r}(%[0-9a-z]{1,})?)$`,"i"),transitional:new RegExp(`^((?:${o})|(?:::)(?:${o})?)${r}\\.${r}\\.${r}\\.${r}(%[0-9a-z]{1,})?$`,"i")};function a(t,r){if(t.indexOf("::")!==t.lastIndexOf("::"))return null;let e,n,i=0,o=-1,a=(t.match(s.zoneIndex)||[])[0];for(a&&(a=a.substring(1),t=t.replace(/%.+$/,""));(o=t.indexOf(":",o+1))>=0;)i++;if("::"===t.substr(0,2)&&i--,"::"===t.substr(-2,2)&&i--,i>r)return null;for(n=r-i,e=":";n--;)e+="0:";return":"===(t=t.replace("::",e))[0]&&(t=t.slice(1)),":"===t[t.length-1]&&(t=t.slice(0,-1)),{parts:r=function(){const r=t.split(":"),e=[];for(let t=0;t<r.length;t++)e.push(parseInt(r[t],16));return e}(),zoneId:a}}function p(t,r,e,n){if(t.length!==r.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let i,o=0;for(;n>0;){if((i=e-n)<0&&(i=0),t[o]>>i!=r[o]>>i)return!1;n-=e,o+=1}return!0}function u(t){if(i.test(t))return parseInt(t,16);if("0"===t[0]&&!isNaN(parseInt(t[1],10))){if(n.test(t))return parseInt(t,8);throw new Error(`ipaddr: cannot parse ${t} as octal`)}return parseInt(t,10)}function d(t,r){for(;t.length<r;)t=`0${t}`;return t}const h={};h.IPv4=function(){function t(t){if(4!==t.length)throw new Error("ipaddr: ipv4 octet count should be 4");let r,e;for(r=0;r<t.length;r++)if(!(0<=(e=t[r])&&e<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=t}return t.prototype.SpecialRanges={unspecified:[[new t([0,0,0,0]),8]],broadcast:[[new t([255,255,255,255]),32]],multicast:[[new t([224,0,0,0]),4]],linkLocal:[[new t([169,254,0,0]),16]],loopback:[[new t([127,0,0,0]),8]],carrierGradeNat:[[new t([100,64,0,0]),10]],private:[[new t([10,0,0,0]),8],[new t([172,16,0,0]),12],[new t([192,168,0,0]),16]],reserved:[[new t([192,0,0,0]),24],[new t([192,0,2,0]),24],[new t([192,88,99,0]),24],[new t([198,18,0,0]),15],[new t([198,51,100,0]),24],[new t([203,0,113,0]),24],[new t([240,0,0,0]),4]],as112:[[new t([192,175,48,0]),24],[new t([192,31,196,0]),24]],amt:[[new t([192,52,193,0]),24]]},t.prototype.kind=function(){return"ipv4"},t.prototype.match=function(t,r){let e;if(void 0===r&&(t=(e=t)[0],r=e[1]),"ipv4"!==t.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return p(this.octets,t.octets,8,r)},t.prototype.prefixLengthFromSubnetMask=function(){let t=0,r=!1;const e={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};let n,i,o;for(n=3;n>=0;n-=1){if(!((i=this.octets[n])in e))return null;if(o=e[i],r&&0!==o)return null;8!==o&&(r=!0),t+=o}return 32-t},t.prototype.range=function(){return h.subnetMatch(this,this.SpecialRanges)},t.prototype.toByteArray=function(){return this.octets.slice(0)},t.prototype.toIPv4MappedAddress=function(){return h.IPv6.parse(`::ffff:${this.toString()}`)},t.prototype.toNormalizedString=function(){return this.toString()},t.prototype.toString=function(){return this.octets.join(".")},t}(),h.IPv4.broadcastAddressFromCIDR=function(t){try{const r=this.parseCIDR(t),e=r[0].toByteArray(),n=this.subnetMaskFromPrefixLength(r[1]).toByteArray(),i=[];let o=0;for(;o<4;)i.push(parseInt(e[o],10)|255^parseInt(n[o],10)),o++;return new this(i)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},h.IPv4.isIPv4=function(t){return null!==this.parser(t)},h.IPv4.isValid=function(t){try{return new this(this.parser(t)),!0}catch(t){return!1}},h.IPv4.isValidCIDR=function(t){try{return this.parseCIDR(t),!0}catch(t){return!1}},h.IPv4.isValidFourPartDecimal=function(t){return!(!h.IPv4.isValid(t)||!t.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},h.IPv4.networkAddressFromCIDR=function(t){let r,e,n,i,o;try{for(n=(r=this.parseCIDR(t))[0].toByteArray(),o=this.subnetMaskFromPrefixLength(r[1]).toByteArray(),i=[],e=0;e<4;)i.push(parseInt(n[e],10)&parseInt(o[e],10)),e++;return new this(i)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},h.IPv4.parse=function(t){const r=this.parser(t);if(null===r)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(r)},h.IPv4.parseCIDR=function(t){let r;if(r=t.match(/^(.+)\/(\d+)$/)){const t=parseInt(r[2]);if(t>=0&&t<=32){const e=[this.parse(r[1]),t];return Object.defineProperty(e,"toString",{value:function(){return this.join("/")}}),e}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},h.IPv4.parser=function(t){let r,n,i;if(r=t.match(e.fourOctet))return function(){const t=r.slice(1,6),e=[];for(let r=0;r<t.length;r++)n=t[r],e.push(u(n));return e}();if(r=t.match(e.longValue)){if((i=u(r[1]))>4294967295||i<0)throw new Error("ipaddr: address outside defined range");return function(){const t=[];let r;for(r=0;r<=24;r+=8)t.push(i>>r&255);return t}().reverse()}return(r=t.match(e.twoOctet))?function(){const t=r.slice(1,4),e=[];if((i=u(t[1]))>16777215||i<0)throw new Error("ipaddr: address outside defined range");return e.push(u(t[0])),e.push(i>>16&255),e.push(i>>8&255),e.push(255&i),e}():(r=t.match(e.threeOctet))?function(){const t=r.slice(1,5),e=[];if((i=u(t[2]))>65535||i<0)throw new Error("ipaddr: address outside defined range");return e.push(u(t[0])),e.push(u(t[1])),e.push(i>>8&255),e.push(255&i),e}():null},h.IPv4.subnetMaskFromPrefixLength=function(t){if((t=parseInt(t))<0||t>32)throw new Error("ipaddr: invalid IPv4 prefix length");const r=[0,0,0,0];let e=0;const n=Math.floor(t/8);for(;e<n;)r[e]=255,e++;return n<4&&(r[n]=Math.pow(2,t%8)-1<<8-t%8),new this(r)},h.IPv6=function(){function t(t,r){let e,n;if(16===t.length)for(this.parts=[],e=0;e<=14;e+=2)this.parts.push(t[e]<<8|t[e+1]);else{if(8!==t.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=t}for(e=0;e<this.parts.length;e++)if(!(0<=(n=this.parts[e])&&n<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");r&&(this.zoneId=r)}return t.prototype.SpecialRanges={unspecified:[new t([0,0,0,0,0,0,0,0]),128],linkLocal:[new t([65152,0,0,0,0,0,0,0]),10],multicast:[new t([65280,0,0,0,0,0,0,0]),8],loopback:[new t([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new t([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new t([0,0,0,0,0,65535,0,0]),96],discard:[new t([256,0,0,0,0,0,0,0]),64],rfc6145:[new t([0,0,0,0,65535,0,0,0]),96],rfc6052:[new t([100,65435,0,0,0,0,0,0]),96],"6to4":[new t([8194,0,0,0,0,0,0,0]),16],teredo:[new t([8193,0,0,0,0,0,0,0]),32],benchmarking:[new t([8193,2,0,0,0,0,0,0]),48],amt:[new t([8193,3,0,0,0,0,0,0]),32],as112v6:[[new t([8193,4,274,0,0,0,0,0]),48],[new t([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new t([8193,16,0,0,0,0,0,0]),28],orchid2:[new t([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new t([8193,48,0,0,0,0,0,0]),28],reserved:[[new t([8193,0,0,0,0,0,0,0]),23],[new t([8193,3512,0,0,0,0,0,0]),32]]},t.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},t.prototype.kind=function(){return"ipv6"},t.prototype.match=function(t,r){let e;if(void 0===r&&(t=(e=t)[0],r=e[1]),"ipv6"!==t.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return p(this.parts,t.parts,16,r)},t.prototype.prefixLengthFromSubnetMask=function(){let t=0,r=!1;const e={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};let n,i;for(let o=7;o>=0;o-=1){if(!((n=this.parts[o])in e))return null;if(i=e[n],r&&0!==i)return null;16!==i&&(r=!0),t+=i}return 128-t},t.prototype.range=function(){return h.subnetMatch(this,this.SpecialRanges)},t.prototype.toByteArray=function(){let t;const r=[],e=this.parts;for(let n=0;n<e.length;n++)t=e[n],r.push(t>>8),r.push(255&t);return r},t.prototype.toFixedLengthString=function(){const t=function(){const t=[];for(let r=0;r<this.parts.length;r++)t.push(d(this.parts[r].toString(16),4));return t}.call(this).join(":");let r="";return this.zoneId&&(r=`%${this.zoneId}`),t+r},t.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");const t=this.parts.slice(-2),r=t[0],e=t[1];return new h.IPv4([r>>8,255&r,e>>8,255&e])},t.prototype.toNormalizedString=function(){const t=function(){const t=[];for(let r=0;r<this.parts.length;r++)t.push(this.parts[r].toString(16));return t}.call(this).join(":");let r="";return this.zoneId&&(r=`%${this.zoneId}`),t+r},t.prototype.toRFC5952String=function(){const t=/((^|:)(0(:|$)){2,})/g,r=this.toNormalizedString();let e,n=0,i=-1;for(;e=t.exec(r);)e[0].length>i&&(n=e.index,i=e[0].length);return i<0?r:`${r.substring(0,n)}::${r.substring(n+i)}`},t.prototype.toString=function(){return this.toRFC5952String()},t}(),h.IPv6.broadcastAddressFromCIDR=function(t){try{const r=this.parseCIDR(t),e=r[0].toByteArray(),n=this.subnetMaskFromPrefixLength(r[1]).toByteArray(),i=[];let o=0;for(;o<16;)i.push(parseInt(e[o],10)|255^parseInt(n[o],10)),o++;return new this(i)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},h.IPv6.isIPv6=function(t){return null!==this.parser(t)},h.IPv6.isValid=function(t){if("string"==typeof t&&-1===t.indexOf(":"))return!1;try{const r=this.parser(t);return new this(r.parts,r.zoneId),!0}catch(t){return!1}},h.IPv6.isValidCIDR=function(t){if("string"==typeof t&&-1===t.indexOf(":"))return!1;try{return this.parseCIDR(t),!0}catch(t){return!1}},h.IPv6.networkAddressFromCIDR=function(t){let r,e,n,i,o;try{for(n=(r=this.parseCIDR(t))[0].toByteArray(),o=this.subnetMaskFromPrefixLength(r[1]).toByteArray(),i=[],e=0;e<16;)i.push(parseInt(n[e],10)&parseInt(o[e],10)),e++;return new this(i)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},h.IPv6.parse=function(t){const r=this.parser(t);if(null===r.parts)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(r.parts,r.zoneId)},h.IPv6.parseCIDR=function(t){let r,e,n;if((e=t.match(/^(.+)\/(\d+)$/))&&(r=parseInt(e[2]))>=0&&r<=128)return n=[this.parse(e[1]),r],Object.defineProperty(n,"toString",{value:function(){return this.join("/")}}),n;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},h.IPv6.parser=function(t){let r,e,n,i,o,p;if(n=t.match(s.deprecatedTransitional))return this.parser(`::ffff:${n[1]}`);if(s.native.test(t))return a(t,8);if((n=t.match(s.transitional))&&(p=n[6]||"",r=n[1],n[1].endsWith("::")||(r=r.slice(0,-1)),(r=a(r+p,6)).parts)){for(o=[parseInt(n[2]),parseInt(n[3]),parseInt(n[4]),parseInt(n[5])],e=0;e<o.length;e++)if(!(0<=(i=o[e])&&i<=255))return null;return r.parts.push(o[0]<<8|o[1]),r.parts.push(o[2]<<8|o[3]),{parts:r.parts,zoneId:r.zoneId}}return null},h.IPv6.subnetMaskFromPrefixLength=function(t){if((t=parseInt(t))<0||t>128)throw new Error("ipaddr: invalid IPv6 prefix length");const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let e=0;const n=Math.floor(t/8);for(;e<n;)r[e]=255,e++;return n<16&&(r[n]=Math.pow(2,t%8)-1<<8-t%8),new this(r)},h.fromByteArray=function(t){const r=t.length;if(4===r)return new h.IPv4(t);if(16===r)return new h.IPv6(t);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},h.isValid=function(t){return h.IPv6.isValid(t)||h.IPv4.isValid(t)},h.isValidCIDR=function(t){return h.IPv6.isValidCIDR(t)||h.IPv4.isValidCIDR(t)},h.parse=function(t){if(h.IPv6.isValid(t))return h.IPv6.parse(t);if(h.IPv4.isValid(t))return h.IPv4.parse(t);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},h.parseCIDR=function(t){try{return h.IPv6.parseCIDR(t)}catch(r){try{return h.IPv4.parseCIDR(t)}catch(t){throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},h.process=function(t){const r=this.parse(t);return"ipv6"===r.kind()&&r.isIPv4MappedAddress()?r.toIPv4Address():r},h.subnetMatch=function(t,r,e){let n,i,o,s;for(i in void 0!==e&&null!==e||(e="unicast"),r)if(Object.prototype.hasOwnProperty.call(r,i))for(!(o=r[i])[0]||o[0]instanceof Array||(o=[o]),n=0;n<o.length;n++)if(s=o[n],t.kind()===s[0].kind()&&t.match.apply(t,s))return i;return e},"undefined"!=typeof module&&module.exports?module.exports=h:t.ipaddr=h}(this)}("undefined"==typeof window?window={}:window);
|
|
1
|
+
!function(t){!function(t){"use strict";const r="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp(`^${r}\\.${r}\\.${r}\\.${r}$`,"i"),threeOctet:new RegExp(`^${r}\\.${r}\\.${r}$`,"i"),twoOctet:new RegExp(`^${r}\\.${r}$`,"i"),longValue:new RegExp(`^${r}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),o="(?:[0-9a-f]+::?)+",s={zoneIndex:new RegExp("%[0-9a-z]{1,}","i"),native:new RegExp(`^(::)?(${o})?([0-9a-f]+)?(::)?(%[0-9a-z]{1,})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${r}\\.${r}\\.${r}\\.${r}(%[0-9a-z]{1,})?)$`,"i"),transitional:new RegExp(`^((?:${o})|(?:::)(?:${o})?)${r}\\.${r}\\.${r}\\.${r}(%[0-9a-z]{1,})?$`,"i")};function a(t,r){if(t.indexOf("::")!==t.lastIndexOf("::"))return null;let e,n,i=0,o=-1,a=(t.match(s.zoneIndex)||[])[0];for(a&&(a=a.substring(1),t=t.replace(/%.+$/,""));(o=t.indexOf(":",o+1))>=0;)i++;if("::"===t.substr(0,2)&&i--,"::"===t.substr(-2,2)&&i--,i>r)return null;for(n=r-i,e=":";n--;)e+="0:";return":"===(t=t.replace("::",e))[0]&&(t=t.slice(1)),":"===t[t.length-1]&&(t=t.slice(0,-1)),{parts:r=function(){const r=t.split(":"),e=[];for(let t=0;t<r.length;t++)e.push(parseInt(r[t],16));return e}(),zoneId:a}}function p(t,r,e,n){if(t.length!==r.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let i,o=0;for(;n>0;){if((i=e-n)<0&&(i=0),t[o]>>i!=r[o]>>i)return!1;n-=e,o+=1}return!0}function u(t){if(i.test(t))return parseInt(t,16);if("0"===t[0]&&!isNaN(parseInt(t[1],10))){if(n.test(t))return parseInt(t,8);throw new Error(`ipaddr: cannot parse ${t} as octal`)}return parseInt(t,10)}function d(t,r){for(;t.length<r;)t=`0${t}`;return t}const c={};c.IPv4=function(){function t(t){if(4!==t.length)throw new Error("ipaddr: ipv4 octet count should be 4");let r,e;for(r=0;r<t.length;r++)if(!(0<=(e=t[r])&&e<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=t}return t.prototype.SpecialRanges={unspecified:[[new t([0,0,0,0]),8]],broadcast:[[new t([255,255,255,255]),32]],multicast:[[new t([224,0,0,0]),4]],linkLocal:[[new t([169,254,0,0]),16]],loopback:[[new t([127,0,0,0]),8]],carrierGradeNat:[[new t([100,64,0,0]),10]],private:[[new t([10,0,0,0]),8],[new t([172,16,0,0]),12],[new t([192,168,0,0]),16]],reserved:[[new t([192,0,0,0]),24],[new t([192,0,2,0]),24],[new t([192,88,99,0]),24],[new t([198,18,0,0]),15],[new t([198,51,100,0]),24],[new t([203,0,113,0]),24],[new t([240,0,0,0]),4]],as112:[[new t([192,175,48,0]),24],[new t([192,31,196,0]),24]],amt:[[new t([192,52,193,0]),24]]},t.prototype.kind=function(){return"ipv4"},t.prototype.match=function(t,r){let e;if(void 0===r&&(t=(e=t)[0],r=e[1]),"ipv4"!==t.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return p(this.octets,t.octets,8,r)},t.prototype.prefixLengthFromSubnetMask=function(){let t=0,r=!1;const e={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};let n,i,o;for(n=3;n>=0;n-=1){if(!((i=this.octets[n])in e))return null;if(o=e[i],r&&0!==o)return null;8!==o&&(r=!0),t+=o}return 32-t},t.prototype.range=function(){return c.subnetMatch(this,this.SpecialRanges)},t.prototype.toByteArray=function(){return this.octets.slice(0)},t.prototype.toIPv4MappedAddress=function(){return c.IPv6.parse(`::ffff:${this.toString()}`)},t.prototype.toNormalizedString=function(){return this.toString()},t.prototype.toString=function(){return this.octets.join(".")},t}(),c.IPv4.broadcastAddressFromCIDR=function(t){try{const r=this.parseCIDR(t),e=r[0].toByteArray(),n=this.subnetMaskFromPrefixLength(r[1]).toByteArray(),i=[];let o=0;for(;o<4;)i.push(parseInt(e[o],10)|255^parseInt(n[o],10)),o++;return new this(i)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},c.IPv4.isIPv4=function(t){return null!==this.parser(t)},c.IPv4.isValid=function(t){try{return new this(this.parser(t)),!0}catch(t){return!1}},c.IPv4.isValidCIDR=function(t){try{return this.parseCIDR(t),!0}catch(t){return!1}},c.IPv4.isValidFourPartDecimal=function(t){return!(!c.IPv4.isValid(t)||!t.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},c.IPv4.isValidCIDRFourPartDecimal=function(t){const r=t.match(/^(.+)\/(\d+)$/);return!(!c.IPv4.isValidCIDR(t)||!r)&&c.IPv4.isValidFourPartDecimal(r[1])},c.IPv4.networkAddressFromCIDR=function(t){let r,e,n,i,o;try{for(n=(r=this.parseCIDR(t))[0].toByteArray(),o=this.subnetMaskFromPrefixLength(r[1]).toByteArray(),i=[],e=0;e<4;)i.push(parseInt(n[e],10)&parseInt(o[e],10)),e++;return new this(i)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},c.IPv4.parse=function(t){const r=this.parser(t);if(null===r)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(r)},c.IPv4.parseCIDR=function(t){let r;if(r=t.match(/^(.+)\/(\d+)$/)){const t=parseInt(r[2]);if(t>=0&&t<=32){const e=[this.parse(r[1]),t];return Object.defineProperty(e,"toString",{value:function(){return this.join("/")}}),e}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},c.IPv4.parser=function(t){let r,n,i;if(r=t.match(e.fourOctet))return function(){const t=r.slice(1,6),e=[];for(let r=0;r<t.length;r++)n=t[r],e.push(u(n));return e}();if(r=t.match(e.longValue)){if((i=u(r[1]))>4294967295||i<0)throw new Error("ipaddr: address outside defined range");return function(){const t=[];let r;for(r=0;r<=24;r+=8)t.push(i>>r&255);return t}().reverse()}return(r=t.match(e.twoOctet))?function(){const t=r.slice(1,4),e=[];if((i=u(t[1]))>16777215||i<0)throw new Error("ipaddr: address outside defined range");return e.push(u(t[0])),e.push(i>>16&255),e.push(i>>8&255),e.push(255&i),e}():(r=t.match(e.threeOctet))?function(){const t=r.slice(1,5),e=[];if((i=u(t[2]))>65535||i<0)throw new Error("ipaddr: address outside defined range");return e.push(u(t[0])),e.push(u(t[1])),e.push(i>>8&255),e.push(255&i),e}():null},c.IPv4.subnetMaskFromPrefixLength=function(t){if((t=parseInt(t))<0||t>32)throw new Error("ipaddr: invalid IPv4 prefix length");const r=[0,0,0,0];let e=0;const n=Math.floor(t/8);for(;e<n;)r[e]=255,e++;return n<4&&(r[n]=Math.pow(2,t%8)-1<<8-t%8),new this(r)},c.IPv6=function(){function t(t,r){let e,n;if(16===t.length)for(this.parts=[],e=0;e<=14;e+=2)this.parts.push(t[e]<<8|t[e+1]);else{if(8!==t.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=t}for(e=0;e<this.parts.length;e++)if(!(0<=(n=this.parts[e])&&n<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");r&&(this.zoneId=r)}return t.prototype.SpecialRanges={unspecified:[new t([0,0,0,0,0,0,0,0]),128],linkLocal:[new t([65152,0,0,0,0,0,0,0]),10],multicast:[new t([65280,0,0,0,0,0,0,0]),8],loopback:[new t([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new t([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new t([0,0,0,0,0,65535,0,0]),96],discard:[new t([256,0,0,0,0,0,0,0]),64],rfc6145:[new t([0,0,0,0,65535,0,0,0]),96],rfc6052:[new t([100,65435,0,0,0,0,0,0]),96],"6to4":[new t([8194,0,0,0,0,0,0,0]),16],teredo:[new t([8193,0,0,0,0,0,0,0]),32],benchmarking:[new t([8193,2,0,0,0,0,0,0]),48],amt:[new t([8193,3,0,0,0,0,0,0]),32],as112v6:[[new t([8193,4,274,0,0,0,0,0]),48],[new t([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new t([8193,16,0,0,0,0,0,0]),28],orchid2:[new t([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new t([8193,48,0,0,0,0,0,0]),28],reserved:[[new t([8193,0,0,0,0,0,0,0]),23],[new t([8193,3512,0,0,0,0,0,0]),32]]},t.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},t.prototype.kind=function(){return"ipv6"},t.prototype.match=function(t,r){let e;if(void 0===r&&(t=(e=t)[0],r=e[1]),"ipv6"!==t.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return p(this.parts,t.parts,16,r)},t.prototype.prefixLengthFromSubnetMask=function(){let t=0,r=!1;const e={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};let n,i;for(let o=7;o>=0;o-=1){if(!((n=this.parts[o])in e))return null;if(i=e[n],r&&0!==i)return null;16!==i&&(r=!0),t+=i}return 128-t},t.prototype.range=function(){return c.subnetMatch(this,this.SpecialRanges)},t.prototype.toByteArray=function(){let t;const r=[],e=this.parts;for(let n=0;n<e.length;n++)t=e[n],r.push(t>>8),r.push(255&t);return r},t.prototype.toFixedLengthString=function(){const t=function(){const t=[];for(let r=0;r<this.parts.length;r++)t.push(d(this.parts[r].toString(16),4));return t}.call(this).join(":");let r="";return this.zoneId&&(r=`%${this.zoneId}`),t+r},t.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");const t=this.parts.slice(-2),r=t[0],e=t[1];return new c.IPv4([r>>8,255&r,e>>8,255&e])},t.prototype.toNormalizedString=function(){const t=function(){const t=[];for(let r=0;r<this.parts.length;r++)t.push(this.parts[r].toString(16));return t}.call(this).join(":");let r="";return this.zoneId&&(r=`%${this.zoneId}`),t+r},t.prototype.toRFC5952String=function(){const t=/((^|:)(0(:|$)){2,})/g,r=this.toNormalizedString();let e,n=0,i=-1;for(;e=t.exec(r);)e[0].length>i&&(n=e.index,i=e[0].length);return i<0?r:`${r.substring(0,n)}::${r.substring(n+i)}`},t.prototype.toString=function(){return this.toRFC5952String()},t}(),c.IPv6.broadcastAddressFromCIDR=function(t){try{const r=this.parseCIDR(t),e=r[0].toByteArray(),n=this.subnetMaskFromPrefixLength(r[1]).toByteArray(),i=[];let o=0;for(;o<16;)i.push(parseInt(e[o],10)|255^parseInt(n[o],10)),o++;return new this(i)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},c.IPv6.isIPv6=function(t){return null!==this.parser(t)},c.IPv6.isValid=function(t){if("string"==typeof t&&-1===t.indexOf(":"))return!1;try{const r=this.parser(t);return new this(r.parts,r.zoneId),!0}catch(t){return!1}},c.IPv6.isValidCIDR=function(t){if("string"==typeof t&&-1===t.indexOf(":"))return!1;try{return this.parseCIDR(t),!0}catch(t){return!1}},c.IPv6.networkAddressFromCIDR=function(t){let r,e,n,i,o;try{for(n=(r=this.parseCIDR(t))[0].toByteArray(),o=this.subnetMaskFromPrefixLength(r[1]).toByteArray(),i=[],e=0;e<16;)i.push(parseInt(n[e],10)&parseInt(o[e],10)),e++;return new this(i)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},c.IPv6.parse=function(t){const r=this.parser(t);if(null===r.parts)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(r.parts,r.zoneId)},c.IPv6.parseCIDR=function(t){let r,e,n;if((e=t.match(/^(.+)\/(\d+)$/))&&(r=parseInt(e[2]))>=0&&r<=128)return n=[this.parse(e[1]),r],Object.defineProperty(n,"toString",{value:function(){return this.join("/")}}),n;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},c.IPv6.parser=function(t){let r,e,n,i,o,p;if(n=t.match(s.deprecatedTransitional))return this.parser(`::ffff:${n[1]}`);if(s.native.test(t))return a(t,8);if((n=t.match(s.transitional))&&(p=n[6]||"",r=n[1],n[1].endsWith("::")||(r=r.slice(0,-1)),(r=a(r+p,6)).parts)){for(o=[parseInt(n[2]),parseInt(n[3]),parseInt(n[4]),parseInt(n[5])],e=0;e<o.length;e++)if(!(0<=(i=o[e])&&i<=255))return null;return r.parts.push(o[0]<<8|o[1]),r.parts.push(o[2]<<8|o[3]),{parts:r.parts,zoneId:r.zoneId}}return null},c.IPv6.subnetMaskFromPrefixLength=function(t){if((t=parseInt(t))<0||t>128)throw new Error("ipaddr: invalid IPv6 prefix length");const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let e=0;const n=Math.floor(t/8);for(;e<n;)r[e]=255,e++;return n<16&&(r[n]=Math.pow(2,t%8)-1<<8-t%8),new this(r)},c.fromByteArray=function(t){const r=t.length;if(4===r)return new c.IPv4(t);if(16===r)return new c.IPv6(t);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},c.isValid=function(t){return c.IPv6.isValid(t)||c.IPv4.isValid(t)},c.isValidCIDR=function(t){return c.IPv6.isValidCIDR(t)||c.IPv4.isValidCIDR(t)},c.parse=function(t){if(c.IPv6.isValid(t))return c.IPv6.parse(t);if(c.IPv4.isValid(t))return c.IPv4.parse(t);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},c.parseCIDR=function(t){try{return c.IPv6.parseCIDR(t)}catch(r){try{return c.IPv4.parseCIDR(t)}catch(t){throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},c.process=function(t){const r=this.parse(t);return"ipv6"===r.kind()&&r.isIPv4MappedAddress()?r.toIPv4Address():r},c.subnetMatch=function(t,r,e){let n,i,o,s;for(i in null==e&&(e="unicast"),r)if(Object.prototype.hasOwnProperty.call(r,i))for(!(o=r[i])[0]||o[0]instanceof Array||(o=[o]),n=0;n<o.length;n++)if(s=o[n],t.kind()===s[0].kind()&&t.match.apply(t,s))return i;return e},"undefined"!=typeof module&&module.exports?module.exports=c:t.ipaddr=c}(this)}("undefined"==typeof window?window={}:window);
|
|
@@ -365,6 +365,17 @@
|
|
|
365
365
|
}
|
|
366
366
|
};
|
|
367
367
|
|
|
368
|
+
// Checks if a given string is a full four-part IPv4 Address with CIDR prefix.
|
|
369
|
+
ipaddr.IPv4.isValidCIDRFourPartDecimal = function (string) {
|
|
370
|
+
const match = string.match(/^(.+)\/(\d+)$/);
|
|
371
|
+
|
|
372
|
+
if (!ipaddr.IPv4.isValidCIDR(string) || !match) {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return ipaddr.IPv4.isValidFourPartDecimal(match[1]);
|
|
377
|
+
};
|
|
378
|
+
|
|
368
379
|
// A utility function to return network address given the IPv4 interface and prefix length in CIDR notation
|
|
369
380
|
ipaddr.IPv4.networkAddressFromCIDR = function (string) {
|
|
370
381
|
let cidr, i, ipInterfaceOctets, octets, subnetMaskOctets;
|
|
@@ -30,6 +30,7 @@ declare module "ipaddr.js" {
|
|
|
30
30
|
static isValid(addr: string): boolean;
|
|
31
31
|
static isValidCIDR(addr: string): boolean;
|
|
32
32
|
static isValidFourPartDecimal(addr: string): boolean;
|
|
33
|
+
static isValidCIDRFourPartDecimal(addr: string): boolean;
|
|
33
34
|
static networkAddressFromCIDR(addr: string): IPv4;
|
|
34
35
|
static parse(addr: string): IPv4;
|
|
35
36
|
static parseCIDR(addr: string): [IPv4, number];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ipaddr.js",
|
|
3
3
|
"description": "A library for manipulating IPv4 and IPv6 addresses in JavaScript.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"author": "whitequark <whitequark@whitequark.org>",
|
|
6
6
|
"directories": {
|
|
7
7
|
"lib": "./lib"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"eslint": "^
|
|
11
|
+
"eslint": "^9.19.0",
|
|
12
12
|
"uglify-es": "*"
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
"lib",
|
|
22
|
-
"LICENSE",
|
|
23
22
|
"ipaddr.min.js"
|
|
24
23
|
],
|
|
25
24
|
"keywords": [
|
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
strategy:
|
|
23
23
|
fail-fast: false
|
|
24
24
|
matrix:
|
|
25
|
-
node-version: [24.x, 23.x, 22.x, 21.x, 20.x, 19.x, 18.x, 17.x, 16.x]
|
|
25
|
+
node-version: [25.x, 24.x, 23.x, 22.x, 21.x, 20.x, 19.x, 18.x, 17.x, 16.x]
|
|
26
26
|
os: [windows-latest]
|
|
27
27
|
include:
|
|
28
28
|
- node-version: lts/*
|
|
@@ -35,6 +35,8 @@ jobs:
|
|
|
35
35
|
os: ubuntu-24.04-arm # Linux on arm64
|
|
36
36
|
- node-version: lts/*
|
|
37
37
|
os: windows-2025
|
|
38
|
+
- node-version: lts/*
|
|
39
|
+
os: windows-11-arm # Windows on arm64
|
|
38
40
|
runs-on: ${{ matrix.os }}
|
|
39
41
|
steps:
|
|
40
42
|
- uses: actions/checkout@v4
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# NAN ChangeLog
|
|
2
2
|
|
|
3
|
-
**Version 2.23.
|
|
3
|
+
**Version 2.23.1: current Node 25.1.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1**
|
|
4
|
+
|
|
5
|
+
### 2.23.1 Nov 05 2025
|
|
6
|
+
- Feature: Adding WriteUtf8V2() and SetPrototypeV2() methods to support v8 14.3 (#1004) 9e1106ab7b7036d262df7f430eee3bff33757e9a
|
|
4
7
|
|
|
5
8
|
### 2.23.0 Jul 10 2025
|
|
6
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Native Abstractions for Node.js
|
|
2
2
|
===============================
|
|
3
3
|
|
|
4
|
-
**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 8, 10, 12, 14, 16, 17, 18, 19, 20, 21, 22, 23 and
|
|
4
|
+
**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 8, 10, 12, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24 and 25.**
|
|
5
5
|
|
|
6
|
-
***Current version: 2.23.
|
|
6
|
+
***Current version: 2.23.1***
|
|
7
7
|
|
|
8
8
|
*(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)*
|
|
9
9
|
|
package/node_modules/nan/nan.h
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
|
|
15
15
|
*
|
|
16
|
-
* Version 2.23.
|
|
16
|
+
* Version 2.23.1: current Node 25.1.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1
|
|
17
17
|
*
|
|
18
18
|
* See https://github.com/nodejs/nan for the latest update to this file
|
|
19
19
|
**********************************************************************************/
|
|
@@ -427,15 +427,12 @@ template<typename P> class WeakCallbackInfo;
|
|
|
427
427
|
|
|
428
428
|
namespace imp {
|
|
429
429
|
static const size_t kMaxLength = 0x3fffffff;
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
NODE_MINOR_VERSION == 10 && NODE_PATCH_VERSION >= 29 || \
|
|
435
|
-
NODE_MINOR_VERSION == 8 && NODE_PATCH_VERSION >= 27
|
|
436
|
-
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
|
|
430
|
+
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 13 || \
|
|
431
|
+
(V8_MAJOR_VERSION == 13 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 4))
|
|
432
|
+
static const unsigned kReplaceInvalidUtf8
|
|
433
|
+
= v8::String::WriteFlags::kReplaceInvalidUtf8;
|
|
437
434
|
#else
|
|
438
|
-
static const unsigned kReplaceInvalidUtf8 =
|
|
435
|
+
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
|
|
439
436
|
#endif
|
|
440
437
|
} // end of namespace imp
|
|
441
438
|
|
|
@@ -1167,11 +1164,18 @@ class Utf8String {
|
|
|
1167
1164
|
str_ = static_cast<char*>(malloc(len));
|
|
1168
1165
|
assert(str_ != 0);
|
|
1169
1166
|
}
|
|
1170
|
-
const int flags =
|
|
1171
|
-
v8::String::NO_NULL_TERMINATION | imp::kReplaceInvalidUtf8;
|
|
1172
1167
|
#if NODE_MAJOR_VERSION >= 11
|
|
1173
|
-
|
|
1168
|
+
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 13 || \
|
|
1169
|
+
(V8_MAJOR_VERSION == 13 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 4))
|
|
1170
|
+
length_ = string->WriteUtf8V2(v8::Isolate::GetCurrent(), str_,
|
|
1171
|
+
static_cast<int>(len), imp::kReplaceInvalidUtf8);
|
|
1172
|
+
#else
|
|
1173
|
+
const int flags =
|
|
1174
|
+
v8::String::NO_NULL_TERMINATION | imp::kReplaceInvalidUtf8;
|
|
1175
|
+
length_ = string->WriteUtf8(v8::Isolate::GetCurrent(), str_,
|
|
1174
1176
|
static_cast<int>(len), 0, flags);
|
|
1177
|
+
#endif
|
|
1178
|
+
|
|
1175
1179
|
#else
|
|
1176
1180
|
// See https://github.com/nodejs/nan/issues/832.
|
|
1177
1181
|
// Disable the warning as there is no way around it.
|
|
@@ -1183,7 +1187,9 @@ class Utf8String {
|
|
|
1183
1187
|
#pragma GCC diagnostic push
|
|
1184
1188
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
1185
1189
|
#endif
|
|
1186
|
-
|
|
1190
|
+
const int flags =
|
|
1191
|
+
v8::String::NO_NULL_TERMINATION | imp::kReplaceInvalidUtf8;
|
|
1192
|
+
length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
|
|
1187
1193
|
#ifdef __GNUC__
|
|
1188
1194
|
#pragma GCC diagnostic pop
|
|
1189
1195
|
#endif
|
|
@@ -2626,7 +2632,9 @@ NAN_DEPRECATED inline void SetAccessor(
|
|
|
2626
2632
|
, getter_
|
|
2627
2633
|
, setter_
|
|
2628
2634
|
, obj
|
|
2629
|
-
#if
|
|
2635
|
+
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION < 12 \
|
|
2636
|
+
|| (V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) \
|
|
2637
|
+
&& V8_MINOR_VERSION == 0))
|
|
2630
2638
|
, settings
|
|
2631
2639
|
#endif
|
|
2632
2640
|
, attribute
|
|
@@ -2680,7 +2688,9 @@ inline void SetAccessor(
|
|
|
2680
2688
|
, getter_
|
|
2681
2689
|
, setter_
|
|
2682
2690
|
, obj
|
|
2683
|
-
#if
|
|
2691
|
+
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION < 12 \
|
|
2692
|
+
|| (V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) \
|
|
2693
|
+
&& V8_MINOR_VERSION == 0))
|
|
2684
2694
|
, settings
|
|
2685
2695
|
#endif
|
|
2686
2696
|
, attribute
|
|
@@ -207,7 +207,11 @@ inline Maybe<bool> SetPrototype(
|
|
|
207
207
|
, v8::Local<v8::Value> prototype) {
|
|
208
208
|
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
209
209
|
v8::HandleScope scope(isolate);
|
|
210
|
-
|
|
210
|
+
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 14)
|
|
211
|
+
return obj->SetPrototypeV2(isolate->GetCurrentContext(), prototype);
|
|
212
|
+
#else
|
|
213
|
+
return obj->SetPrototype(isolate->GetCurrentContext(), prototype);
|
|
214
|
+
#endif
|
|
211
215
|
}
|
|
212
216
|
|
|
213
217
|
inline MaybeLocal<v8::String> ObjectProtoToString(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nan",
|
|
3
|
-
"version": "2.23.
|
|
4
|
-
"description": "Native Abstractions for Node.js: C++ header for Node 0.8 ->
|
|
3
|
+
"version": "2.23.1",
|
|
4
|
+
"description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 25 compatibility",
|
|
5
5
|
"main": "include_dirs.js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"2027-10-20"
|
|
134
134
|
],
|
|
135
135
|
"future": true,
|
|
136
|
-
"abi": "
|
|
136
|
+
"abi": "144"
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"abi": "70",
|
|
@@ -414,5 +414,12 @@
|
|
|
414
414
|
"lts": false,
|
|
415
415
|
"runtime": "electron",
|
|
416
416
|
"target": "39.0.0-alpha.1"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"abi": "143",
|
|
420
|
+
"future": true,
|
|
421
|
+
"lts": false,
|
|
422
|
+
"runtime": "electron",
|
|
423
|
+
"target": "40.0.0-alpha.2"
|
|
417
424
|
}
|
|
418
425
|
]
|
|
@@ -6,6 +6,10 @@ Individuals making significant and valuable contributions are given commit-acces
|
|
|
6
6
|
|
|
7
7
|
## Rules
|
|
8
8
|
|
|
9
|
+
Before you start coding, please read [Contributing to projects with git](https://jrfom.com/posts/2017/03/08/a-primer-on-contributing-to-projects-with-git/).
|
|
10
|
+
|
|
11
|
+
Notice that as long as you don't have commit-access to the project, you have to fork the project and open PRs from the feature branches of the forked project.
|
|
12
|
+
|
|
9
13
|
There are a few basic ground-rules for contributors:
|
|
10
14
|
|
|
11
15
|
1. **No `--force` pushes** on `master` or modifying the Git history in any way after a PR has been merged.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2016-
|
|
3
|
+
Copyright (c) 2016-2025 Matteo Collina, David Mark Clements and the Pino contributors listed at <https://github.com/pinojs/pino#the-team> and in the README file.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|